diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2011-08-01 03:07:54 -0400 |
---|---|---|
committer | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2011-08-01 05:16:56 -0400 |
commit | f26888549dd68c3902f43f544cddc670135d2477 (patch) | |
tree | 4f15dd7332f040b4f6b6ea09404a7adc38086bd0 /arch | |
parent | 6cafe48a6bfa8934d5564fbf9976a51040dac819 (diff) |
ARM: mx5: dynamically allocate high speed i2c (imx-i2c actually)
This removes the last device from devices.c.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-mx5/Makefile | 2 | ||||
-rw-r--r-- | arch/arm/mach-mx5/board-mx51_babbage.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-mx5/devices-imx51.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-mx5/devices.c | 37 | ||||
-rw-r--r-- | arch/arm/mach-mx5/devices.h | 1 | ||||
-rw-r--r-- | arch/arm/plat-mxc/devices/platform-imx-i2c.c | 6 |
6 files changed, 11 insertions, 42 deletions
diff --git a/arch/arm/mach-mx5/Makefile b/arch/arm/mach-mx5/Makefile index 383e7cd3fbcb..7f452433a690 100644 --- a/arch/arm/mach-mx5/Makefile +++ b/arch/arm/mach-mx5/Makefile | |||
@@ -3,7 +3,7 @@ | |||
3 | # | 3 | # |
4 | 4 | ||
5 | # Object file lists. | 5 | # Object file lists. |
6 | obj-y := cpu.o mm.o clock-mx51-mx53.o devices.o ehci.o system.o | 6 | obj-y := cpu.o mm.o clock-mx51-mx53.o ehci.o system.o |
7 | obj-$(CONFIG_SOC_IMX50) += mm-mx50.o | 7 | obj-$(CONFIG_SOC_IMX50) += mm-mx50.o |
8 | 8 | ||
9 | obj-$(CONFIG_PM) += pm-imx5.o | 9 | obj-$(CONFIG_PM) += pm-imx5.o |
diff --git a/arch/arm/mach-mx5/board-mx51_babbage.c b/arch/arm/mach-mx5/board-mx51_babbage.c index 576a7992c23d..41a911f50e65 100644 --- a/arch/arm/mach-mx5/board-mx51_babbage.c +++ b/arch/arm/mach-mx5/board-mx51_babbage.c | |||
@@ -31,7 +31,6 @@ | |||
31 | #include <asm/mach/time.h> | 31 | #include <asm/mach/time.h> |
32 | 32 | ||
33 | #include "devices-imx51.h" | 33 | #include "devices-imx51.h" |
34 | #include "devices.h" | ||
35 | #include "cpu_op-mx51.h" | 34 | #include "cpu_op-mx51.h" |
36 | 35 | ||
37 | #define BABBAGE_USB_HUB_RESET IMX_GPIO_NR(1, 7) | 36 | #define BABBAGE_USB_HUB_RESET IMX_GPIO_NR(1, 7) |
@@ -176,7 +175,7 @@ static const struct imxi2c_platform_data babbage_i2c_data __initconst = { | |||
176 | .bitrate = 100000, | 175 | .bitrate = 100000, |
177 | }; | 176 | }; |
178 | 177 | ||
179 | static struct imxi2c_platform_data babbage_hsi2c_data = { | 178 | static const struct imxi2c_platform_data babbage_hsi2c_data __initconst = { |
180 | .bitrate = 400000, | 179 | .bitrate = 400000, |
181 | }; | 180 | }; |
182 | 181 | ||
@@ -381,7 +380,7 @@ static void __init mx51_babbage_init(void) | |||
381 | 380 | ||
382 | imx51_add_imx_i2c(0, &babbage_i2c_data); | 381 | imx51_add_imx_i2c(0, &babbage_i2c_data); |
383 | imx51_add_imx_i2c(1, &babbage_i2c_data); | 382 | imx51_add_imx_i2c(1, &babbage_i2c_data); |
384 | mxc_register_device(&mxc_hsi2c_device, &babbage_hsi2c_data); | 383 | imx51_add_hsi2c(&babbage_hsi2c_data); |
385 | 384 | ||
386 | if (otg_mode_host) | 385 | if (otg_mode_host) |
387 | imx51_add_mxc_ehci_otg(&dr_utmi_config); | 386 | imx51_add_mxc_ehci_otg(&dr_utmi_config); |
diff --git a/arch/arm/mach-mx5/devices-imx51.h b/arch/arm/mach-mx5/devices-imx51.h index 2f2cdb93bfe2..f311c9616bb1 100644 --- a/arch/arm/mach-mx5/devices-imx51.h +++ b/arch/arm/mach-mx5/devices-imx51.h | |||
@@ -20,6 +20,8 @@ extern const struct imx_fsl_usb2_udc_data imx51_fsl_usb2_udc_data; | |||
20 | extern const struct imx_imx_i2c_data imx51_imx_i2c_data[]; | 20 | extern const struct imx_imx_i2c_data imx51_imx_i2c_data[]; |
21 | #define imx51_add_imx_i2c(id, pdata) \ | 21 | #define imx51_add_imx_i2c(id, pdata) \ |
22 | imx_add_imx_i2c(&imx51_imx_i2c_data[id], pdata) | 22 | imx_add_imx_i2c(&imx51_imx_i2c_data[id], pdata) |
23 | #define imx51_add_hsi2c(pdata) \ | ||
24 | imx51_add_imx_i2c(2, pdata) | ||
23 | 25 | ||
24 | extern const struct imx_imx_ssi_data imx51_imx_ssi_data[]; | 26 | extern const struct imx_imx_ssi_data imx51_imx_ssi_data[]; |
25 | #define imx51_add_imx_ssi(id, pdata) \ | 27 | #define imx51_add_imx_ssi(id, pdata) \ |
diff --git a/arch/arm/mach-mx5/devices.c b/arch/arm/mach-mx5/devices.c deleted file mode 100644 index 1c09026b314b..000000000000 --- a/arch/arm/mach-mx5/devices.c +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2009 Amit Kucheria <amit.kucheria@canonical.com> | ||
3 | * Copyright (C) 2010 Freescale Semiconductor, Inc. | ||
4 | * | ||
5 | * The code contained herein is licensed under the GNU General Public | ||
6 | * License. You may obtain a copy of the GNU General Public License | ||
7 | * Version 2 or later at the following locations: | ||
8 | * | ||
9 | * http://www.opensource.org/licenses/gpl-license.html | ||
10 | * http://www.gnu.org/copyleft/gpl.html | ||
11 | */ | ||
12 | |||
13 | #include <linux/platform_device.h> | ||
14 | #include <linux/dma-mapping.h> | ||
15 | #include <mach/hardware.h> | ||
16 | #include <mach/imx-uart.h> | ||
17 | #include <mach/irqs.h> | ||
18 | |||
19 | static struct resource mxc_hsi2c_resources[] = { | ||
20 | { | ||
21 | .start = MX51_HSI2C_DMA_BASE_ADDR, | ||
22 | .end = MX51_HSI2C_DMA_BASE_ADDR + SZ_16K - 1, | ||
23 | .flags = IORESOURCE_MEM, | ||
24 | }, | ||
25 | { | ||
26 | .start = MX51_INT_HS_I2C, | ||
27 | .end = MX51_INT_HS_I2C, | ||
28 | .flags = IORESOURCE_IRQ, | ||
29 | }, | ||
30 | }; | ||
31 | |||
32 | struct platform_device mxc_hsi2c_device = { | ||
33 | .name = "imx-i2c", | ||
34 | .id = 2, | ||
35 | .num_resources = ARRAY_SIZE(mxc_hsi2c_resources), | ||
36 | .resource = mxc_hsi2c_resources | ||
37 | }; | ||
diff --git a/arch/arm/mach-mx5/devices.h b/arch/arm/mach-mx5/devices.h deleted file mode 100644 index 6b2edfea129b..000000000000 --- a/arch/arm/mach-mx5/devices.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | extern struct platform_device mxc_hsi2c_device; | ||
diff --git a/arch/arm/plat-mxc/devices/platform-imx-i2c.c b/arch/arm/plat-mxc/devices/platform-imx-i2c.c index afe60f7244a8..19ad580c0be3 100644 --- a/arch/arm/plat-mxc/devices/platform-imx-i2c.c +++ b/arch/arm/plat-mxc/devices/platform-imx-i2c.c | |||
@@ -85,6 +85,12 @@ const struct imx_imx_i2c_data imx51_imx_i2c_data[] __initconst = { | |||
85 | imx_imx_i2c_data_entry(MX51, _id, _hwid, SZ_4K) | 85 | imx_imx_i2c_data_entry(MX51, _id, _hwid, SZ_4K) |
86 | imx51_imx_i2c_data_entry(0, 1), | 86 | imx51_imx_i2c_data_entry(0, 1), |
87 | imx51_imx_i2c_data_entry(1, 2), | 87 | imx51_imx_i2c_data_entry(1, 2), |
88 | { | ||
89 | .id = 2, | ||
90 | .iobase = MX51_HSI2C_DMA_BASE_ADDR, | ||
91 | .iosize = SZ_16K, | ||
92 | .irq = MX51_INT_HS_I2C, | ||
93 | }, | ||
88 | }; | 94 | }; |
89 | #endif /* ifdef CONFIG_SOC_IMX51 */ | 95 | #endif /* ifdef CONFIG_SOC_IMX51 */ |
90 | 96 | ||