summaryrefslogtreecommitdiff
path: root/target/linux/adm5120-2.6/files/arch/mips/adm5120/platform.c
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2007-07-25 14:47:16 +0000
committerGabor Juhos <juhosg@openwrt.org>2007-07-25 14:47:16 +0000
commit445230cf7878d949ae35c931ae1cb4222d2a95c0 (patch)
treebe8bb313bded3cca461259f27ec2c19f496e0958 /target/linux/adm5120-2.6/files/arch/mips/adm5120/platform.c
parent4ae75984ec4eb22a0c0470a6f36e283154b60d51 (diff)
downloadmtk-20170518-445230cf7878d949ae35c931ae1cb4222d2a95c0.zip
mtk-20170518-445230cf7878d949ae35c931ae1cb4222d2a95c0.tar.gz
mtk-20170518-445230cf7878d949ae35c931ae1cb4222d2a95c0.tar.bz2
uses AMBA PL010 driver for the serial ports from now
SVN-Revision: 8159
Diffstat (limited to 'target/linux/adm5120-2.6/files/arch/mips/adm5120/platform.c')
-rw-r--r--target/linux/adm5120-2.6/files/arch/mips/adm5120/platform.c45
1 files changed, 45 insertions, 0 deletions
diff --git a/target/linux/adm5120-2.6/files/arch/mips/adm5120/platform.c b/target/linux/adm5120-2.6/files/arch/mips/adm5120/platform.c
index d0fa1f0..723f27f 100644
--- a/target/linux/adm5120-2.6/files/arch/mips/adm5120/platform.c
+++ b/target/linux/adm5120-2.6/files/arch/mips/adm5120/platform.c
@@ -38,6 +38,9 @@
#include <asm/mach-adm5120/adm5120_switch.h>
#include <asm/mach-adm5120/adm5120_platform.h>
+static void adm5120_uart_set_mctrl(struct amba_device *dev, void __iomem *base,
+ unsigned int mctrl);
+
#if 1
/*
* TODO:remove global adm5120_eth* variables when the switch driver will be
@@ -128,3 +131,45 @@ struct platform_device adm5120_nand_device = {
.num_resources = ARRAY_SIZE(adm5120_nand_resource),
.resource = adm5120_nand_resource,
};
+
+/* built-in UARTs */
+struct amba_pl010_data adm5120_uart0_data = {
+ .set_mctrl = adm5120_uart_set_mctrl
+};
+
+struct amba_device adm5120_uart0_device = {
+ .dev = {
+ .bus_id = "APB:UART0",
+ .platform_data = &adm5120_uart0_data,
+ },
+ .res = {
+ .start = ADM5120_UART0_BASE,
+ .end = ADM5120_UART0_BASE + ADM5120_UART_SIZE - 1,
+ .flags = IORESOURCE_MEM,
+ },
+ .irq = { ADM5120_IRQ_UART0, -1 },
+ .periphid = 0x0041010,
+};
+
+struct amba_pl010_data adm5120_uart1_data = {
+ .set_mctrl = adm5120_uart_set_mctrl
+};
+
+struct amba_device adm5120_uart1_device = {
+ .dev = {
+ .bus_id = "APB:UART1",
+ .platform_data = &adm5120_uart1_data,
+ },
+ .res = {
+ .start = ADM5120_UART1_BASE,
+ .end = ADM5120_UART1_BASE + ADM5120_UART_SIZE - 1,
+ .flags = IORESOURCE_MEM,
+ },
+ .irq = { ADM5120_IRQ_UART1, -1 },
+ .periphid = 0x0041010,
+};
+
+static void adm5120_uart_set_mctrl(struct amba_device *dev, void __iomem *base,
+ unsigned int mctrl)
+{
+}