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-mx3 | |
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-mx3')
-rw-r--r-- | arch/arm/mach-mx3/Kconfig | 1 | ||||
-rw-r--r-- | arch/arm/mach-mx3/devices-imx31.h | 4 | ||||
-rw-r--r-- | arch/arm/mach-mx3/devices-imx35.h | 4 | ||||
-rw-r--r-- | arch/arm/mach-mx3/devices.c | 15 | ||||
-rw-r--r-- | arch/arm/mach-mx3/devices.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-mx3/mach-pcm037.c | 2 |
6 files changed, 10 insertions, 17 deletions
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 | ||
36 | extern 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 | |||
36 | extern const struct imx_spi_imx_data imx31_cspi_data[] __initconst; | 40 | extern 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 | ||
43 | extern 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 | |||
43 | extern const struct imx_spi_imx_data imx35_cspi_data[] __initconst; | 47 | extern 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 | ||
57 | static 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 | |||
65 | struct 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 |
73 | static struct resource mxcsdhc0_resources[] = { | 58 | static 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 @@ | |||
1 | extern struct platform_device mxc_w1_master_device; | ||
2 | extern struct platform_device mx3_ipu; | 1 | extern struct platform_device mx3_ipu; |
3 | extern struct platform_device mx3_fb; | 2 | extern struct platform_device mx3_fb; |
4 | extern struct platform_device mx3_camera; | 3 | extern 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"); |