diff options
-rw-r--r-- | arch/arm/mach-imx/Kconfig | 5 | ||||
-rw-r--r-- | arch/arm/mach-imx/devices-imx27.h | 13 | ||||
-rw-r--r-- | arch/arm/mach-imx/devices.c | 24 | ||||
-rw-r--r-- | arch/arm/mach-imx/devices.h | 3 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-cpuimx27.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-mx27ads.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-mxt_td60.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-pca100.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-pcm038.c | 6 |
9 files changed, 38 insertions, 38 deletions
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index 23671824abd9..5af1c22112a7 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig | |||
@@ -81,12 +81,14 @@ comment "MX27 platforms:" | |||
81 | 81 | ||
82 | config MACH_MX27ADS | 82 | config MACH_MX27ADS |
83 | bool "MX27ADS platform" | 83 | bool "MX27ADS platform" |
84 | select IMX_HAVE_PLATFORM_MXC_NAND | ||
84 | help | 85 | help |
85 | Include support for MX27ADS platform. This includes specific | 86 | Include support for MX27ADS platform. This includes specific |
86 | configurations for the board and its peripherals. | 87 | configurations for the board and its peripherals. |
87 | 88 | ||
88 | config MACH_PCM038 | 89 | config MACH_PCM038 |
89 | bool "Phytec phyCORE-i.MX27 CPU module (pcm038)" | 90 | bool "Phytec phyCORE-i.MX27 CPU module (pcm038)" |
91 | select IMX_HAVE_PLATFORM_MXC_NAND | ||
90 | select MXC_ULPI if USB_ULPI | 92 | select MXC_ULPI if USB_ULPI |
91 | help | 93 | help |
92 | Include support for phyCORE-i.MX27 (aka pcm038) platform. This | 94 | Include support for phyCORE-i.MX27 (aka pcm038) platform. This |
@@ -108,6 +110,7 @@ endchoice | |||
108 | 110 | ||
109 | config MACH_CPUIMX27 | 111 | config MACH_CPUIMX27 |
110 | bool "Eukrea CPUIMX27 module" | 112 | bool "Eukrea CPUIMX27 module" |
113 | select IMX_HAVE_PLATFORM_MXC_NAND | ||
111 | help | 114 | help |
112 | Include support for Eukrea CPUIMX27 platform. This includes | 115 | Include support for Eukrea CPUIMX27 platform. This includes |
113 | specific configurations for the module and its peripherals. | 116 | specific configurations for the module and its peripherals. |
@@ -147,6 +150,7 @@ config MACH_IMX27LITE | |||
147 | 150 | ||
148 | config MACH_PCA100 | 151 | config MACH_PCA100 |
149 | bool "Phytec phyCARD-s (pca100)" | 152 | bool "Phytec phyCARD-s (pca100)" |
153 | select IMX_HAVE_PLATFORM_MXC_NAND | ||
150 | select MXC_ULPI if USB_ULPI | 154 | select MXC_ULPI if USB_ULPI |
151 | help | 155 | help |
152 | Include support for phyCARD-s (aka pca100) platform. This | 156 | Include support for phyCARD-s (aka pca100) platform. This |
@@ -154,6 +158,7 @@ config MACH_PCA100 | |||
154 | 158 | ||
155 | config MACH_MXT_TD60 | 159 | config MACH_MXT_TD60 |
156 | bool "Maxtrack i-MXT TD60" | 160 | bool "Maxtrack i-MXT TD60" |
161 | select IMX_HAVE_PLATFORM_MXC_NAND | ||
157 | help | 162 | help |
158 | Include support for i-MXT (aka td60) platform. This | 163 | Include support for i-MXT (aka td60) platform. This |
159 | includes specific configurations for the module and its peripherals. | 164 | includes specific configurations for the module and its peripherals. |
diff --git a/arch/arm/mach-imx/devices-imx27.h b/arch/arm/mach-imx/devices-imx27.h new file mode 100644 index 000000000000..b2f6a12c88d5 --- /dev/null +++ b/arch/arm/mach-imx/devices-imx27.h | |||
@@ -0,0 +1,13 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Pengutronix | ||
3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it under | ||
6 | * the terms of the GNU General Public License version 2 as published by the | ||
7 | * Free Software Foundation. | ||
8 | */ | ||
9 | #include <mach/mx27.h> | ||
10 | #include <mach/devices-common.h> | ||
11 | |||
12 | #define imx27_add_mxc_nand(pdata) \ | ||
13 | imx_add_mxc_nand_v1(MX27_NFC_BASE_ADDR, MX27_INT_NANDFC, pdata) | ||
diff --git a/arch/arm/mach-imx/devices.c b/arch/arm/mach-imx/devices.c index dbd1460e46cf..3a599e94a65c 100644 --- a/arch/arm/mach-imx/devices.c +++ b/arch/arm/mach-imx/devices.c | |||
@@ -337,30 +337,6 @@ struct platform_device mxc_w1_master_device = { | |||
337 | .resource = mxc_w1_master_resources, | 337 | .resource = mxc_w1_master_resources, |
338 | }; | 338 | }; |
339 | 339 | ||
340 | #define DEFINE_MXC_NAND_DEVICE(pfx, baseaddr, irq) \ | ||
341 | static struct resource pfx ## _nand_resources[] = { \ | ||
342 | { \ | ||
343 | .start = baseaddr, \ | ||
344 | .end = baseaddr + SZ_4K - 1, \ | ||
345 | .flags = IORESOURCE_MEM, \ | ||
346 | }, { \ | ||
347 | .start = irq, \ | ||
348 | .end = irq, \ | ||
349 | .flags = IORESOURCE_IRQ, \ | ||
350 | }, \ | ||
351 | }; \ | ||
352 | \ | ||
353 | struct platform_device pfx ## _nand_device = { \ | ||
354 | .name = "mxc_nand", \ | ||
355 | .id = 0, \ | ||
356 | .num_resources = ARRAY_SIZE(pfx ## _nand_resources), \ | ||
357 | .resource = pfx ## _nand_resources, \ | ||
358 | } | ||
359 | |||
360 | #ifdef CONFIG_MACH_MX27 | ||
361 | DEFINE_MXC_NAND_DEVICE(imx27, MX27_NFC_BASE_ADDR, MX27_INT_NANDFC); | ||
362 | #endif | ||
363 | |||
364 | /* | 340 | /* |
365 | * lcdc: | 341 | * lcdc: |
366 | * - i.MX1: the basic controller | 342 | * - i.MX1: the basic controller |
diff --git a/arch/arm/mach-imx/devices.h b/arch/arm/mach-imx/devices.h index d3c381f2c74f..4ce7eef943f6 100644 --- a/arch/arm/mach-imx/devices.h +++ b/arch/arm/mach-imx/devices.h | |||
@@ -26,9 +26,6 @@ extern struct platform_device imx2x_uart_device4; | |||
26 | extern struct platform_device imx2x_uart_device5; | 26 | extern struct platform_device imx2x_uart_device5; |
27 | #endif | 27 | #endif |
28 | extern struct platform_device mxc_w1_master_device; | 28 | extern struct platform_device mxc_w1_master_device; |
29 | #ifdef CONFIG_MACH_MX27 | ||
30 | extern struct platform_device imx27_nand_device; | ||
31 | #endif | ||
32 | extern struct platform_device mxc_fb_device; | 29 | extern struct platform_device mxc_fb_device; |
33 | extern struct platform_device mxc_fec_device; | 30 | extern struct platform_device mxc_fec_device; |
34 | extern struct platform_device mxc_pwm_device; | 31 | extern struct platform_device mxc_pwm_device; |
diff --git a/arch/arm/mach-imx/mach-cpuimx27.c b/arch/arm/mach-imx/mach-cpuimx27.c index 866a99a337f2..5d07c2ab4711 100644 --- a/arch/arm/mach-imx/mach-cpuimx27.c +++ b/arch/arm/mach-imx/mach-cpuimx27.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <mach/imx-uart.h> | 40 | #include <mach/imx-uart.h> |
41 | #include <mach/mxc_nand.h> | 41 | #include <mach/mxc_nand.h> |
42 | 42 | ||
43 | #include "devices-imx27.h" | ||
43 | #include "devices.h" | 44 | #include "devices.h" |
44 | 45 | ||
45 | static int eukrea_cpuimx27_pins[] = { | 46 | static int eukrea_cpuimx27_pins[] = { |
@@ -119,7 +120,8 @@ static struct imxuart_platform_data uart_pdata[] = { | |||
119 | }, | 120 | }, |
120 | }; | 121 | }; |
121 | 122 | ||
122 | static struct mxc_nand_platform_data eukrea_cpuimx27_nand_board_info = { | 123 | static const struct mxc_nand_platform_data |
124 | cpuimx27_nand_board_info __initconst = { | ||
123 | .width = 1, | 125 | .width = 1, |
124 | .hw_ecc = 1, | 126 | .hw_ecc = 1, |
125 | }; | 127 | }; |
@@ -189,8 +191,7 @@ static void __init eukrea_cpuimx27_init(void) | |||
189 | 191 | ||
190 | mxc_register_device(&imx2x_uart_device0, &uart_pdata[0]); | 192 | mxc_register_device(&imx2x_uart_device0, &uart_pdata[0]); |
191 | 193 | ||
192 | mxc_register_device(&imx27_nand_device, | 194 | imx27_add_mxc_nand(&cpuimx27_nand_board_info); |
193 | &eukrea_cpuimx27_nand_board_info); | ||
194 | 195 | ||
195 | i2c_register_board_info(0, eukrea_cpuimx27_i2c_devices, | 196 | i2c_register_board_info(0, eukrea_cpuimx27_i2c_devices, |
196 | ARRAY_SIZE(eukrea_cpuimx27_i2c_devices)); | 197 | ARRAY_SIZE(eukrea_cpuimx27_i2c_devices)); |
diff --git a/arch/arm/mach-imx/mach-mx27ads.c b/arch/arm/mach-imx/mach-mx27ads.c index 186b93a8c08e..1a3ebf5dab26 100644 --- a/arch/arm/mach-imx/mach-mx27ads.c +++ b/arch/arm/mach-imx/mach-mx27ads.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <mach/imxfb.h> | 35 | #include <mach/imxfb.h> |
36 | #include <mach/mmc.h> | 36 | #include <mach/mmc.h> |
37 | 37 | ||
38 | #include "devices-imx27.h" | ||
38 | #include "devices.h" | 39 | #include "devices.h" |
39 | 40 | ||
40 | /* | 41 | /* |
@@ -166,7 +167,8 @@ static unsigned int mx27ads_pins[] = { | |||
166 | PB9_PF_SD2_CLK, | 167 | PB9_PF_SD2_CLK, |
167 | }; | 168 | }; |
168 | 169 | ||
169 | static struct mxc_nand_platform_data mx27ads_nand_board_info = { | 170 | static const struct mxc_nand_platform_data |
171 | mx27ads_nand_board_info __initconst = { | ||
170 | .width = 1, | 172 | .width = 1, |
171 | .hw_ecc = 1, | 173 | .hw_ecc = 1, |
172 | }; | 174 | }; |
@@ -315,7 +317,7 @@ static void __init mx27ads_board_init(void) | |||
315 | mxc_register_device(&imx2x_uart_device3, &uart_pdata[3]); | 317 | mxc_register_device(&imx2x_uart_device3, &uart_pdata[3]); |
316 | mxc_register_device(&imx2x_uart_device4, &uart_pdata[4]); | 318 | mxc_register_device(&imx2x_uart_device4, &uart_pdata[4]); |
317 | mxc_register_device(&imx2x_uart_device5, &uart_pdata[5]); | 319 | mxc_register_device(&imx2x_uart_device5, &uart_pdata[5]); |
318 | mxc_register_device(&imx27_nand_device, &mx27ads_nand_board_info); | 320 | imx27_add_mxc_nand(&mx27ads_nand_board_info); |
319 | 321 | ||
320 | /* only the i2c master 1 is used on this CPU card */ | 322 | /* only the i2c master 1 is used on this CPU card */ |
321 | i2c_register_board_info(1, mx27ads_i2c_devices, | 323 | i2c_register_board_info(1, mx27ads_i2c_devices, |
diff --git a/arch/arm/mach-imx/mach-mxt_td60.c b/arch/arm/mach-imx/mach-mxt_td60.c index 0e5ddbabcba6..447c68fe4383 100644 --- a/arch/arm/mach-imx/mach-mxt_td60.c +++ b/arch/arm/mach-imx/mach-mxt_td60.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <mach/imxfb.h> | 36 | #include <mach/imxfb.h> |
37 | #include <mach/mmc.h> | 37 | #include <mach/mmc.h> |
38 | 38 | ||
39 | #include "devices-imx27.h" | ||
39 | #include "devices.h" | 40 | #include "devices.h" |
40 | 41 | ||
41 | static unsigned int mxt_td60_pins[] __initdata = { | 42 | static unsigned int mxt_td60_pins[] __initdata = { |
@@ -124,7 +125,8 @@ static unsigned int mxt_td60_pins[] __initdata = { | |||
124 | PB9_PF_SD2_CLK, | 125 | PB9_PF_SD2_CLK, |
125 | }; | 126 | }; |
126 | 127 | ||
127 | static struct mxc_nand_platform_data mxt_td60_nand_board_info = { | 128 | static const struct mxc_nand_platform_data |
129 | mxt_td60_nand_board_info __initconst = { | ||
128 | .width = 1, | 130 | .width = 1, |
129 | .hw_ecc = 1, | 131 | .hw_ecc = 1, |
130 | }; | 132 | }; |
@@ -253,7 +255,7 @@ static void __init mxt_td60_board_init(void) | |||
253 | mxc_register_device(&imx2x_uart_device0, &uart_pdata[0]); | 255 | mxc_register_device(&imx2x_uart_device0, &uart_pdata[0]); |
254 | mxc_register_device(&imx2x_uart_device1, &uart_pdata[1]); | 256 | mxc_register_device(&imx2x_uart_device1, &uart_pdata[1]); |
255 | mxc_register_device(&imx2x_uart_device2, &uart_pdata[2]); | 257 | mxc_register_device(&imx2x_uart_device2, &uart_pdata[2]); |
256 | mxc_register_device(&imx27_nand_device, &mxt_td60_nand_board_info); | 258 | imx27_add_mxc_nand(&mxt_td60_nand_board_info); |
257 | 259 | ||
258 | i2c_register_board_info(0, mxt_td60_i2c_devices, | 260 | i2c_register_board_info(0, mxt_td60_i2c_devices, |
259 | ARRAY_SIZE(mxt_td60_i2c_devices)); | 261 | ARRAY_SIZE(mxt_td60_i2c_devices)); |
diff --git a/arch/arm/mach-imx/mach-pca100.c b/arch/arm/mach-imx/mach-pca100.c index 984c4caeebdc..6efbc6e13be9 100644 --- a/arch/arm/mach-imx/mach-pca100.c +++ b/arch/arm/mach-imx/mach-pca100.c | |||
@@ -50,6 +50,7 @@ | |||
50 | #include <mach/mxc_ehci.h> | 50 | #include <mach/mxc_ehci.h> |
51 | #include <mach/ulpi.h> | 51 | #include <mach/ulpi.h> |
52 | 52 | ||
53 | #include "devices-imx27.h" | ||
53 | #include "devices.h" | 54 | #include "devices.h" |
54 | 55 | ||
55 | #define OTG_PHY_CS_GPIO (GPIO_PORTB + 23) | 56 | #define OTG_PHY_CS_GPIO (GPIO_PORTB + 23) |
@@ -137,7 +138,8 @@ static struct imxuart_platform_data uart_pdata = { | |||
137 | .flags = IMXUART_HAVE_RTSCTS, | 138 | .flags = IMXUART_HAVE_RTSCTS, |
138 | }; | 139 | }; |
139 | 140 | ||
140 | static struct mxc_nand_platform_data pca100_nand_board_info = { | 141 | static const struct mxc_nand_platform_data |
142 | pca100_nand_board_info __initconst = { | ||
141 | .width = 1, | 143 | .width = 1, |
142 | .hw_ecc = 1, | 144 | .hw_ecc = 1, |
143 | }; | 145 | }; |
@@ -325,7 +327,7 @@ static void __init pca100_init(void) | |||
325 | mxc_gpio_mode(GPIO_PORTC | 29 | GPIO_GPIO | GPIO_IN); | 327 | mxc_gpio_mode(GPIO_PORTC | 29 | GPIO_GPIO | GPIO_IN); |
326 | mxc_register_device(&mxc_sdhc_device1, &sdhc_pdata); | 328 | mxc_register_device(&mxc_sdhc_device1, &sdhc_pdata); |
327 | 329 | ||
328 | mxc_register_device(&imx27_nand_device, &pca100_nand_board_info); | 330 | imx27_add_mxc_nand(&pca100_nand_board_info); |
329 | 331 | ||
330 | /* only the i2c master 1 is used on this CPU card */ | 332 | /* only the i2c master 1 is used on this CPU card */ |
331 | i2c_register_board_info(1, pca100_i2c_devices, | 333 | i2c_register_board_info(1, pca100_i2c_devices, |
diff --git a/arch/arm/mach-imx/mach-pcm038.c b/arch/arm/mach-imx/mach-pcm038.c index b6a15bac0c3d..bc44d6faf47d 100644 --- a/arch/arm/mach-imx/mach-pcm038.c +++ b/arch/arm/mach-imx/mach-pcm038.c | |||
@@ -43,6 +43,7 @@ | |||
43 | #include <mach/mxc_ehci.h> | 43 | #include <mach/mxc_ehci.h> |
44 | #include <mach/ulpi.h> | 44 | #include <mach/ulpi.h> |
45 | 45 | ||
46 | #include "devices-imx27.h" | ||
46 | #include "devices.h" | 47 | #include "devices.h" |
47 | 48 | ||
48 | static int pcm038_pins[] = { | 49 | static int pcm038_pins[] = { |
@@ -172,7 +173,8 @@ static struct imxuart_platform_data uart_pdata[] = { | |||
172 | }, | 173 | }, |
173 | }; | 174 | }; |
174 | 175 | ||
175 | static struct mxc_nand_platform_data pcm038_nand_board_info = { | 176 | static const struct mxc_nand_platform_data |
177 | pcm038_nand_board_info __initconst = { | ||
176 | .width = 1, | 178 | .width = 1, |
177 | .hw_ecc = 1, | 179 | .hw_ecc = 1, |
178 | }; | 180 | }; |
@@ -310,7 +312,7 @@ static void __init pcm038_init(void) | |||
310 | mxc_register_device(&imx2x_uart_device2, &uart_pdata[2]); | 312 | mxc_register_device(&imx2x_uart_device2, &uart_pdata[2]); |
311 | 313 | ||
312 | mxc_gpio_mode(PE16_AF_OWIRE); | 314 | mxc_gpio_mode(PE16_AF_OWIRE); |
313 | mxc_register_device(&imx27_nand_device, &pcm038_nand_board_info); | 315 | imx27_add_mxc_nand(&pcm038_nand_board_info); |
314 | 316 | ||
315 | /* only the i2c master 1 is used on this CPU card */ | 317 | /* only the i2c master 1 is used on this CPU card */ |
316 | i2c_register_board_info(1, pcm038_i2c_devices, | 318 | i2c_register_board_info(1, pcm038_i2c_devices, |