aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-imx/Kconfig4
-rw-r--r--arch/arm/mach-imx/devices-imx21.h4
-rw-r--r--arch/arm/mach-imx/devices-imx27.h4
-rw-r--r--arch/arm/mach-imx/devices.c15
-rw-r--r--arch/arm/mach-imx/devices.h1
-rw-r--r--arch/arm/mach-imx/mach-cpuimx27.c2
-rw-r--r--arch/arm/mach-imx/mach-mx27ads.c2
-rw-r--r--arch/arm/mach-imx/mach-pca100.c2
-rw-r--r--arch/arm/mach-imx/mach-pcm038.c2
-rw-r--r--arch/arm/mach-mx3/Kconfig1
-rw-r--r--arch/arm/mach-mx3/devices-imx31.h4
-rw-r--r--arch/arm/mach-mx3/devices-imx35.h4
-rw-r--r--arch/arm/mach-mx3/devices.c15
-rw-r--r--arch/arm/mach-mx3/devices.h1
-rw-r--r--arch/arm/mach-mx3/mach-pcm037.c2
-rw-r--r--arch/arm/plat-mxc/devices/Kconfig3
-rw-r--r--arch/arm/plat-mxc/devices/Makefile1
-rw-r--r--arch/arm/plat-mxc/devices/platform-mxc_w1.c50
-rw-r--r--arch/arm/plat-mxc/include/mach/devices-common.h6
19 files changed, 86 insertions, 37 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
32extern 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
32extern const struct imx_spi_imx_data imx21_cspi_data[] __initconst; 36extern 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
38extern 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
38extern const struct imx_spi_imx_data imx27_cspi_data[] __initconst; 42extern 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
273static 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
281struct 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;
14extern struct platform_device mxc_gpt5; 14extern struct platform_device mxc_gpt5;
15#endif 15#endif
16extern struct platform_device mxc_wdt; 16extern struct platform_device mxc_wdt;
17extern struct platform_device mxc_w1_master_device;
18extern struct platform_device mxc_fb_device; 17extern struct platform_device mxc_fb_device;
19extern struct platform_device mxc_pwm_device; 18extern struct platform_device mxc_pwm_device;
20extern struct platform_device mxc_sdhc_device0; 19extern 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 = {
158static struct platform_device *platform_devices[] __initdata = { 158static 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
164static const struct imxi2c_platform_data cpuimx27_i2c1_data __initconst = { 163static 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
285static struct platform_device *platform_devices[] __initdata = { 285static 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
290static const struct imxuart_platform_data uart_pdata __initconst = { 289static 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
319static void __init mx27ads_timer_init(void) 319static 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
174static struct platform_device *platform_devices[] __initdata = { 174static 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
439static void __init pca100_timer_init(void) 439static 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
173static struct platform_device *platform_devices[] __initdata = { 173static 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();
diff --git a/arch/arm/mach-mx3/Kconfig b/arch/arm/mach-mx3/Kconfig
index 5000ac1f93e3..3f83fd534073 100644
--- a/arch/arm/mach-mx3/Kconfig
+++ b/arch/arm/mach-mx3/Kconfig
@@ -41,6 +41,7 @@ config MACH_PCM037
41 select IMX_HAVE_PLATFORM_IMX_I2C 41 select IMX_HAVE_PLATFORM_IMX_I2C
42 select IMX_HAVE_PLATFORM_IMX_UART 42 select IMX_HAVE_PLATFORM_IMX_UART
43 select IMX_HAVE_PLATFORM_MXC_NAND 43 select IMX_HAVE_PLATFORM_MXC_NAND
44 select IMX_HAVE_PLATFORM_MXC_W1
44 select MXC_ULPI if USB_ULPI 45 select MXC_ULPI if USB_ULPI
45 help 46 help
46 Include support for Phytec pcm037 platform. This includes 47 Include support for Phytec pcm037 platform. This includes
diff --git a/arch/arm/mach-mx3/devices-imx31.h b/arch/arm/mach-mx3/devices-imx31.h
index de9598590eba..a88f243ec72f 100644
--- a/arch/arm/mach-mx3/devices-imx31.h
+++ b/arch/arm/mach-mx3/devices-imx31.h
@@ -33,6 +33,10 @@ extern const struct imx_mxc_nand_data imx31_mxc_nand_data __initconst;
33#define imx31_add_mxc_nand(pdata) \ 33#define imx31_add_mxc_nand(pdata) \
34 imx_add_mxc_nand(&imx31_mxc_nand_data, pdata) 34 imx_add_mxc_nand(&imx31_mxc_nand_data, pdata)
35 35
36extern const struct imx_mxc_w1_data imx31_mxc_w1_data __initconst;
37#define imx31_add_mxc_w1(pdata) \
38 imx_add_mxc_w1(&imx31_mxc_w1_data)
39
36extern const struct imx_spi_imx_data imx31_cspi_data[] __initconst; 40extern const struct imx_spi_imx_data imx31_cspi_data[] __initconst;
37#define imx31_add_cspi(id, pdata) \ 41#define imx31_add_cspi(id, pdata) \
38 imx_add_spi_imx(&imx31_cspi_data[id], pdata) 42 imx_add_spi_imx(&imx31_cspi_data[id], pdata)
diff --git a/arch/arm/mach-mx3/devices-imx35.h b/arch/arm/mach-mx3/devices-imx35.h
index 5eb917b638d0..7602cb49aab6 100644
--- a/arch/arm/mach-mx3/devices-imx35.h
+++ b/arch/arm/mach-mx3/devices-imx35.h
@@ -40,6 +40,10 @@ extern const struct imx_mxc_nand_data imx35_mxc_nand_data __initconst;
40#define imx35_add_mxc_nand(pdata) \ 40#define imx35_add_mxc_nand(pdata) \
41 imx_add_mxc_nand(&imx35_mxc_nand_data, pdata) 41 imx_add_mxc_nand(&imx35_mxc_nand_data, pdata)
42 42
43extern const struct imx_mxc_w1_data imx35_mxc_w1_data __initconst;
44#define imx35_add_mxc_w1(pdata) \
45 imx_add_mxc_w1(&imx35_mxc_w1_data)
46
43extern const struct imx_spi_imx_data imx35_cspi_data[] __initconst; 47extern const struct imx_spi_imx_data imx35_cspi_data[] __initconst;
44#define imx35_add_cspi(id, pdata) \ 48#define imx35_add_cspi(id, pdata) \
45 imx_add_spi_imx(&imx35_cspi_data[id], pdata) 49 imx_add_spi_imx(&imx35_cspi_data[id], pdata)
diff --git a/arch/arm/mach-mx3/devices.c b/arch/arm/mach-mx3/devices.c
index 74f74f4fcff0..5808ce1b157b 100644
--- a/arch/arm/mach-mx3/devices.c
+++ b/arch/arm/mach-mx3/devices.c
@@ -54,21 +54,6 @@ int __init imx3x_register_gpios(void)
54 return mxc_gpio_init(imx_gpio_ports, ARRAY_SIZE(imx_gpio_ports)); 54 return mxc_gpio_init(imx_gpio_ports, ARRAY_SIZE(imx_gpio_ports));
55} 55}
56 56
57static struct resource mxc_w1_master_resources[] = {
58 {
59 .start = MX3x_OWIRE_BASE_ADDR,
60 .end = MX3x_OWIRE_BASE_ADDR + SZ_4K - 1,
61 .flags = IORESOURCE_MEM,
62 },
63};
64
65struct platform_device mxc_w1_master_device = {
66 .name = "mxc_w1",
67 .id = 0,
68 .num_resources = ARRAY_SIZE(mxc_w1_master_resources),
69 .resource = mxc_w1_master_resources,
70};
71
72#ifdef CONFIG_ARCH_MX31 57#ifdef CONFIG_ARCH_MX31
73static struct resource mxcsdhc0_resources[] = { 58static struct resource mxcsdhc0_resources[] = {
74 { 59 {
diff --git a/arch/arm/mach-mx3/devices.h b/arch/arm/mach-mx3/devices.h
index 585f814473d5..a649772058ef 100644
--- a/arch/arm/mach-mx3/devices.h
+++ b/arch/arm/mach-mx3/devices.h
@@ -1,4 +1,3 @@
1extern struct platform_device mxc_w1_master_device;
2extern struct platform_device mx3_ipu; 1extern struct platform_device mx3_ipu;
3extern struct platform_device mx3_fb; 2extern struct platform_device mx3_fb;
4extern struct platform_device mx3_camera; 3extern struct platform_device mx3_camera;
diff --git a/arch/arm/mach-mx3/mach-pcm037.c b/arch/arm/mach-mx3/mach-pcm037.c
index 86e86c1300d5..bc5d3a1aa206 100644
--- a/arch/arm/mach-mx3/mach-pcm037.c
+++ b/arch/arm/mach-mx3/mach-pcm037.c
@@ -614,7 +614,7 @@ static void __init mxc_board_init(void)
614 imx31_add_imx_uart1(&uart_pdata); 614 imx31_add_imx_uart1(&uart_pdata);
615 imx31_add_imx_uart2(&uart_pdata); 615 imx31_add_imx_uart2(&uart_pdata);
616 616
617 mxc_register_device(&mxc_w1_master_device, NULL); 617 imx31_add_mxc_w1(NULL);
618 618
619 /* LAN9217 IRQ pin */ 619 /* LAN9217 IRQ pin */
620 ret = gpio_request(IOMUX_TO_GPIO(MX31_PIN_GPIO3_1), "lan9217-irq"); 620 ret = gpio_request(IOMUX_TO_GPIO(MX31_PIN_GPIO3_1), "lan9217-irq");
diff --git a/arch/arm/plat-mxc/devices/Kconfig b/arch/arm/plat-mxc/devices/Kconfig
index 9aa6f3ea9012..fb664670c101 100644
--- a/arch/arm/plat-mxc/devices/Kconfig
+++ b/arch/arm/plat-mxc/devices/Kconfig
@@ -25,5 +25,8 @@ config IMX_HAVE_PLATFORM_IMX_UART
25config IMX_HAVE_PLATFORM_MXC_NAND 25config IMX_HAVE_PLATFORM_MXC_NAND
26 bool 26 bool
27 27
28config IMX_HAVE_PLATFORM_MXC_W1
29 bool
30
28config IMX_HAVE_PLATFORM_SPI_IMX 31config IMX_HAVE_PLATFORM_SPI_IMX
29 bool 32 bool
diff --git a/arch/arm/plat-mxc/devices/Makefile b/arch/arm/plat-mxc/devices/Makefile
index 45aefeb283ba..1d7d39201622 100644
--- a/arch/arm/plat-mxc/devices/Makefile
+++ b/arch/arm/plat-mxc/devices/Makefile
@@ -7,4 +7,5 @@ obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_I2C) += platform-imx-i2c.o
7obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_SSI) += platform-imx-ssi.o 7obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_SSI) += platform-imx-ssi.o
8obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_UART) += platform-imx-uart.o 8obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_UART) += platform-imx-uart.o
9obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_NAND) += platform-mxc_nand.o 9obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_NAND) += platform-mxc_nand.o
10obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_W1) += platform-mxc_w1.o
10obj-$(CONFIG_IMX_HAVE_PLATFORM_SPI_IMX) += platform-spi_imx.o 11obj-$(CONFIG_IMX_HAVE_PLATFORM_SPI_IMX) += platform-spi_imx.o
diff --git a/arch/arm/plat-mxc/devices/platform-mxc_w1.c b/arch/arm/plat-mxc/devices/platform-mxc_w1.c
new file mode 100644
index 000000000000..1355237391fc
--- /dev/null
+++ b/arch/arm/plat-mxc/devices/platform-mxc_w1.c
@@ -0,0 +1,50 @@
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/hardware.h>
10#include <mach/devices-common.h>
11
12#define imx_mxc_w1_data_entry_single(soc) \
13 { \
14 .iobase = soc ## _OWIRE_BASE_ADDR, \
15 }
16
17#ifdef CONFIG_SOC_IMX21
18const struct imx_mxc_w1_data imx21_mxc_w1_data __initconst =
19 imx_mxc_w1_data_entry_single(MX21);
20#endif /* ifdef CONFIG_SOC_IMX21 */
21
22#ifdef CONFIG_SOC_IMX27
23const struct imx_mxc_w1_data imx27_mxc_w1_data __initconst =
24 imx_mxc_w1_data_entry_single(MX27);
25#endif /* ifdef CONFIG_SOC_IMX27 */
26
27#ifdef CONFIG_ARCH_MX31
28const struct imx_mxc_w1_data imx31_mxc_w1_data __initconst =
29 imx_mxc_w1_data_entry_single(MX31);
30#endif /* ifdef CONFIG_ARCH_MX31 */
31
32#ifdef CONFIG_ARCH_MX35
33const struct imx_mxc_w1_data imx35_mxc_w1_data __initconst =
34 imx_mxc_w1_data_entry_single(MX35);
35#endif /* ifdef CONFIG_ARCH_MX35 */
36
37struct platform_device *__init imx_add_mxc_w1(
38 const struct imx_mxc_w1_data *data)
39{
40 struct resource res[] = {
41 {
42 .start = data->iobase,
43 .end = data->iobase + SZ_4K - 1,
44 .flags = IORESOURCE_MEM,
45 },
46 };
47
48 return imx_add_platform_device("mxc_w1", 0,
49 res, ARRAY_SIZE(res), NULL, 0);
50}
diff --git a/arch/arm/plat-mxc/include/mach/devices-common.h b/arch/arm/plat-mxc/include/mach/devices-common.h
index 8c6896fd1e5f..431e0ef4a832 100644
--- a/arch/arm/plat-mxc/include/mach/devices-common.h
+++ b/arch/arm/plat-mxc/include/mach/devices-common.h
@@ -99,6 +99,12 @@ struct platform_device *__init imx_add_mxc_nand(
99 const struct imx_mxc_nand_data *data, 99 const struct imx_mxc_nand_data *data,
100 const struct mxc_nand_platform_data *pdata); 100 const struct mxc_nand_platform_data *pdata);
101 101
102struct imx_mxc_w1_data {
103 resource_size_t iobase;
104};
105struct platform_device *__init imx_add_mxc_w1(
106 const struct imx_mxc_w1_data *data);
107
102#include <mach/spi.h> 108#include <mach/spi.h>
103struct imx_spi_imx_data { 109struct imx_spi_imx_data {
104 const char *devid; 110 const char *devid;