diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2010-06-23 03:36:01 -0400 |
---|---|---|
committer | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2010-06-30 03:00:57 -0400 |
commit | d5dac4a69fe571ec12d999174e0425f2641325d4 (patch) | |
tree | 05d979412730c14e02c1d4e974d32907cf0f537d | |
parent | 7cc3c84666db63995d44b44276d304c6f0c92630 (diff) |
ARM: imx: dynamically register imx-uart devices (imx27)
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-rw-r--r-- | arch/arm/mach-imx/Kconfig | 8 | ||||
-rw-r--r-- | arch/arm/mach-imx/devices-imx27.h | 13 | ||||
-rw-r--r-- | arch/arm/mach-imx/devices.c | 29 | ||||
-rw-r--r-- | arch/arm/mach-imx/devices.h | 8 | ||||
-rw-r--r-- | arch/arm/mach-imx/eukrea_mbimx27-baseboard.c | 14 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-cpuimx27.c | 13 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-imx27lite.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-mx27_3ds.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-mx27ads.c | 29 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-mxt_td60.c | 17 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-pca100.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-pcm038.c | 17 |
12 files changed, 55 insertions, 110 deletions
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index 0fa8acc94271..3da53557c665 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig | |||
@@ -86,6 +86,7 @@ comment "MX27 platforms:" | |||
86 | config MACH_MX27ADS | 86 | config MACH_MX27ADS |
87 | bool "MX27ADS platform" | 87 | bool "MX27ADS platform" |
88 | select IMX_HAVE_PLATFORM_IMX_I2C | 88 | select IMX_HAVE_PLATFORM_IMX_I2C |
89 | select IMX_HAVE_PLATFORM_IMX_UART | ||
89 | select IMX_HAVE_PLATFORM_MXC_NAND | 90 | select IMX_HAVE_PLATFORM_MXC_NAND |
90 | help | 91 | help |
91 | Include support for MX27ADS platform. This includes specific | 92 | Include support for MX27ADS platform. This includes specific |
@@ -94,6 +95,7 @@ config MACH_MX27ADS | |||
94 | config MACH_PCM038 | 95 | config MACH_PCM038 |
95 | bool "Phytec phyCORE-i.MX27 CPU module (pcm038)" | 96 | bool "Phytec phyCORE-i.MX27 CPU module (pcm038)" |
96 | select IMX_HAVE_PLATFORM_IMX_I2C | 97 | select IMX_HAVE_PLATFORM_IMX_I2C |
98 | select IMX_HAVE_PLATFORM_IMX_UART | ||
97 | select IMX_HAVE_PLATFORM_MXC_NAND | 99 | select IMX_HAVE_PLATFORM_MXC_NAND |
98 | select IMX_HAVE_PLATFORM_SPI_IMX | 100 | select IMX_HAVE_PLATFORM_SPI_IMX |
99 | select MXC_ULPI if USB_ULPI | 101 | select MXC_ULPI if USB_ULPI |
@@ -118,6 +120,7 @@ endchoice | |||
118 | config MACH_CPUIMX27 | 120 | config MACH_CPUIMX27 |
119 | bool "Eukrea CPUIMX27 module" | 121 | bool "Eukrea CPUIMX27 module" |
120 | select IMX_HAVE_PLATFORM_IMX_I2C | 122 | select IMX_HAVE_PLATFORM_IMX_I2C |
123 | select IMX_HAVE_PLATFORM_IMX_UART | ||
121 | select IMX_HAVE_PLATFORM_MXC_NAND | 124 | select IMX_HAVE_PLATFORM_MXC_NAND |
122 | help | 125 | help |
123 | Include support for Eukrea CPUIMX27 platform. This includes | 126 | Include support for Eukrea CPUIMX27 platform. This includes |
@@ -138,6 +141,7 @@ choice | |||
138 | config MACH_EUKREA_MBIMX27_BASEBOARD | 141 | config MACH_EUKREA_MBIMX27_BASEBOARD |
139 | prompt "Eukrea MBIMX27 development board" | 142 | prompt "Eukrea MBIMX27 development board" |
140 | bool | 143 | bool |
144 | select IMX_HAVE_PLATFORM_IMX_UART | ||
141 | select IMX_HAVE_PLATFORM_SPI_IMX | 145 | select IMX_HAVE_PLATFORM_SPI_IMX |
142 | help | 146 | help |
143 | This adds board specific devices that can be found on Eukrea's | 147 | This adds board specific devices that can be found on Eukrea's |
@@ -147,12 +151,14 @@ endchoice | |||
147 | 151 | ||
148 | config MACH_MX27_3DS | 152 | config MACH_MX27_3DS |
149 | bool "MX27PDK platform" | 153 | bool "MX27PDK platform" |
154 | select IMX_HAVE_PLATFORM_IMX_UART | ||
150 | help | 155 | help |
151 | Include support for MX27PDK platform. This includes specific | 156 | Include support for MX27PDK platform. This includes specific |
152 | configurations for the board and its peripherals. | 157 | configurations for the board and its peripherals. |
153 | 158 | ||
154 | config MACH_IMX27LITE | 159 | config MACH_IMX27LITE |
155 | bool "LogicPD MX27 LITEKIT platform" | 160 | bool "LogicPD MX27 LITEKIT platform" |
161 | select IMX_HAVE_PLATFORM_IMX_UART | ||
156 | help | 162 | help |
157 | Include support for MX27 LITEKIT platform. This includes specific | 163 | Include support for MX27 LITEKIT platform. This includes specific |
158 | configurations for the board and its peripherals. | 164 | configurations for the board and its peripherals. |
@@ -160,6 +166,7 @@ config MACH_IMX27LITE | |||
160 | config MACH_PCA100 | 166 | config MACH_PCA100 |
161 | bool "Phytec phyCARD-s (pca100)" | 167 | bool "Phytec phyCARD-s (pca100)" |
162 | select IMX_HAVE_PLATFORM_IMX_I2C | 168 | select IMX_HAVE_PLATFORM_IMX_I2C |
169 | select IMX_HAVE_PLATFORM_IMX_UART | ||
163 | select IMX_HAVE_PLATFORM_MXC_NAND | 170 | select IMX_HAVE_PLATFORM_MXC_NAND |
164 | select IMX_HAVE_PLATFORM_SPI_IMX | 171 | select IMX_HAVE_PLATFORM_SPI_IMX |
165 | select MXC_ULPI if USB_ULPI | 172 | select MXC_ULPI if USB_ULPI |
@@ -170,6 +177,7 @@ config MACH_PCA100 | |||
170 | config MACH_MXT_TD60 | 177 | config MACH_MXT_TD60 |
171 | bool "Maxtrack i-MXT TD60" | 178 | bool "Maxtrack i-MXT TD60" |
172 | select IMX_HAVE_PLATFORM_IMX_I2C | 179 | select IMX_HAVE_PLATFORM_IMX_I2C |
180 | select IMX_HAVE_PLATFORM_IMX_UART | ||
173 | select IMX_HAVE_PLATFORM_MXC_NAND | 181 | select IMX_HAVE_PLATFORM_MXC_NAND |
174 | help | 182 | help |
175 | Include support for i-MXT (aka td60) platform. This | 183 | Include support for i-MXT (aka td60) platform. This |
diff --git a/arch/arm/mach-imx/devices-imx27.h b/arch/arm/mach-imx/devices-imx27.h index 7da1e2bfd4bb..65e7bb7ec2e8 100644 --- a/arch/arm/mach-imx/devices-imx27.h +++ b/arch/arm/mach-imx/devices-imx27.h | |||
@@ -14,6 +14,19 @@ | |||
14 | #define imx27_add_i2c_imx1(pdata) \ | 14 | #define imx27_add_i2c_imx1(pdata) \ |
15 | imx_add_imx_i2c(1, MX27_I2C2_BASE_ADDR, SZ_4K, MX27_INT_I2C2, pdata) | 15 | imx_add_imx_i2c(1, MX27_I2C2_BASE_ADDR, SZ_4K, MX27_INT_I2C2, pdata) |
16 | 16 | ||
17 | #define imx27_add_imx_uart0(pdata) \ | ||
18 | imx_add_imx_uart_1irq(0, MX27_UART1_BASE_ADDR, SZ_4K, MX27_INT_UART1, pdata) | ||
19 | #define imx27_add_imx_uart1(pdata) \ | ||
20 | imx_add_imx_uart_1irq(1, MX27_UART2_BASE_ADDR, SZ_4K, MX27_INT_UART2, pdata) | ||
21 | #define imx27_add_imx_uart2(pdata) \ | ||
22 | imx_add_imx_uart_1irq(2, MX27_UART3_BASE_ADDR, SZ_4K, MX27_INT_UART3, pdata) | ||
23 | #define imx27_add_imx_uart3(pdata) \ | ||
24 | imx_add_imx_uart_1irq(3, MX27_UART4_BASE_ADDR, SZ_4K, MX27_INT_UART4, pdata) | ||
25 | #define imx27_add_imx_uart4(pdata) \ | ||
26 | imx_add_imx_uart_1irq(4, MX27_UART5_BASE_ADDR, SZ_4K, MX27_INT_UART5, pdata) | ||
27 | #define imx27_add_imx_uart5(pdata) \ | ||
28 | imx_add_imx_uart_1irq(5, MX27_UART6_BASE_ADDR, SZ_4K, MX27_INT_UART6, pdata) | ||
29 | |||
17 | #define imx27_add_mxc_nand(pdata) \ | 30 | #define imx27_add_mxc_nand(pdata) \ |
18 | imx_add_mxc_nand_v1(MX27_NFC_BASE_ADDR, MX27_INT_NANDFC, pdata) | 31 | imx_add_mxc_nand_v1(MX27_NFC_BASE_ADDR, MX27_INT_NANDFC, pdata) |
19 | 32 | ||
diff --git a/arch/arm/mach-imx/devices.c b/arch/arm/mach-imx/devices.c index 9ea2ef1b2387..9510687c4be3 100644 --- a/arch/arm/mach-imx/devices.c +++ b/arch/arm/mach-imx/devices.c | |||
@@ -483,35 +483,6 @@ struct platform_device mxc_usbh2 = { | |||
483 | DEFINE_IMX_SSI_DEVICE(0, 1, MX2x_SSI1_BASE_ADDR, MX2x_INT_SSI1); | 483 | DEFINE_IMX_SSI_DEVICE(0, 1, MX2x_SSI1_BASE_ADDR, MX2x_INT_SSI1); |
484 | DEFINE_IMX_SSI_DEVICE(1, 2, MX2x_SSI1_BASE_ADDR, MX2x_INT_SSI1); | 484 | DEFINE_IMX_SSI_DEVICE(1, 2, MX2x_SSI1_BASE_ADDR, MX2x_INT_SSI1); |
485 | 485 | ||
486 | #ifdef CONFIG_MACH_MX27 | ||
487 | #define DEFINE_IMX2x_UART_DEVICE(n, baseaddr, irq) \ | ||
488 | static struct resource imx2x_uart_resources ## n[] = { \ | ||
489 | { \ | ||
490 | .start = baseaddr, \ | ||
491 | .end = baseaddr + 0xb5, \ | ||
492 | .flags = IORESOURCE_MEM, \ | ||
493 | }, { \ | ||
494 | .start = irq, \ | ||
495 | .end = irq, \ | ||
496 | .flags = IORESOURCE_IRQ, \ | ||
497 | }, \ | ||
498 | }; \ | ||
499 | \ | ||
500 | struct platform_device imx2x_uart_device ## n = { \ | ||
501 | .name = "imx-uart", \ | ||
502 | .id = n, \ | ||
503 | .num_resources = ARRAY_SIZE(imx2x_uart_resources ## n), \ | ||
504 | .resource = imx2x_uart_resources ## n, \ | ||
505 | } | ||
506 | |||
507 | DEFINE_IMX2x_UART_DEVICE(0, MX2x_UART1_BASE_ADDR, MX2x_INT_UART1); | ||
508 | DEFINE_IMX2x_UART_DEVICE(1, MX2x_UART2_BASE_ADDR, MX2x_INT_UART2); | ||
509 | DEFINE_IMX2x_UART_DEVICE(2, MX2x_UART3_BASE_ADDR, MX2x_INT_UART3); | ||
510 | DEFINE_IMX2x_UART_DEVICE(3, MX2x_UART4_BASE_ADDR, MX2x_INT_UART4); | ||
511 | DEFINE_IMX2x_UART_DEVICE(4, MX27_UART5_BASE_ADDR, MX27_INT_UART5); | ||
512 | DEFINE_IMX2x_UART_DEVICE(5, MX27_UART6_BASE_ADDR, MX27_INT_UART6); | ||
513 | #endif | ||
514 | |||
515 | /* GPIO port description */ | 486 | /* GPIO port description */ |
516 | #define DEFINE_MXC_GPIO_PORT_IRQ(SOC, n, _irq) \ | 487 | #define DEFINE_MXC_GPIO_PORT_IRQ(SOC, n, _irq) \ |
517 | { \ | 488 | { \ |
diff --git a/arch/arm/mach-imx/devices.h b/arch/arm/mach-imx/devices.h index 13790fbb456d..109f26cd3b1b 100644 --- a/arch/arm/mach-imx/devices.h +++ b/arch/arm/mach-imx/devices.h | |||
@@ -14,14 +14,6 @@ extern struct platform_device mxc_gpt4; | |||
14 | extern struct platform_device mxc_gpt5; | 14 | extern struct platform_device mxc_gpt5; |
15 | #endif | 15 | #endif |
16 | extern struct platform_device mxc_wdt; | 16 | extern struct platform_device mxc_wdt; |
17 | #ifdef CONFIG_MACH_MX27 | ||
18 | extern struct platform_device imx2x_uart_device0; | ||
19 | extern struct platform_device imx2x_uart_device1; | ||
20 | extern struct platform_device imx2x_uart_device2; | ||
21 | extern struct platform_device imx2x_uart_device3; | ||
22 | extern struct platform_device imx2x_uart_device4; | ||
23 | extern struct platform_device imx2x_uart_device5; | ||
24 | #endif | ||
25 | extern struct platform_device mxc_w1_master_device; | 17 | extern struct platform_device mxc_w1_master_device; |
26 | extern struct platform_device mxc_fb_device; | 18 | extern struct platform_device mxc_fb_device; |
27 | extern struct platform_device mxc_fec_device; | 19 | extern struct platform_device mxc_fec_device; |
diff --git a/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c b/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c index eed814371247..1fb34f375b22 100644 --- a/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c +++ b/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c | |||
@@ -32,7 +32,6 @@ | |||
32 | #include <mach/imxfb.h> | 32 | #include <mach/imxfb.h> |
33 | #include <mach/hardware.h> | 33 | #include <mach/hardware.h> |
34 | #include <mach/mmc.h> | 34 | #include <mach/mmc.h> |
35 | #include <mach/imx-uart.h> | ||
36 | 35 | ||
37 | #include "devices-imx27.h" | 36 | #include "devices-imx27.h" |
38 | #include "devices.h" | 37 | #include "devices.h" |
@@ -154,13 +153,8 @@ static struct imx_fb_platform_data eukrea_mbimx27_fb_data = { | |||
154 | .dmacr = 0x00040060, | 153 | .dmacr = 0x00040060, |
155 | }; | 154 | }; |
156 | 155 | ||
157 | static struct imxuart_platform_data uart_pdata[] = { | 156 | static const struct imxuart_platform_data uart_pdata __initconst = { |
158 | { | 157 | .flags = IMXUART_HAVE_RTSCTS, |
159 | .flags = IMXUART_HAVE_RTSCTS, | ||
160 | }, | ||
161 | { | ||
162 | .flags = IMXUART_HAVE_RTSCTS, | ||
163 | }, | ||
164 | }; | 158 | }; |
165 | 159 | ||
166 | #if defined(CONFIG_TOUCHSCREEN_ADS7846) | 160 | #if defined(CONFIG_TOUCHSCREEN_ADS7846) |
@@ -223,8 +217,8 @@ void __init eukrea_mbimx27_baseboard_init(void) | |||
223 | mxc_gpio_setup_multiple_pins(eukrea_mbimx27_pins, | 217 | mxc_gpio_setup_multiple_pins(eukrea_mbimx27_pins, |
224 | ARRAY_SIZE(eukrea_mbimx27_pins), "MBIMX27"); | 218 | ARRAY_SIZE(eukrea_mbimx27_pins), "MBIMX27"); |
225 | 219 | ||
226 | mxc_register_device(&imx2x_uart_device1, &uart_pdata[0]); | 220 | imx27_add_imx_uart1(&uart_pdata); |
227 | mxc_register_device(&imx2x_uart_device2, &uart_pdata[1]); | 221 | imx27_add_imx_uart2(&uart_pdata); |
228 | 222 | ||
229 | mxc_register_device(&mxc_fb_device, &eukrea_mbimx27_fb_data); | 223 | mxc_register_device(&mxc_fb_device, &eukrea_mbimx27_fb_data); |
230 | mxc_register_device(&mxc_sdhc_device0, NULL); | 224 | mxc_register_device(&mxc_sdhc_device0, NULL); |
diff --git a/arch/arm/mach-imx/mach-cpuimx27.c b/arch/arm/mach-imx/mach-cpuimx27.c index 06dcd23f51f7..09cc0c5c2513 100644 --- a/arch/arm/mach-imx/mach-cpuimx27.c +++ b/arch/arm/mach-imx/mach-cpuimx27.c | |||
@@ -36,7 +36,6 @@ | |||
36 | #include <mach/common.h> | 36 | #include <mach/common.h> |
37 | #include <mach/hardware.h> | 37 | #include <mach/hardware.h> |
38 | #include <mach/iomux-mx27.h> | 38 | #include <mach/iomux-mx27.h> |
39 | #include <mach/imx-uart.h> | ||
40 | #include <mach/mxc_nand.h> | 39 | #include <mach/mxc_nand.h> |
41 | 40 | ||
42 | #include "devices-imx27.h" | 41 | #include "devices-imx27.h" |
@@ -111,12 +110,8 @@ static struct platform_device eukrea_cpuimx27_nor_mtd_device = { | |||
111 | .resource = &eukrea_cpuimx27_flash_resource, | 110 | .resource = &eukrea_cpuimx27_flash_resource, |
112 | }; | 111 | }; |
113 | 112 | ||
114 | static struct imxuart_platform_data uart_pdata[] = { | 113 | static const struct imxuart_platform_data uart_pdata __initconst = { |
115 | { | 114 | .flags = IMXUART_HAVE_RTSCTS, |
116 | .flags = IMXUART_HAVE_RTSCTS, | ||
117 | }, { | ||
118 | .flags = IMXUART_HAVE_RTSCTS, | ||
119 | }, | ||
120 | }; | 115 | }; |
121 | 116 | ||
122 | static const struct mxc_nand_platform_data | 117 | static const struct mxc_nand_platform_data |
@@ -188,7 +183,7 @@ static void __init eukrea_cpuimx27_init(void) | |||
188 | mxc_gpio_setup_multiple_pins(eukrea_cpuimx27_pins, | 183 | mxc_gpio_setup_multiple_pins(eukrea_cpuimx27_pins, |
189 | ARRAY_SIZE(eukrea_cpuimx27_pins), "CPUIMX27"); | 184 | ARRAY_SIZE(eukrea_cpuimx27_pins), "CPUIMX27"); |
190 | 185 | ||
191 | mxc_register_device(&imx2x_uart_device0, &uart_pdata[0]); | 186 | imx27_add_imx_uart0(&uart_pdata); |
192 | 187 | ||
193 | imx27_add_mxc_nand(&cpuimx27_nand_board_info); | 188 | imx27_add_mxc_nand(&cpuimx27_nand_board_info); |
194 | 189 | ||
@@ -203,7 +198,7 @@ static void __init eukrea_cpuimx27_init(void) | |||
203 | /* SDHC2 can be used for Wifi */ | 198 | /* SDHC2 can be used for Wifi */ |
204 | mxc_register_device(&mxc_sdhc_device1, NULL); | 199 | mxc_register_device(&mxc_sdhc_device1, NULL); |
205 | /* in which case UART4 is also used for Bluetooth */ | 200 | /* in which case UART4 is also used for Bluetooth */ |
206 | mxc_register_device(&imx2x_uart_device3, &uart_pdata[1]); | 201 | imx27_add_imx_uart3(&uart_pdata); |
207 | #endif | 202 | #endif |
208 | 203 | ||
209 | #if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE) | 204 | #if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE) |
diff --git a/arch/arm/mach-imx/mach-imx27lite.c b/arch/arm/mach-imx/mach-imx27lite.c index 6df5c7d340ba..22a2b5d91213 100644 --- a/arch/arm/mach-imx/mach-imx27lite.c +++ b/arch/arm/mach-imx/mach-imx27lite.c | |||
@@ -22,9 +22,9 @@ | |||
22 | #include <asm/mach/map.h> | 22 | #include <asm/mach/map.h> |
23 | #include <mach/hardware.h> | 23 | #include <mach/hardware.h> |
24 | #include <mach/common.h> | 24 | #include <mach/common.h> |
25 | #include <mach/imx-uart.h> | ||
26 | #include <mach/iomux-mx27.h> | 25 | #include <mach/iomux-mx27.h> |
27 | 26 | ||
27 | #include "devices-imx27.h" | ||
28 | #include "devices.h" | 28 | #include "devices.h" |
29 | 29 | ||
30 | static unsigned int mx27lite_pins[] = { | 30 | static unsigned int mx27lite_pins[] = { |
@@ -54,7 +54,7 @@ static unsigned int mx27lite_pins[] = { | |||
54 | PF23_AIN_FEC_TX_EN, | 54 | PF23_AIN_FEC_TX_EN, |
55 | }; | 55 | }; |
56 | 56 | ||
57 | static struct imxuart_platform_data uart_pdata = { | 57 | static const struct imxuart_platform_data uart_pdata __initconst = { |
58 | .flags = IMXUART_HAVE_RTSCTS, | 58 | .flags = IMXUART_HAVE_RTSCTS, |
59 | }; | 59 | }; |
60 | 60 | ||
@@ -66,7 +66,7 @@ static void __init mx27lite_init(void) | |||
66 | { | 66 | { |
67 | mxc_gpio_setup_multiple_pins(mx27lite_pins, ARRAY_SIZE(mx27lite_pins), | 67 | mxc_gpio_setup_multiple_pins(mx27lite_pins, ARRAY_SIZE(mx27lite_pins), |
68 | "imx27lite"); | 68 | "imx27lite"); |
69 | mxc_register_device(&imx2x_uart_device0, &uart_pdata); | 69 | imx27_add_imx_uart0(&uart_pdata); |
70 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | 70 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); |
71 | } | 71 | } |
72 | 72 | ||
diff --git a/arch/arm/mach-imx/mach-mx27_3ds.c b/arch/arm/mach-imx/mach-mx27_3ds.c index da3eeff4a936..e2a82bab012b 100644 --- a/arch/arm/mach-imx/mach-mx27_3ds.c +++ b/arch/arm/mach-imx/mach-mx27_3ds.c | |||
@@ -27,9 +27,9 @@ | |||
27 | #include <asm/mach/time.h> | 27 | #include <asm/mach/time.h> |
28 | #include <mach/hardware.h> | 28 | #include <mach/hardware.h> |
29 | #include <mach/common.h> | 29 | #include <mach/common.h> |
30 | #include <mach/imx-uart.h> | ||
31 | #include <mach/iomux-mx27.h> | 30 | #include <mach/iomux-mx27.h> |
32 | 31 | ||
32 | #include "devices-imx27.h" | ||
33 | #include "devices.h" | 33 | #include "devices.h" |
34 | 34 | ||
35 | static unsigned int mx27pdk_pins[] = { | 35 | static unsigned int mx27pdk_pins[] = { |
@@ -59,7 +59,7 @@ static unsigned int mx27pdk_pins[] = { | |||
59 | PF23_AIN_FEC_TX_EN, | 59 | PF23_AIN_FEC_TX_EN, |
60 | }; | 60 | }; |
61 | 61 | ||
62 | static struct imxuart_platform_data uart_pdata = { | 62 | static const struct imxuart_platform_data uart_pdata __initconst = { |
63 | .flags = IMXUART_HAVE_RTSCTS, | 63 | .flags = IMXUART_HAVE_RTSCTS, |
64 | }; | 64 | }; |
65 | 65 | ||
@@ -71,7 +71,7 @@ static void __init mx27pdk_init(void) | |||
71 | { | 71 | { |
72 | mxc_gpio_setup_multiple_pins(mx27pdk_pins, ARRAY_SIZE(mx27pdk_pins), | 72 | mxc_gpio_setup_multiple_pins(mx27pdk_pins, ARRAY_SIZE(mx27pdk_pins), |
73 | "mx27pdk"); | 73 | "mx27pdk"); |
74 | mxc_register_device(&imx2x_uart_device0, &uart_pdata); | 74 | imx27_add_imx_uart0(&uart_pdata); |
75 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | 75 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); |
76 | } | 76 | } |
77 | 77 | ||
diff --git a/arch/arm/mach-imx/mach-mx27ads.c b/arch/arm/mach-imx/mach-mx27ads.c index f1ee335ad241..9c77da98a10e 100644 --- a/arch/arm/mach-imx/mach-mx27ads.c +++ b/arch/arm/mach-imx/mach-mx27ads.c | |||
@@ -28,7 +28,6 @@ | |||
28 | #include <asm/mach/time.h> | 28 | #include <asm/mach/time.h> |
29 | #include <asm/mach/map.h> | 29 | #include <asm/mach/map.h> |
30 | #include <mach/gpio.h> | 30 | #include <mach/gpio.h> |
31 | #include <mach/imx-uart.h> | ||
32 | #include <mach/iomux-mx27.h> | 31 | #include <mach/iomux-mx27.h> |
33 | #include <mach/mxc_nand.h> | 32 | #include <mach/mxc_nand.h> |
34 | #include <mach/imxfb.h> | 33 | #include <mach/imxfb.h> |
@@ -289,20 +288,8 @@ static struct platform_device *platform_devices[] __initdata = { | |||
289 | &mxc_w1_master_device, | 288 | &mxc_w1_master_device, |
290 | }; | 289 | }; |
291 | 290 | ||
292 | static struct imxuart_platform_data uart_pdata[] = { | 291 | static const struct imxuart_platform_data uart_pdata __initconst = { |
293 | { | 292 | .flags = IMXUART_HAVE_RTSCTS, |
294 | .flags = IMXUART_HAVE_RTSCTS, | ||
295 | }, { | ||
296 | .flags = IMXUART_HAVE_RTSCTS, | ||
297 | }, { | ||
298 | .flags = IMXUART_HAVE_RTSCTS, | ||
299 | }, { | ||
300 | .flags = IMXUART_HAVE_RTSCTS, | ||
301 | }, { | ||
302 | .flags = IMXUART_HAVE_RTSCTS, | ||
303 | }, { | ||
304 | .flags = IMXUART_HAVE_RTSCTS, | ||
305 | }, | ||
306 | }; | 293 | }; |
307 | 294 | ||
308 | static void __init mx27ads_board_init(void) | 295 | static void __init mx27ads_board_init(void) |
@@ -310,12 +297,12 @@ static void __init mx27ads_board_init(void) | |||
310 | mxc_gpio_setup_multiple_pins(mx27ads_pins, ARRAY_SIZE(mx27ads_pins), | 297 | mxc_gpio_setup_multiple_pins(mx27ads_pins, ARRAY_SIZE(mx27ads_pins), |
311 | "mx27ads"); | 298 | "mx27ads"); |
312 | 299 | ||
313 | mxc_register_device(&imx2x_uart_device0, &uart_pdata[0]); | 300 | imx27_add_imx_uart0(&uart_pdata); |
314 | mxc_register_device(&imx2x_uart_device1, &uart_pdata[1]); | 301 | imx27_add_imx_uart1(&uart_pdata); |
315 | mxc_register_device(&imx2x_uart_device2, &uart_pdata[2]); | 302 | imx27_add_imx_uart2(&uart_pdata); |
316 | mxc_register_device(&imx2x_uart_device3, &uart_pdata[3]); | 303 | imx27_add_imx_uart3(&uart_pdata); |
317 | mxc_register_device(&imx2x_uart_device4, &uart_pdata[4]); | 304 | imx27_add_imx_uart4(&uart_pdata); |
318 | mxc_register_device(&imx2x_uart_device5, &uart_pdata[5]); | 305 | imx27_add_imx_uart5(&uart_pdata); |
319 | imx27_add_mxc_nand(&mx27ads_nand_board_info); | 306 | imx27_add_mxc_nand(&mx27ads_nand_board_info); |
320 | 307 | ||
321 | /* only the i2c master 1 is used on this CPU card */ | 308 | /* only the i2c master 1 is used on this CPU card */ |
diff --git a/arch/arm/mach-imx/mach-mxt_td60.c b/arch/arm/mach-imx/mach-mxt_td60.c index b80b41ea2c76..a3a1e452d4c5 100644 --- a/arch/arm/mach-imx/mach-mxt_td60.c +++ b/arch/arm/mach-imx/mach-mxt_td60.c | |||
@@ -28,7 +28,6 @@ | |||
28 | #include <asm/mach/time.h> | 28 | #include <asm/mach/time.h> |
29 | #include <asm/mach/map.h> | 29 | #include <asm/mach/map.h> |
30 | #include <linux/gpio.h> | 30 | #include <linux/gpio.h> |
31 | #include <mach/imx-uart.h> | ||
32 | #include <mach/iomux-mx27.h> | 31 | #include <mach/iomux-mx27.h> |
33 | #include <mach/mxc_nand.h> | 32 | #include <mach/mxc_nand.h> |
34 | #include <linux/i2c/pca953x.h> | 33 | #include <linux/i2c/pca953x.h> |
@@ -236,14 +235,8 @@ static struct platform_device *platform_devices[] __initdata = { | |||
236 | &mxc_fec_device, | 235 | &mxc_fec_device, |
237 | }; | 236 | }; |
238 | 237 | ||
239 | static struct imxuart_platform_data uart_pdata[] = { | 238 | static const struct imxuart_platform_data uart_pdata __initconst = { |
240 | { | 239 | .flags = IMXUART_HAVE_RTSCTS, |
241 | .flags = IMXUART_HAVE_RTSCTS, | ||
242 | }, { | ||
243 | .flags = IMXUART_HAVE_RTSCTS, | ||
244 | }, { | ||
245 | .flags = IMXUART_HAVE_RTSCTS, | ||
246 | }, | ||
247 | }; | 240 | }; |
248 | 241 | ||
249 | static void __init mxt_td60_board_init(void) | 242 | static void __init mxt_td60_board_init(void) |
@@ -251,9 +244,9 @@ static void __init mxt_td60_board_init(void) | |||
251 | mxc_gpio_setup_multiple_pins(mxt_td60_pins, ARRAY_SIZE(mxt_td60_pins), | 244 | mxc_gpio_setup_multiple_pins(mxt_td60_pins, ARRAY_SIZE(mxt_td60_pins), |
252 | "MXT_TD60"); | 245 | "MXT_TD60"); |
253 | 246 | ||
254 | mxc_register_device(&imx2x_uart_device0, &uart_pdata[0]); | 247 | imx27_add_imx_uart0(&uart_pdata); |
255 | mxc_register_device(&imx2x_uart_device1, &uart_pdata[1]); | 248 | imx27_add_imx_uart1(&uart_pdata); |
256 | mxc_register_device(&imx2x_uart_device2, &uart_pdata[2]); | 249 | imx27_add_imx_uart2(&uart_pdata); |
257 | imx27_add_mxc_nand(&mxt_td60_nand_board_info); | 250 | imx27_add_mxc_nand(&mxt_td60_nand_board_info); |
258 | 251 | ||
259 | i2c_register_board_info(0, mxt_td60_i2c_devices, | 252 | i2c_register_board_info(0, mxt_td60_i2c_devices, |
diff --git a/arch/arm/mach-imx/mach-pca100.c b/arch/arm/mach-imx/mach-pca100.c index 953cc74bb07f..ff3cf1ef31b4 100644 --- a/arch/arm/mach-imx/mach-pca100.c +++ b/arch/arm/mach-imx/mach-pca100.c | |||
@@ -37,7 +37,6 @@ | |||
37 | #include <mach/hardware.h> | 37 | #include <mach/hardware.h> |
38 | #include <mach/iomux-mx27.h> | 38 | #include <mach/iomux-mx27.h> |
39 | #include <asm/mach/time.h> | 39 | #include <asm/mach/time.h> |
40 | #include <mach/imx-uart.h> | ||
41 | #include <mach/audmux.h> | 40 | #include <mach/audmux.h> |
42 | #include <mach/ssi.h> | 41 | #include <mach/ssi.h> |
43 | #include <mach/mxc_nand.h> | 42 | #include <mach/mxc_nand.h> |
@@ -130,7 +129,7 @@ static int pca100_pins[] = { | |||
130 | PD26_AF_USBH2_DATA5, | 129 | PD26_AF_USBH2_DATA5, |
131 | }; | 130 | }; |
132 | 131 | ||
133 | static struct imxuart_platform_data uart_pdata = { | 132 | static const struct imxuart_platform_data uart_pdata __initconst = { |
134 | .flags = IMXUART_HAVE_RTSCTS, | 133 | .flags = IMXUART_HAVE_RTSCTS, |
135 | }; | 134 | }; |
136 | 135 | ||
@@ -318,7 +317,7 @@ static void __init pca100_init(void) | |||
318 | 317 | ||
319 | mxc_register_device(&imx_ssi_device0, &pca100_ssi_pdata); | 318 | mxc_register_device(&imx_ssi_device0, &pca100_ssi_pdata); |
320 | 319 | ||
321 | mxc_register_device(&imx2x_uart_device0, &uart_pdata); | 320 | imx27_add_imx_uart0(&uart_pdata); |
322 | 321 | ||
323 | mxc_gpio_mode(GPIO_PORTC | 29 | GPIO_GPIO | GPIO_IN); | 322 | mxc_gpio_mode(GPIO_PORTC | 29 | GPIO_GPIO | GPIO_IN); |
324 | mxc_register_device(&mxc_sdhc_device1, &sdhc_pdata); | 323 | mxc_register_device(&mxc_sdhc_device1, &sdhc_pdata); |
diff --git a/arch/arm/mach-imx/mach-pcm038.c b/arch/arm/mach-imx/mach-pcm038.c index c09f234f5d08..9212e8f37001 100644 --- a/arch/arm/mach-imx/mach-pcm038.c +++ b/arch/arm/mach-imx/mach-pcm038.c | |||
@@ -36,7 +36,6 @@ | |||
36 | #include <mach/common.h> | 36 | #include <mach/common.h> |
37 | #include <mach/hardware.h> | 37 | #include <mach/hardware.h> |
38 | #include <mach/iomux-mx27.h> | 38 | #include <mach/iomux-mx27.h> |
39 | #include <mach/imx-uart.h> | ||
40 | #include <mach/mxc_nand.h> | 39 | #include <mach/mxc_nand.h> |
41 | #include <mach/mxc_ehci.h> | 40 | #include <mach/mxc_ehci.h> |
42 | #include <mach/ulpi.h> | 41 | #include <mach/ulpi.h> |
@@ -161,14 +160,8 @@ static struct platform_device pcm038_nor_mtd_device = { | |||
161 | .resource = &pcm038_flash_resource, | 160 | .resource = &pcm038_flash_resource, |
162 | }; | 161 | }; |
163 | 162 | ||
164 | static struct imxuart_platform_data uart_pdata[] = { | 163 | static const struct imxuart_platform_data uart_pdata __initconst = { |
165 | { | 164 | .flags = IMXUART_HAVE_RTSCTS, |
166 | .flags = IMXUART_HAVE_RTSCTS, | ||
167 | }, { | ||
168 | .flags = IMXUART_HAVE_RTSCTS, | ||
169 | }, { | ||
170 | .flags = IMXUART_HAVE_RTSCTS, | ||
171 | }, | ||
172 | }; | 165 | }; |
173 | 166 | ||
174 | static const struct mxc_nand_platform_data | 167 | static const struct mxc_nand_platform_data |
@@ -305,9 +298,9 @@ static void __init pcm038_init(void) | |||
305 | 298 | ||
306 | pcm038_init_sram(); | 299 | pcm038_init_sram(); |
307 | 300 | ||
308 | mxc_register_device(&imx2x_uart_device0, &uart_pdata[0]); | 301 | imx27_add_imx_uart0(&uart_pdata); |
309 | mxc_register_device(&imx2x_uart_device1, &uart_pdata[1]); | 302 | imx27_add_imx_uart1(&uart_pdata); |
310 | mxc_register_device(&imx2x_uart_device2, &uart_pdata[2]); | 303 | imx27_add_imx_uart2(&uart_pdata); |
311 | 304 | ||
312 | mxc_gpio_mode(PE16_AF_OWIRE); | 305 | mxc_gpio_mode(PE16_AF_OWIRE); |
313 | imx27_add_mxc_nand(&pcm038_nand_board_info); | 306 | imx27_add_mxc_nand(&pcm038_nand_board_info); |