diff options
Diffstat (limited to 'arch/arm/mach-imx/mx1ads.c')
-rw-r--r-- | arch/arm/mach-imx/mx1ads.c | 76 |
1 files changed, 75 insertions, 1 deletions
diff --git a/arch/arm/mach-imx/mx1ads.c b/arch/arm/mach-imx/mx1ads.c index e34d0df90aed..da893c80d471 100644 --- a/arch/arm/mach-imx/mx1ads.c +++ b/arch/arm/mach-imx/mx1ads.c | |||
@@ -26,6 +26,7 @@ | |||
26 | 26 | ||
27 | #include <asm/mach/arch.h> | 27 | #include <asm/mach/arch.h> |
28 | #include <asm/arch/mmc.h> | 28 | #include <asm/arch/mmc.h> |
29 | #include <asm/arch/imx-uart.h> | ||
29 | #include <linux/interrupt.h> | 30 | #include <linux/interrupt.h> |
30 | #include "generic.h" | 31 | #include "generic.h" |
31 | 32 | ||
@@ -48,8 +49,70 @@ static struct platform_device cs89x0_device = { | |||
48 | .resource = cs89x0_resources, | 49 | .resource = cs89x0_resources, |
49 | }; | 50 | }; |
50 | 51 | ||
52 | static struct imxuart_platform_data uart_pdata = { | ||
53 | .flags = IMXUART_HAVE_RTSCTS, | ||
54 | }; | ||
55 | |||
56 | static struct resource imx_uart1_resources[] = { | ||
57 | [0] = { | ||
58 | .start = 0x00206000, | ||
59 | .end = 0x002060FF, | ||
60 | .flags = IORESOURCE_MEM, | ||
61 | }, | ||
62 | [1] = { | ||
63 | .start = (UART1_MINT_RX), | ||
64 | .end = (UART1_MINT_RX), | ||
65 | .flags = IORESOURCE_IRQ, | ||
66 | }, | ||
67 | [2] = { | ||
68 | .start = (UART1_MINT_TX), | ||
69 | .end = (UART1_MINT_TX), | ||
70 | .flags = IORESOURCE_IRQ, | ||
71 | }, | ||
72 | }; | ||
73 | |||
74 | static struct platform_device imx_uart1_device = { | ||
75 | .name = "imx-uart", | ||
76 | .id = 0, | ||
77 | .num_resources = ARRAY_SIZE(imx_uart1_resources), | ||
78 | .resource = imx_uart1_resources, | ||
79 | .dev = { | ||
80 | .platform_data = &uart_pdata, | ||
81 | } | ||
82 | }; | ||
83 | |||
84 | static struct resource imx_uart2_resources[] = { | ||
85 | [0] = { | ||
86 | .start = 0x00207000, | ||
87 | .end = 0x002070FF, | ||
88 | .flags = IORESOURCE_MEM, | ||
89 | }, | ||
90 | [1] = { | ||
91 | .start = (UART2_MINT_RX), | ||
92 | .end = (UART2_MINT_RX), | ||
93 | .flags = IORESOURCE_IRQ, | ||
94 | }, | ||
95 | [2] = { | ||
96 | .start = (UART2_MINT_TX), | ||
97 | .end = (UART2_MINT_TX), | ||
98 | .flags = IORESOURCE_IRQ, | ||
99 | }, | ||
100 | }; | ||
101 | |||
102 | static struct platform_device imx_uart2_device = { | ||
103 | .name = "imx-uart", | ||
104 | .id = 1, | ||
105 | .num_resources = ARRAY_SIZE(imx_uart2_resources), | ||
106 | .resource = imx_uart2_resources, | ||
107 | .dev = { | ||
108 | .platform_data = &uart_pdata, | ||
109 | } | ||
110 | }; | ||
111 | |||
51 | static struct platform_device *devices[] __initdata = { | 112 | static struct platform_device *devices[] __initdata = { |
52 | &cs89x0_device, | 113 | &cs89x0_device, |
114 | &imx_uart1_device, | ||
115 | &imx_uart2_device, | ||
53 | }; | 116 | }; |
54 | 117 | ||
55 | #ifdef CONFIG_MMC_IMX | 118 | #ifdef CONFIG_MMC_IMX |
@@ -75,6 +138,17 @@ mx1ads_init(void) | |||
75 | imx_gpio_mode(GPIO_PORTB | GPIO_GIUS | GPIO_IN | 20); | 138 | imx_gpio_mode(GPIO_PORTB | GPIO_GIUS | GPIO_IN | 20); |
76 | imx_set_mmc_info(&mx1ads_mmc_info); | 139 | imx_set_mmc_info(&mx1ads_mmc_info); |
77 | #endif | 140 | #endif |
141 | |||
142 | imx_gpio_mode(PC9_PF_UART1_CTS); | ||
143 | imx_gpio_mode(PC10_PF_UART1_RTS); | ||
144 | imx_gpio_mode(PC11_PF_UART1_TXD); | ||
145 | imx_gpio_mode(PC12_PF_UART1_RXD); | ||
146 | |||
147 | imx_gpio_mode(PB28_PF_UART2_CTS); | ||
148 | imx_gpio_mode(PB29_PF_UART2_RTS); | ||
149 | imx_gpio_mode(PB30_PF_UART2_TXD); | ||
150 | imx_gpio_mode(PB31_PF_UART2_RXD); | ||
151 | |||
78 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 152 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
79 | } | 153 | } |
80 | 154 | ||
@@ -87,7 +161,7 @@ mx1ads_map_io(void) | |||
87 | MACHINE_START(MX1ADS, "Motorola MX1ADS") | 161 | MACHINE_START(MX1ADS, "Motorola MX1ADS") |
88 | /* Maintainer: Sascha Hauer, Pengutronix */ | 162 | /* Maintainer: Sascha Hauer, Pengutronix */ |
89 | .phys_io = 0x00200000, | 163 | .phys_io = 0x00200000, |
90 | .io_pg_offst = ((0xe0200000) >> 18) & 0xfffc, | 164 | .io_pg_offst = ((0xe0000000) >> 18) & 0xfffc, |
91 | .boot_params = 0x08000100, | 165 | .boot_params = 0x08000100, |
92 | .map_io = mx1ads_map_io, | 166 | .map_io = mx1ads_map_io, |
93 | .init_irq = imx_init_irq, | 167 | .init_irq = imx_init_irq, |