diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2010-10-29 04:56:07 -0400 |
---|---|---|
committer | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2010-11-17 02:58:13 -0500 |
commit | ae71a5622253708aa08df231e6415fe7a1e96b10 (patch) | |
tree | 4ff6463e9ab3392af9aa5aeb5b0016ec02da2bdb /arch/arm/mach-imx | |
parent | d96801b2ca47cfeddadede7a1998e1fe0eab095c (diff) |
ARM: imx: dynamically allocate mxc_w1 devices
Currently there is no platform data used in the driver. In case this
changes NULL is passed unused to the soc specific functions.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-imx')
-rw-r--r-- | arch/arm/mach-imx/Kconfig | 4 | ||||
-rw-r--r-- | arch/arm/mach-imx/devices-imx21.h | 4 | ||||
-rw-r--r-- | arch/arm/mach-imx/devices-imx27.h | 4 | ||||
-rw-r--r-- | arch/arm/mach-imx/devices.c | 15 | ||||
-rw-r--r-- | arch/arm/mach-imx/devices.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-cpuimx27.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-mx27ads.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-pca100.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-pcm038.c | 2 |
9 files changed, 16 insertions, 20 deletions
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index 197f9e241cff..edf018211002 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig | |||
@@ -88,6 +88,7 @@ config MACH_MX27ADS | |||
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_IMX_UART |
90 | select IMX_HAVE_PLATFORM_MXC_NAND | 90 | select IMX_HAVE_PLATFORM_MXC_NAND |
91 | select IMX_HAVE_PLATFORM_MXC_W1 | ||
91 | help | 92 | help |
92 | Include support for MX27ADS platform. This includes specific | 93 | Include support for MX27ADS platform. This includes specific |
93 | configurations for the board and its peripherals. | 94 | configurations for the board and its peripherals. |
@@ -97,6 +98,7 @@ config MACH_PCM038 | |||
97 | select IMX_HAVE_PLATFORM_IMX_I2C | 98 | select IMX_HAVE_PLATFORM_IMX_I2C |
98 | select IMX_HAVE_PLATFORM_IMX_UART | 99 | select IMX_HAVE_PLATFORM_IMX_UART |
99 | select IMX_HAVE_PLATFORM_MXC_NAND | 100 | select IMX_HAVE_PLATFORM_MXC_NAND |
101 | select IMX_HAVE_PLATFORM_MXC_W1 | ||
100 | select IMX_HAVE_PLATFORM_SPI_IMX | 102 | select IMX_HAVE_PLATFORM_SPI_IMX |
101 | select MXC_ULPI if USB_ULPI | 103 | select MXC_ULPI if USB_ULPI |
102 | help | 104 | help |
@@ -122,6 +124,7 @@ config MACH_CPUIMX27 | |||
122 | select IMX_HAVE_PLATFORM_IMX_I2C | 124 | select IMX_HAVE_PLATFORM_IMX_I2C |
123 | select IMX_HAVE_PLATFORM_IMX_UART | 125 | select IMX_HAVE_PLATFORM_IMX_UART |
124 | select IMX_HAVE_PLATFORM_MXC_NAND | 126 | select IMX_HAVE_PLATFORM_MXC_NAND |
127 | select IMX_HAVE_PLATFORM_MXC_W1 | ||
125 | select MXC_ULPI if USB_ULPI | 128 | select MXC_ULPI if USB_ULPI |
126 | help | 129 | help |
127 | Include support for Eukrea CPUIMX27 platform. This includes | 130 | Include support for Eukrea CPUIMX27 platform. This includes |
@@ -186,6 +189,7 @@ config MACH_PCA100 | |||
186 | select IMX_HAVE_PLATFORM_IMX_SSI | 189 | select IMX_HAVE_PLATFORM_IMX_SSI |
187 | select IMX_HAVE_PLATFORM_IMX_UART | 190 | select IMX_HAVE_PLATFORM_IMX_UART |
188 | select IMX_HAVE_PLATFORM_MXC_NAND | 191 | select IMX_HAVE_PLATFORM_MXC_NAND |
192 | select IMX_HAVE_PLATFORM_MXC_W1 | ||
189 | select IMX_HAVE_PLATFORM_SPI_IMX | 193 | select IMX_HAVE_PLATFORM_SPI_IMX |
190 | select MXC_ULPI if USB_ULPI | 194 | select MXC_ULPI if USB_ULPI |
191 | help | 195 | help |
diff --git a/arch/arm/mach-imx/devices-imx21.h b/arch/arm/mach-imx/devices-imx21.h index d189039749b0..61b0aa7fce98 100644 --- a/arch/arm/mach-imx/devices-imx21.h +++ b/arch/arm/mach-imx/devices-imx21.h | |||
@@ -29,6 +29,10 @@ extern const struct imx_mxc_nand_data imx21_mxc_nand_data __initconst; | |||
29 | #define imx21_add_mxc_nand(pdata) \ | 29 | #define imx21_add_mxc_nand(pdata) \ |
30 | imx_add_mxc_nand(&imx21_mxc_nand_data, pdata) | 30 | imx_add_mxc_nand(&imx21_mxc_nand_data, pdata) |
31 | 31 | ||
32 | extern const struct imx_mxc_w1_data imx21_mxc_w1_data __initconst; | ||
33 | #define imx21_add_mxc_w1(pdata) \ | ||
34 | imx_add_mxc_w1(&imx21_mxc_w1_data) | ||
35 | |||
32 | extern const struct imx_spi_imx_data imx21_cspi_data[] __initconst; | 36 | extern const struct imx_spi_imx_data imx21_cspi_data[] __initconst; |
33 | #define imx21_add_cspi(id, pdata) \ | 37 | #define imx21_add_cspi(id, pdata) \ |
34 | imx_add_spi_imx(&imx21_cspi_data[id], pdata) | 38 | imx_add_spi_imx(&imx21_cspi_data[id], pdata) |
diff --git a/arch/arm/mach-imx/devices-imx27.h b/arch/arm/mach-imx/devices-imx27.h index 7011690364f2..b957e78e052b 100644 --- a/arch/arm/mach-imx/devices-imx27.h +++ b/arch/arm/mach-imx/devices-imx27.h | |||
@@ -35,6 +35,10 @@ extern const struct imx_mxc_nand_data imx27_mxc_nand_data __initconst; | |||
35 | #define imx27_add_mxc_nand(pdata) \ | 35 | #define imx27_add_mxc_nand(pdata) \ |
36 | imx_add_mxc_nand(&imx27_mxc_nand_data, pdata) | 36 | imx_add_mxc_nand(&imx27_mxc_nand_data, pdata) |
37 | 37 | ||
38 | extern const struct imx_mxc_w1_data imx27_mxc_w1_data __initconst; | ||
39 | #define imx27_add_mxc_w1(pdata) \ | ||
40 | imx_add_mxc_w1(&imx27_mxc_w1_data) | ||
41 | |||
38 | extern const struct imx_spi_imx_data imx27_cspi_data[] __initconst; | 42 | extern const struct imx_spi_imx_data imx27_cspi_data[] __initconst; |
39 | #define imx27_add_cspi(id, pdata) \ | 43 | #define imx27_add_cspi(id, pdata) \ |
40 | imx_add_spi_imx(&imx27_cspi_data[id], pdata) | 44 | imx_add_spi_imx(&imx27_cspi_data[id], pdata) |
diff --git a/arch/arm/mach-imx/devices.c b/arch/arm/mach-imx/devices.c index e69e46eac45d..6fbd624fc530 100644 --- a/arch/arm/mach-imx/devices.c +++ b/arch/arm/mach-imx/devices.c | |||
@@ -270,21 +270,6 @@ struct platform_device mxc_wdt = { | |||
270 | .resource = mxc_wdt_resources, | 270 | .resource = mxc_wdt_resources, |
271 | }; | 271 | }; |
272 | 272 | ||
273 | static struct resource mxc_w1_master_resources[] = { | ||
274 | { | ||
275 | .start = MX2x_OWIRE_BASE_ADDR, | ||
276 | .end = MX2x_OWIRE_BASE_ADDR + SZ_4K - 1, | ||
277 | .flags = IORESOURCE_MEM, | ||
278 | }, | ||
279 | }; | ||
280 | |||
281 | struct platform_device mxc_w1_master_device = { | ||
282 | .name = "mxc_w1", | ||
283 | .id = 0, | ||
284 | .num_resources = ARRAY_SIZE(mxc_w1_master_resources), | ||
285 | .resource = mxc_w1_master_resources, | ||
286 | }; | ||
287 | |||
288 | /* | 273 | /* |
289 | * lcdc: | 274 | * lcdc: |
290 | * - i.MX1: the basic controller | 275 | * - i.MX1: the basic controller |
diff --git a/arch/arm/mach-imx/devices.h b/arch/arm/mach-imx/devices.h index 807f02a031c9..48d2c5b8c164 100644 --- a/arch/arm/mach-imx/devices.h +++ b/arch/arm/mach-imx/devices.h | |||
@@ -14,7 +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 | extern struct platform_device mxc_w1_master_device; | ||
18 | extern struct platform_device mxc_fb_device; | 17 | extern struct platform_device mxc_fb_device; |
19 | extern struct platform_device mxc_pwm_device; | 18 | extern struct platform_device mxc_pwm_device; |
20 | extern struct platform_device mxc_sdhc_device0; | 19 | extern struct platform_device mxc_sdhc_device0; |
diff --git a/arch/arm/mach-imx/mach-cpuimx27.c b/arch/arm/mach-imx/mach-cpuimx27.c index 745ee60fb068..9baaf3df048e 100644 --- a/arch/arm/mach-imx/mach-cpuimx27.c +++ b/arch/arm/mach-imx/mach-cpuimx27.c | |||
@@ -158,7 +158,6 @@ cpuimx27_nand_board_info __initconst = { | |||
158 | static struct platform_device *platform_devices[] __initdata = { | 158 | static struct platform_device *platform_devices[] __initdata = { |
159 | &eukrea_cpuimx27_nor_mtd_device, | 159 | &eukrea_cpuimx27_nor_mtd_device, |
160 | &mxc_wdt, | 160 | &mxc_wdt, |
161 | &mxc_w1_master_device, | ||
162 | }; | 161 | }; |
163 | 162 | ||
164 | static const struct imxi2c_platform_data cpuimx27_i2c1_data __initconst = { | 163 | static const struct imxi2c_platform_data cpuimx27_i2c1_data __initconst = { |
@@ -262,6 +261,7 @@ static void __init eukrea_cpuimx27_init(void) | |||
262 | 261 | ||
263 | imx27_add_fec(NULL); | 262 | imx27_add_fec(NULL); |
264 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | 263 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); |
264 | imx27_add_mxc_w1(NULL); | ||
265 | 265 | ||
266 | #if defined(CONFIG_MACH_EUKREA_CPUIMX27_USESDHC2) | 266 | #if defined(CONFIG_MACH_EUKREA_CPUIMX27_USESDHC2) |
267 | /* SDHC2 can be used for Wifi */ | 267 | /* SDHC2 can be used for Wifi */ |
diff --git a/arch/arm/mach-imx/mach-mx27ads.c b/arch/arm/mach-imx/mach-mx27ads.c index a1e4bc573afc..219899a5c8ab 100644 --- a/arch/arm/mach-imx/mach-mx27ads.c +++ b/arch/arm/mach-imx/mach-mx27ads.c | |||
@@ -284,7 +284,6 @@ static struct imxmmc_platform_data sdhc2_pdata = { | |||
284 | 284 | ||
285 | static struct platform_device *platform_devices[] __initdata = { | 285 | static struct platform_device *platform_devices[] __initdata = { |
286 | &mx27ads_nor_mtd_device, | 286 | &mx27ads_nor_mtd_device, |
287 | &mxc_w1_master_device, | ||
288 | }; | 287 | }; |
289 | 288 | ||
290 | static const struct imxuart_platform_data uart_pdata __initconst = { | 289 | static const struct imxuart_platform_data uart_pdata __initconst = { |
@@ -314,6 +313,7 @@ static void __init mx27ads_board_init(void) | |||
314 | 313 | ||
315 | imx27_add_fec(NULL); | 314 | imx27_add_fec(NULL); |
316 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | 315 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); |
316 | imx27_add_mxc_w1(NULL); | ||
317 | } | 317 | } |
318 | 318 | ||
319 | static void __init mx27ads_timer_init(void) | 319 | static void __init mx27ads_timer_init(void) |
diff --git a/arch/arm/mach-imx/mach-pca100.c b/arch/arm/mach-imx/mach-pca100.c index 8c720d44602a..39c580bc9225 100644 --- a/arch/arm/mach-imx/mach-pca100.c +++ b/arch/arm/mach-imx/mach-pca100.c | |||
@@ -172,7 +172,6 @@ pca100_nand_board_info __initconst = { | |||
172 | }; | 172 | }; |
173 | 173 | ||
174 | static struct platform_device *platform_devices[] __initdata = { | 174 | static struct platform_device *platform_devices[] __initdata = { |
175 | &mxc_w1_master_device, | ||
176 | &mxc_wdt, | 175 | &mxc_wdt, |
177 | }; | 176 | }; |
178 | 177 | ||
@@ -434,6 +433,7 @@ static void __init pca100_init(void) | |||
434 | 433 | ||
435 | imx27_add_fec(NULL); | 434 | imx27_add_fec(NULL); |
436 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | 435 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); |
436 | imx27_add_mxc_w1(NULL); | ||
437 | } | 437 | } |
438 | 438 | ||
439 | static void __init pca100_timer_init(void) | 439 | static void __init pca100_timer_init(void) |
diff --git a/arch/arm/mach-imx/mach-pcm038.c b/arch/arm/mach-imx/mach-pcm038.c index 49a97ce07426..2cfc4b96c503 100644 --- a/arch/arm/mach-imx/mach-pcm038.c +++ b/arch/arm/mach-imx/mach-pcm038.c | |||
@@ -172,7 +172,6 @@ pcm038_nand_board_info __initconst = { | |||
172 | 172 | ||
173 | static struct platform_device *platform_devices[] __initdata = { | 173 | static struct platform_device *platform_devices[] __initdata = { |
174 | &pcm038_nor_mtd_device, | 174 | &pcm038_nor_mtd_device, |
175 | &mxc_w1_master_device, | ||
176 | &pcm038_sram_mtd_device, | 175 | &pcm038_sram_mtd_device, |
177 | &mxc_wdt, | 176 | &mxc_wdt, |
178 | }; | 177 | }; |
@@ -326,6 +325,7 @@ static void __init pcm038_init(void) | |||
326 | 325 | ||
327 | imx27_add_fec(NULL); | 326 | imx27_add_fec(NULL); |
328 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | 327 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); |
328 | imx27_add_mxc_w1(NULL); | ||
329 | 329 | ||
330 | #ifdef CONFIG_MACH_PCM970_BASEBOARD | 330 | #ifdef CONFIG_MACH_PCM970_BASEBOARD |
331 | pcm970_baseboard_init(); | 331 | pcm970_baseboard_init(); |