diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2012-09-14 03:19:00 -0400 |
---|---|---|
committer | Shawn Guo <shawn.guo@linaro.org> | 2012-10-14 22:03:15 -0400 |
commit | 5bdfba29f18f0a36df8e28328315213ea47eb529 (patch) | |
tree | 6c35d12ded1ee1c2fafd8eaada320d926651d1a3 /arch/arm/mach-imx | |
parent | 881994638c4033815dcdd26f43d209e83760d493 (diff) |
i2c: imx: remove cpu_is_xxx by using platform_device_id
This is some amount of work left/forgot from device tree conversion.
Instead of checking cpu_is_xxx to determine the controller type, the
driver should use platform_device_id, which should match the device
tree compatible string.
The patch changes the driver to use platform_device_id rather than
cpu_is_xxx to determine the controller type/version. It also updates
the platform code and device tree source accordingly.
As the result, mach/hardware.h inclusion gets removed from the driver.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Cc: Wolfram Sang <w.sang@pengutronix.de>
Cc: linux-i2c@vger.kernel.org
Diffstat (limited to 'arch/arm/mach-imx')
-rw-r--r-- | arch/arm/mach-imx/clk-imx1.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-imx/clk-imx21.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-imx/clk-imx25.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-imx/clk-imx27.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-imx/clk-imx31.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-imx/clk-imx35.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-imx/clk-imx51-imx53.c | 8 | ||||
-rw-r--r-- | arch/arm/mach-imx/devices/devices-common.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-imx/devices/platform-imx-i2c.c | 28 | ||||
-rw-r--r-- | arch/arm/mach-imx/imx27-dt.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-imx/imx51-dt.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-imx53.c | 6 |
12 files changed, 40 insertions, 37 deletions
diff --git a/arch/arm/mach-imx/clk-imx1.c b/arch/arm/mach-imx/clk-imx1.c index b5f90cc9e371..198238859446 100644 --- a/arch/arm/mach-imx/clk-imx1.c +++ b/arch/arm/mach-imx/clk-imx1.c | |||
@@ -95,7 +95,7 @@ int __init mx1_clocks_init(unsigned long fref) | |||
95 | clk_register_clkdev(clk[hclk], "ipg", "imx1-uart.1"); | 95 | clk_register_clkdev(clk[hclk], "ipg", "imx1-uart.1"); |
96 | clk_register_clkdev(clk[per1], "per", "imx1-uart.2"); | 96 | clk_register_clkdev(clk[per1], "per", "imx1-uart.2"); |
97 | clk_register_clkdev(clk[hclk], "ipg", "imx1-uart.2"); | 97 | clk_register_clkdev(clk[hclk], "ipg", "imx1-uart.2"); |
98 | clk_register_clkdev(clk[hclk], NULL, "imx-i2c.0"); | 98 | clk_register_clkdev(clk[hclk], NULL, "imx1-i2c.0"); |
99 | clk_register_clkdev(clk[per2], "per", "imx1-cspi.0"); | 99 | clk_register_clkdev(clk[per2], "per", "imx1-cspi.0"); |
100 | clk_register_clkdev(clk[dummy], "ipg", "imx1-cspi.0"); | 100 | clk_register_clkdev(clk[dummy], "ipg", "imx1-cspi.0"); |
101 | clk_register_clkdev(clk[per2], "per", "imx1-cspi.1"); | 101 | clk_register_clkdev(clk[per2], "per", "imx1-cspi.1"); |
diff --git a/arch/arm/mach-imx/clk-imx21.c b/arch/arm/mach-imx/clk-imx21.c index fbee6a4b1de1..09fc31c58474 100644 --- a/arch/arm/mach-imx/clk-imx21.c +++ b/arch/arm/mach-imx/clk-imx21.c | |||
@@ -166,7 +166,7 @@ int __init mx21_clocks_init(unsigned long lref, unsigned long href) | |||
166 | clk_register_clkdev(clk[dma_hclk_gate], "ahb", "imx-dma"); | 166 | clk_register_clkdev(clk[dma_hclk_gate], "ahb", "imx-dma"); |
167 | clk_register_clkdev(clk[dma_gate], "ipg", "imx-dma"); | 167 | clk_register_clkdev(clk[dma_gate], "ipg", "imx-dma"); |
168 | clk_register_clkdev(clk[wdog_gate], NULL, "imx2-wdt.0"); | 168 | clk_register_clkdev(clk[wdog_gate], NULL, "imx2-wdt.0"); |
169 | clk_register_clkdev(clk[i2c_gate], NULL, "imx-i2c.0"); | 169 | clk_register_clkdev(clk[i2c_gate], NULL, "imx21-i2c.0"); |
170 | clk_register_clkdev(clk[kpp_gate], NULL, "mxc-keypad"); | 170 | clk_register_clkdev(clk[kpp_gate], NULL, "mxc-keypad"); |
171 | clk_register_clkdev(clk[owire_gate], NULL, "mxc_w1.0"); | 171 | clk_register_clkdev(clk[owire_gate], NULL, "mxc_w1.0"); |
172 | clk_register_clkdev(clk[brom_gate], "brom", NULL); | 172 | clk_register_clkdev(clk[brom_gate], "brom", NULL); |
diff --git a/arch/arm/mach-imx/clk-imx25.c b/arch/arm/mach-imx/clk-imx25.c index 08a143a19e63..f1d75e72e002 100644 --- a/arch/arm/mach-imx/clk-imx25.c +++ b/arch/arm/mach-imx/clk-imx25.c | |||
@@ -213,9 +213,9 @@ int __init mx25_clocks_init(void) | |||
213 | clk_register_clkdev(clk[per10], "per", "mxc_pwm.3"); | 213 | clk_register_clkdev(clk[per10], "per", "mxc_pwm.3"); |
214 | clk_register_clkdev(clk[kpp_ipg], NULL, "imx-keypad"); | 214 | clk_register_clkdev(clk[kpp_ipg], NULL, "imx-keypad"); |
215 | clk_register_clkdev(clk[tsc_ipg], NULL, "mx25-adc"); | 215 | clk_register_clkdev(clk[tsc_ipg], NULL, "mx25-adc"); |
216 | clk_register_clkdev(clk[i2c_ipg_per], NULL, "imx-i2c.0"); | 216 | clk_register_clkdev(clk[i2c_ipg_per], NULL, "imx21-i2c.0"); |
217 | clk_register_clkdev(clk[i2c_ipg_per], NULL, "imx-i2c.1"); | 217 | clk_register_clkdev(clk[i2c_ipg_per], NULL, "imx21-i2c.1"); |
218 | clk_register_clkdev(clk[i2c_ipg_per], NULL, "imx-i2c.2"); | 218 | clk_register_clkdev(clk[i2c_ipg_per], NULL, "imx21-i2c.2"); |
219 | clk_register_clkdev(clk[fec_ipg], "ipg", "imx25-fec.0"); | 219 | clk_register_clkdev(clk[fec_ipg], "ipg", "imx25-fec.0"); |
220 | clk_register_clkdev(clk[fec_ahb], "ahb", "imx25-fec.0"); | 220 | clk_register_clkdev(clk[fec_ahb], "ahb", "imx25-fec.0"); |
221 | clk_register_clkdev(clk[dryice_ipg], NULL, "imxdi_rtc.0"); | 221 | clk_register_clkdev(clk[dryice_ipg], NULL, "imxdi_rtc.0"); |
diff --git a/arch/arm/mach-imx/clk-imx27.c b/arch/arm/mach-imx/clk-imx27.c index 31010cb93c6d..c2f111f42ddb 100644 --- a/arch/arm/mach-imx/clk-imx27.c +++ b/arch/arm/mach-imx/clk-imx27.c | |||
@@ -247,8 +247,8 @@ int __init mx27_clocks_init(unsigned long fref) | |||
247 | clk_register_clkdev(clk[fec_ipg_gate], "ipg", "imx27-fec.0"); | 247 | clk_register_clkdev(clk[fec_ipg_gate], "ipg", "imx27-fec.0"); |
248 | clk_register_clkdev(clk[fec_ahb_gate], "ahb", "imx27-fec.0"); | 248 | clk_register_clkdev(clk[fec_ahb_gate], "ahb", "imx27-fec.0"); |
249 | clk_register_clkdev(clk[wdog_ipg_gate], NULL, "imx2-wdt.0"); | 249 | clk_register_clkdev(clk[wdog_ipg_gate], NULL, "imx2-wdt.0"); |
250 | clk_register_clkdev(clk[i2c1_ipg_gate], NULL, "imx-i2c.0"); | 250 | clk_register_clkdev(clk[i2c1_ipg_gate], NULL, "imx21-i2c.0"); |
251 | clk_register_clkdev(clk[i2c2_ipg_gate], NULL, "imx-i2c.1"); | 251 | clk_register_clkdev(clk[i2c2_ipg_gate], NULL, "imx21-i2c.1"); |
252 | clk_register_clkdev(clk[owire_ipg_gate], NULL, "mxc_w1.0"); | 252 | clk_register_clkdev(clk[owire_ipg_gate], NULL, "mxc_w1.0"); |
253 | clk_register_clkdev(clk[kpp_ipg_gate], NULL, "imx-keypad"); | 253 | clk_register_clkdev(clk[kpp_ipg_gate], NULL, "imx-keypad"); |
254 | clk_register_clkdev(clk[emma_ahb_gate], "emma-ahb", "mx2-camera.0"); | 254 | clk_register_clkdev(clk[emma_ahb_gate], "emma-ahb", "mx2-camera.0"); |
diff --git a/arch/arm/mach-imx/clk-imx31.c b/arch/arm/mach-imx/clk-imx31.c index a4c298acd04e..76e6462cf9ae 100644 --- a/arch/arm/mach-imx/clk-imx31.c +++ b/arch/arm/mach-imx/clk-imx31.c | |||
@@ -155,9 +155,9 @@ int __init mx31_clocks_init(unsigned long fref) | |||
155 | clk_register_clkdev(clk[ipg], "ipg", "imx21-uart.3"); | 155 | clk_register_clkdev(clk[ipg], "ipg", "imx21-uart.3"); |
156 | clk_register_clkdev(clk[uart5_gate], "per", "imx21-uart.4"); | 156 | clk_register_clkdev(clk[uart5_gate], "per", "imx21-uart.4"); |
157 | clk_register_clkdev(clk[ipg], "ipg", "imx21-uart.4"); | 157 | clk_register_clkdev(clk[ipg], "ipg", "imx21-uart.4"); |
158 | clk_register_clkdev(clk[i2c1_gate], NULL, "imx-i2c.0"); | 158 | clk_register_clkdev(clk[i2c1_gate], NULL, "imx21-i2c.0"); |
159 | clk_register_clkdev(clk[i2c2_gate], NULL, "imx-i2c.1"); | 159 | clk_register_clkdev(clk[i2c2_gate], NULL, "imx21-i2c.1"); |
160 | clk_register_clkdev(clk[i2c3_gate], NULL, "imx-i2c.2"); | 160 | clk_register_clkdev(clk[i2c3_gate], NULL, "imx21-i2c.2"); |
161 | clk_register_clkdev(clk[owire_gate], NULL, "mxc_w1.0"); | 161 | clk_register_clkdev(clk[owire_gate], NULL, "mxc_w1.0"); |
162 | clk_register_clkdev(clk[sdhc1_gate], NULL, "mxc-mmc.0"); | 162 | clk_register_clkdev(clk[sdhc1_gate], NULL, "mxc-mmc.0"); |
163 | clk_register_clkdev(clk[sdhc2_gate], NULL, "mxc-mmc.1"); | 163 | clk_register_clkdev(clk[sdhc2_gate], NULL, "mxc-mmc.1"); |
diff --git a/arch/arm/mach-imx/clk-imx35.c b/arch/arm/mach-imx/clk-imx35.c index ba26bf3ee933..ee2581254fbc 100644 --- a/arch/arm/mach-imx/clk-imx35.c +++ b/arch/arm/mach-imx/clk-imx35.c | |||
@@ -226,9 +226,9 @@ int __init mx35_clocks_init() | |||
226 | clk_register_clkdev(clk[fec_gate], NULL, "imx27-fec.0"); | 226 | clk_register_clkdev(clk[fec_gate], NULL, "imx27-fec.0"); |
227 | clk_register_clkdev(clk[gpt_gate], "per", "imx-gpt.0"); | 227 | clk_register_clkdev(clk[gpt_gate], "per", "imx-gpt.0"); |
228 | clk_register_clkdev(clk[ipg], "ipg", "imx-gpt.0"); | 228 | clk_register_clkdev(clk[ipg], "ipg", "imx-gpt.0"); |
229 | clk_register_clkdev(clk[i2c1_gate], NULL, "imx-i2c.0"); | 229 | clk_register_clkdev(clk[i2c1_gate], NULL, "imx21-i2c.0"); |
230 | clk_register_clkdev(clk[i2c2_gate], NULL, "imx-i2c.1"); | 230 | clk_register_clkdev(clk[i2c2_gate], NULL, "imx21-i2c.1"); |
231 | clk_register_clkdev(clk[i2c3_gate], NULL, "imx-i2c.2"); | 231 | clk_register_clkdev(clk[i2c3_gate], NULL, "imx21-i2c.2"); |
232 | clk_register_clkdev(clk[ipu_gate], NULL, "ipu-core"); | 232 | clk_register_clkdev(clk[ipu_gate], NULL, "ipu-core"); |
233 | clk_register_clkdev(clk[ipu_gate], NULL, "mx3_sdc_fb"); | 233 | clk_register_clkdev(clk[ipu_gate], NULL, "mx3_sdc_fb"); |
234 | clk_register_clkdev(clk[kpp_gate], NULL, "imx-keypad"); | 234 | clk_register_clkdev(clk[kpp_gate], NULL, "imx-keypad"); |
diff --git a/arch/arm/mach-imx/clk-imx51-imx53.c b/arch/arm/mach-imx/clk-imx51-imx53.c index 024587cee620..2449d8ff4a18 100644 --- a/arch/arm/mach-imx/clk-imx51-imx53.c +++ b/arch/arm/mach-imx/clk-imx51-imx53.c | |||
@@ -258,8 +258,8 @@ static void __init mx5_clocks_common_init(unsigned long rate_ckil, | |||
258 | clk_register_clkdev(clk[cspi_ipg_gate], NULL, "imx35-cspi.2"); | 258 | clk_register_clkdev(clk[cspi_ipg_gate], NULL, "imx35-cspi.2"); |
259 | clk_register_clkdev(clk[pwm1_ipg_gate], "pwm", "mxc_pwm.0"); | 259 | clk_register_clkdev(clk[pwm1_ipg_gate], "pwm", "mxc_pwm.0"); |
260 | clk_register_clkdev(clk[pwm2_ipg_gate], "pwm", "mxc_pwm.1"); | 260 | clk_register_clkdev(clk[pwm2_ipg_gate], "pwm", "mxc_pwm.1"); |
261 | clk_register_clkdev(clk[i2c1_gate], NULL, "imx-i2c.0"); | 261 | clk_register_clkdev(clk[i2c1_gate], NULL, "imx21-i2c.0"); |
262 | clk_register_clkdev(clk[i2c2_gate], NULL, "imx-i2c.1"); | 262 | clk_register_clkdev(clk[i2c2_gate], NULL, "imx21-i2c.1"); |
263 | clk_register_clkdev(clk[usboh3_per_gate], "per", "mxc-ehci.0"); | 263 | clk_register_clkdev(clk[usboh3_per_gate], "per", "mxc-ehci.0"); |
264 | clk_register_clkdev(clk[usboh3_gate], "ipg", "mxc-ehci.0"); | 264 | clk_register_clkdev(clk[usboh3_gate], "ipg", "mxc-ehci.0"); |
265 | clk_register_clkdev(clk[usboh3_gate], "ahb", "mxc-ehci.0"); | 265 | clk_register_clkdev(clk[usboh3_gate], "ahb", "mxc-ehci.0"); |
@@ -345,7 +345,7 @@ int __init mx51_clocks_init(unsigned long rate_ckil, unsigned long rate_osc, | |||
345 | 345 | ||
346 | mx5_clocks_common_init(rate_ckil, rate_osc, rate_ckih1, rate_ckih2); | 346 | mx5_clocks_common_init(rate_ckil, rate_osc, rate_ckih1, rate_ckih2); |
347 | 347 | ||
348 | clk_register_clkdev(clk[hsi2c_gate], NULL, "imx-i2c.2"); | 348 | clk_register_clkdev(clk[hsi2c_gate], NULL, "imx21-i2c.2"); |
349 | clk_register_clkdev(clk[mx51_mipi], "mipi_hsp", NULL); | 349 | clk_register_clkdev(clk[mx51_mipi], "mipi_hsp", NULL); |
350 | clk_register_clkdev(clk[vpu_gate], NULL, "imx51-vpu.0"); | 350 | clk_register_clkdev(clk[vpu_gate], NULL, "imx51-vpu.0"); |
351 | clk_register_clkdev(clk[fec_gate], NULL, "imx27-fec.0"); | 351 | clk_register_clkdev(clk[fec_gate], NULL, "imx27-fec.0"); |
@@ -440,7 +440,7 @@ int __init mx53_clocks_init(unsigned long rate_ckil, unsigned long rate_osc, | |||
440 | mx5_clocks_common_init(rate_ckil, rate_osc, rate_ckih1, rate_ckih2); | 440 | mx5_clocks_common_init(rate_ckil, rate_osc, rate_ckih1, rate_ckih2); |
441 | 441 | ||
442 | clk_register_clkdev(clk[vpu_gate], NULL, "imx53-vpu.0"); | 442 | clk_register_clkdev(clk[vpu_gate], NULL, "imx53-vpu.0"); |
443 | clk_register_clkdev(clk[i2c3_gate], NULL, "imx-i2c.2"); | 443 | clk_register_clkdev(clk[i2c3_gate], NULL, "imx21-i2c.2"); |
444 | clk_register_clkdev(clk[fec_gate], NULL, "imx25-fec.0"); | 444 | clk_register_clkdev(clk[fec_gate], NULL, "imx25-fec.0"); |
445 | clk_register_clkdev(clk[ipu_gate], "bus", "imx53-ipu"); | 445 | clk_register_clkdev(clk[ipu_gate], "bus", "imx53-ipu"); |
446 | clk_register_clkdev(clk[ipu_di0_gate], "di0", "imx53-ipu"); | 446 | clk_register_clkdev(clk[ipu_di0_gate], "di0", "imx53-ipu"); |
diff --git a/arch/arm/mach-imx/devices/devices-common.h b/arch/arm/mach-imx/devices/devices-common.h index eaf79d220c9a..86bf34cd4865 100644 --- a/arch/arm/mach-imx/devices/devices-common.h +++ b/arch/arm/mach-imx/devices/devices-common.h | |||
@@ -118,6 +118,7 @@ struct platform_device *__init imx_add_imx_fb( | |||
118 | 118 | ||
119 | #include <linux/platform_data/i2c-imx.h> | 119 | #include <linux/platform_data/i2c-imx.h> |
120 | struct imx_imx_i2c_data { | 120 | struct imx_imx_i2c_data { |
121 | const char *devid; | ||
121 | int id; | 122 | int id; |
122 | resource_size_t iobase; | 123 | resource_size_t iobase; |
123 | resource_size_t iosize; | 124 | resource_size_t iosize; |
diff --git a/arch/arm/mach-imx/devices/platform-imx-i2c.c b/arch/arm/mach-imx/devices/platform-imx-i2c.c index e0c7d6291bed..424ce246fe43 100644 --- a/arch/arm/mach-imx/devices/platform-imx-i2c.c +++ b/arch/arm/mach-imx/devices/platform-imx-i2c.c | |||
@@ -9,31 +9,32 @@ | |||
9 | #include <mach/hardware.h> | 9 | #include <mach/hardware.h> |
10 | #include "devices-common.h" | 10 | #include "devices-common.h" |
11 | 11 | ||
12 | #define imx_imx_i2c_data_entry_single(soc, _id, _hwid, _size) \ | 12 | #define imx_imx_i2c_data_entry_single(soc, _devid, _id, _hwid, _size) \ |
13 | { \ | 13 | { \ |
14 | .devid = _devid, \ | ||
14 | .id = _id, \ | 15 | .id = _id, \ |
15 | .iobase = soc ## _I2C ## _hwid ## _BASE_ADDR, \ | 16 | .iobase = soc ## _I2C ## _hwid ## _BASE_ADDR, \ |
16 | .iosize = _size, \ | 17 | .iosize = _size, \ |
17 | .irq = soc ## _INT_I2C ## _hwid, \ | 18 | .irq = soc ## _INT_I2C ## _hwid, \ |
18 | } | 19 | } |
19 | 20 | ||
20 | #define imx_imx_i2c_data_entry(soc, _id, _hwid, _size) \ | 21 | #define imx_imx_i2c_data_entry(soc, _devid, _id, _hwid, _size) \ |
21 | [_id] = imx_imx_i2c_data_entry_single(soc, _id, _hwid, _size) | 22 | [_id] = imx_imx_i2c_data_entry_single(soc, _devid, _id, _hwid, _size) |
22 | 23 | ||
23 | #ifdef CONFIG_SOC_IMX1 | 24 | #ifdef CONFIG_SOC_IMX1 |
24 | const struct imx_imx_i2c_data imx1_imx_i2c_data __initconst = | 25 | const struct imx_imx_i2c_data imx1_imx_i2c_data __initconst = |
25 | imx_imx_i2c_data_entry_single(MX1, 0, , SZ_4K); | 26 | imx_imx_i2c_data_entry_single(MX1, "imx1-i2c", 0, , SZ_4K); |
26 | #endif /* ifdef CONFIG_SOC_IMX1 */ | 27 | #endif /* ifdef CONFIG_SOC_IMX1 */ |
27 | 28 | ||
28 | #ifdef CONFIG_SOC_IMX21 | 29 | #ifdef CONFIG_SOC_IMX21 |
29 | const struct imx_imx_i2c_data imx21_imx_i2c_data __initconst = | 30 | const struct imx_imx_i2c_data imx21_imx_i2c_data __initconst = |
30 | imx_imx_i2c_data_entry_single(MX21, 0, , SZ_4K); | 31 | imx_imx_i2c_data_entry_single(MX21, "imx21-i2c", 0, , SZ_4K); |
31 | #endif /* ifdef CONFIG_SOC_IMX21 */ | 32 | #endif /* ifdef CONFIG_SOC_IMX21 */ |
32 | 33 | ||
33 | #ifdef CONFIG_SOC_IMX25 | 34 | #ifdef CONFIG_SOC_IMX25 |
34 | const struct imx_imx_i2c_data imx25_imx_i2c_data[] __initconst = { | 35 | const struct imx_imx_i2c_data imx25_imx_i2c_data[] __initconst = { |
35 | #define imx25_imx_i2c_data_entry(_id, _hwid) \ | 36 | #define imx25_imx_i2c_data_entry(_id, _hwid) \ |
36 | imx_imx_i2c_data_entry(MX25, _id, _hwid, SZ_16K) | 37 | imx_imx_i2c_data_entry(MX25, "imx21-i2c", _id, _hwid, SZ_16K) |
37 | imx25_imx_i2c_data_entry(0, 1), | 38 | imx25_imx_i2c_data_entry(0, 1), |
38 | imx25_imx_i2c_data_entry(1, 2), | 39 | imx25_imx_i2c_data_entry(1, 2), |
39 | imx25_imx_i2c_data_entry(2, 3), | 40 | imx25_imx_i2c_data_entry(2, 3), |
@@ -43,7 +44,7 @@ const struct imx_imx_i2c_data imx25_imx_i2c_data[] __initconst = { | |||
43 | #ifdef CONFIG_SOC_IMX27 | 44 | #ifdef CONFIG_SOC_IMX27 |
44 | const struct imx_imx_i2c_data imx27_imx_i2c_data[] __initconst = { | 45 | const struct imx_imx_i2c_data imx27_imx_i2c_data[] __initconst = { |
45 | #define imx27_imx_i2c_data_entry(_id, _hwid) \ | 46 | #define imx27_imx_i2c_data_entry(_id, _hwid) \ |
46 | imx_imx_i2c_data_entry(MX27, _id, _hwid, SZ_4K) | 47 | imx_imx_i2c_data_entry(MX27, "imx21-i2c", _id, _hwid, SZ_4K) |
47 | imx27_imx_i2c_data_entry(0, 1), | 48 | imx27_imx_i2c_data_entry(0, 1), |
48 | imx27_imx_i2c_data_entry(1, 2), | 49 | imx27_imx_i2c_data_entry(1, 2), |
49 | }; | 50 | }; |
@@ -52,7 +53,7 @@ const struct imx_imx_i2c_data imx27_imx_i2c_data[] __initconst = { | |||
52 | #ifdef CONFIG_SOC_IMX31 | 53 | #ifdef CONFIG_SOC_IMX31 |
53 | const struct imx_imx_i2c_data imx31_imx_i2c_data[] __initconst = { | 54 | const struct imx_imx_i2c_data imx31_imx_i2c_data[] __initconst = { |
54 | #define imx31_imx_i2c_data_entry(_id, _hwid) \ | 55 | #define imx31_imx_i2c_data_entry(_id, _hwid) \ |
55 | imx_imx_i2c_data_entry(MX31, _id, _hwid, SZ_4K) | 56 | imx_imx_i2c_data_entry(MX31, "imx21-i2c", _id, _hwid, SZ_4K) |
56 | imx31_imx_i2c_data_entry(0, 1), | 57 | imx31_imx_i2c_data_entry(0, 1), |
57 | imx31_imx_i2c_data_entry(1, 2), | 58 | imx31_imx_i2c_data_entry(1, 2), |
58 | imx31_imx_i2c_data_entry(2, 3), | 59 | imx31_imx_i2c_data_entry(2, 3), |
@@ -62,7 +63,7 @@ const struct imx_imx_i2c_data imx31_imx_i2c_data[] __initconst = { | |||
62 | #ifdef CONFIG_SOC_IMX35 | 63 | #ifdef CONFIG_SOC_IMX35 |
63 | const struct imx_imx_i2c_data imx35_imx_i2c_data[] __initconst = { | 64 | const struct imx_imx_i2c_data imx35_imx_i2c_data[] __initconst = { |
64 | #define imx35_imx_i2c_data_entry(_id, _hwid) \ | 65 | #define imx35_imx_i2c_data_entry(_id, _hwid) \ |
65 | imx_imx_i2c_data_entry(MX35, _id, _hwid, SZ_4K) | 66 | imx_imx_i2c_data_entry(MX35, "imx21-i2c", _id, _hwid, SZ_4K) |
66 | imx35_imx_i2c_data_entry(0, 1), | 67 | imx35_imx_i2c_data_entry(0, 1), |
67 | imx35_imx_i2c_data_entry(1, 2), | 68 | imx35_imx_i2c_data_entry(1, 2), |
68 | imx35_imx_i2c_data_entry(2, 3), | 69 | imx35_imx_i2c_data_entry(2, 3), |
@@ -72,7 +73,7 @@ const struct imx_imx_i2c_data imx35_imx_i2c_data[] __initconst = { | |||
72 | #ifdef CONFIG_SOC_IMX50 | 73 | #ifdef CONFIG_SOC_IMX50 |
73 | const struct imx_imx_i2c_data imx50_imx_i2c_data[] __initconst = { | 74 | const struct imx_imx_i2c_data imx50_imx_i2c_data[] __initconst = { |
74 | #define imx50_imx_i2c_data_entry(_id, _hwid) \ | 75 | #define imx50_imx_i2c_data_entry(_id, _hwid) \ |
75 | imx_imx_i2c_data_entry(MX50, _id, _hwid, SZ_4K) | 76 | imx_imx_i2c_data_entry(MX50, "imx21-i2c", _id, _hwid, SZ_4K) |
76 | imx50_imx_i2c_data_entry(0, 1), | 77 | imx50_imx_i2c_data_entry(0, 1), |
77 | imx50_imx_i2c_data_entry(1, 2), | 78 | imx50_imx_i2c_data_entry(1, 2), |
78 | imx50_imx_i2c_data_entry(2, 3), | 79 | imx50_imx_i2c_data_entry(2, 3), |
@@ -82,10 +83,11 @@ const struct imx_imx_i2c_data imx50_imx_i2c_data[] __initconst = { | |||
82 | #ifdef CONFIG_SOC_IMX51 | 83 | #ifdef CONFIG_SOC_IMX51 |
83 | const struct imx_imx_i2c_data imx51_imx_i2c_data[] __initconst = { | 84 | const struct imx_imx_i2c_data imx51_imx_i2c_data[] __initconst = { |
84 | #define imx51_imx_i2c_data_entry(_id, _hwid) \ | 85 | #define imx51_imx_i2c_data_entry(_id, _hwid) \ |
85 | imx_imx_i2c_data_entry(MX51, _id, _hwid, SZ_4K) | 86 | imx_imx_i2c_data_entry(MX51, "imx21-i2c", _id, _hwid, SZ_4K) |
86 | imx51_imx_i2c_data_entry(0, 1), | 87 | imx51_imx_i2c_data_entry(0, 1), |
87 | imx51_imx_i2c_data_entry(1, 2), | 88 | imx51_imx_i2c_data_entry(1, 2), |
88 | { | 89 | { |
90 | .devid = "imx21-i2c", | ||
89 | .id = 2, | 91 | .id = 2, |
90 | .iobase = MX51_HSI2C_DMA_BASE_ADDR, | 92 | .iobase = MX51_HSI2C_DMA_BASE_ADDR, |
91 | .iosize = SZ_16K, | 93 | .iosize = SZ_16K, |
@@ -97,7 +99,7 @@ const struct imx_imx_i2c_data imx51_imx_i2c_data[] __initconst = { | |||
97 | #ifdef CONFIG_SOC_IMX53 | 99 | #ifdef CONFIG_SOC_IMX53 |
98 | const struct imx_imx_i2c_data imx53_imx_i2c_data[] __initconst = { | 100 | const struct imx_imx_i2c_data imx53_imx_i2c_data[] __initconst = { |
99 | #define imx53_imx_i2c_data_entry(_id, _hwid) \ | 101 | #define imx53_imx_i2c_data_entry(_id, _hwid) \ |
100 | imx_imx_i2c_data_entry(MX53, _id, _hwid, SZ_4K) | 102 | imx_imx_i2c_data_entry(MX53, "imx21-i2c", _id, _hwid, SZ_4K) |
101 | imx53_imx_i2c_data_entry(0, 1), | 103 | imx53_imx_i2c_data_entry(0, 1), |
102 | imx53_imx_i2c_data_entry(1, 2), | 104 | imx53_imx_i2c_data_entry(1, 2), |
103 | imx53_imx_i2c_data_entry(2, 3), | 105 | imx53_imx_i2c_data_entry(2, 3), |
@@ -120,7 +122,7 @@ struct platform_device *__init imx_add_imx_i2c( | |||
120 | }, | 122 | }, |
121 | }; | 123 | }; |
122 | 124 | ||
123 | return imx_add_platform_device("imx-i2c", data->id, | 125 | return imx_add_platform_device(data->devid, data->id, |
124 | res, ARRAY_SIZE(res), | 126 | res, ARRAY_SIZE(res), |
125 | pdata, sizeof(*pdata)); | 127 | pdata, sizeof(*pdata)); |
126 | } | 128 | } |
diff --git a/arch/arm/mach-imx/imx27-dt.c b/arch/arm/mach-imx/imx27-dt.c index 83c56fb46aa2..43fbf8640109 100644 --- a/arch/arm/mach-imx/imx27-dt.c +++ b/arch/arm/mach-imx/imx27-dt.c | |||
@@ -23,8 +23,8 @@ static const struct of_dev_auxdata imx27_auxdata_lookup[] __initconst = { | |||
23 | OF_DEV_AUXDATA("fsl,imx27-uart", MX27_UART2_BASE_ADDR, "imx21-uart.1", NULL), | 23 | OF_DEV_AUXDATA("fsl,imx27-uart", MX27_UART2_BASE_ADDR, "imx21-uart.1", NULL), |
24 | OF_DEV_AUXDATA("fsl,imx27-uart", MX27_UART3_BASE_ADDR, "imx21-uart.2", NULL), | 24 | OF_DEV_AUXDATA("fsl,imx27-uart", MX27_UART3_BASE_ADDR, "imx21-uart.2", NULL), |
25 | OF_DEV_AUXDATA("fsl,imx27-fec", MX27_FEC_BASE_ADDR, "imx27-fec.0", NULL), | 25 | OF_DEV_AUXDATA("fsl,imx27-fec", MX27_FEC_BASE_ADDR, "imx27-fec.0", NULL), |
26 | OF_DEV_AUXDATA("fsl,imx27-i2c", MX27_I2C1_BASE_ADDR, "imx-i2c.0", NULL), | 26 | OF_DEV_AUXDATA("fsl,imx27-i2c", MX27_I2C1_BASE_ADDR, "imx21-i2c.0", NULL), |
27 | OF_DEV_AUXDATA("fsl,imx27-i2c", MX27_I2C2_BASE_ADDR, "imx-i2c.1", NULL), | 27 | OF_DEV_AUXDATA("fsl,imx27-i2c", MX27_I2C2_BASE_ADDR, "imx21-i2c.1", NULL), |
28 | OF_DEV_AUXDATA("fsl,imx27-cspi", MX27_CSPI1_BASE_ADDR, "imx27-cspi.0", NULL), | 28 | OF_DEV_AUXDATA("fsl,imx27-cspi", MX27_CSPI1_BASE_ADDR, "imx27-cspi.0", NULL), |
29 | OF_DEV_AUXDATA("fsl,imx27-cspi", MX27_CSPI2_BASE_ADDR, "imx27-cspi.1", NULL), | 29 | OF_DEV_AUXDATA("fsl,imx27-cspi", MX27_CSPI2_BASE_ADDR, "imx27-cspi.1", NULL), |
30 | OF_DEV_AUXDATA("fsl,imx27-cspi", MX27_CSPI3_BASE_ADDR, "imx27-cspi.2", NULL), | 30 | OF_DEV_AUXDATA("fsl,imx27-cspi", MX27_CSPI3_BASE_ADDR, "imx27-cspi.2", NULL), |
diff --git a/arch/arm/mach-imx/imx51-dt.c b/arch/arm/mach-imx/imx51-dt.c index e105f12f1e6f..a0391a14ad22 100644 --- a/arch/arm/mach-imx/imx51-dt.c +++ b/arch/arm/mach-imx/imx51-dt.c | |||
@@ -37,8 +37,8 @@ static const struct of_dev_auxdata imx51_auxdata_lookup[] __initconst = { | |||
37 | OF_DEV_AUXDATA("fsl,imx51-ecspi", MX51_ECSPI1_BASE_ADDR, "imx51-ecspi.0", NULL), | 37 | OF_DEV_AUXDATA("fsl,imx51-ecspi", MX51_ECSPI1_BASE_ADDR, "imx51-ecspi.0", NULL), |
38 | OF_DEV_AUXDATA("fsl,imx51-ecspi", MX51_ECSPI2_BASE_ADDR, "imx51-ecspi.1", NULL), | 38 | OF_DEV_AUXDATA("fsl,imx51-ecspi", MX51_ECSPI2_BASE_ADDR, "imx51-ecspi.1", NULL), |
39 | OF_DEV_AUXDATA("fsl,imx51-cspi", MX51_CSPI_BASE_ADDR, "imx35-cspi.0", NULL), | 39 | OF_DEV_AUXDATA("fsl,imx51-cspi", MX51_CSPI_BASE_ADDR, "imx35-cspi.0", NULL), |
40 | OF_DEV_AUXDATA("fsl,imx51-i2c", MX51_I2C1_BASE_ADDR, "imx-i2c.0", NULL), | 40 | OF_DEV_AUXDATA("fsl,imx51-i2c", MX51_I2C1_BASE_ADDR, "imx21-i2c.0", NULL), |
41 | OF_DEV_AUXDATA("fsl,imx51-i2c", MX51_I2C2_BASE_ADDR, "imx-i2c.1", NULL), | 41 | OF_DEV_AUXDATA("fsl,imx51-i2c", MX51_I2C2_BASE_ADDR, "imx21-i2c.1", NULL), |
42 | OF_DEV_AUXDATA("fsl,imx51-sdma", MX51_SDMA_BASE_ADDR, "imx35-sdma", NULL), | 42 | OF_DEV_AUXDATA("fsl,imx51-sdma", MX51_SDMA_BASE_ADDR, "imx35-sdma", NULL), |
43 | OF_DEV_AUXDATA("fsl,imx51-wdt", MX51_WDOG1_BASE_ADDR, "imx2-wdt.0", NULL), | 43 | OF_DEV_AUXDATA("fsl,imx51-wdt", MX51_WDOG1_BASE_ADDR, "imx2-wdt.0", NULL), |
44 | { /* sentinel */ } | 44 | { /* sentinel */ } |
diff --git a/arch/arm/mach-imx/mach-imx53.c b/arch/arm/mach-imx/mach-imx53.c index aaa90a781b35..0e0aadfb625e 100644 --- a/arch/arm/mach-imx/mach-imx53.c +++ b/arch/arm/mach-imx/mach-imx53.c | |||
@@ -43,9 +43,9 @@ static const struct of_dev_auxdata imx53_auxdata_lookup[] __initconst = { | |||
43 | OF_DEV_AUXDATA("fsl,imx53-ecspi", MX53_ECSPI1_BASE_ADDR, "imx51-ecspi.0", NULL), | 43 | OF_DEV_AUXDATA("fsl,imx53-ecspi", MX53_ECSPI1_BASE_ADDR, "imx51-ecspi.0", NULL), |
44 | OF_DEV_AUXDATA("fsl,imx53-ecspi", MX53_ECSPI2_BASE_ADDR, "imx51-ecspi.1", NULL), | 44 | OF_DEV_AUXDATA("fsl,imx53-ecspi", MX53_ECSPI2_BASE_ADDR, "imx51-ecspi.1", NULL), |
45 | OF_DEV_AUXDATA("fsl,imx53-cspi", MX53_CSPI_BASE_ADDR, "imx35-cspi.0", NULL), | 45 | OF_DEV_AUXDATA("fsl,imx53-cspi", MX53_CSPI_BASE_ADDR, "imx35-cspi.0", NULL), |
46 | OF_DEV_AUXDATA("fsl,imx53-i2c", MX53_I2C1_BASE_ADDR, "imx-i2c.0", NULL), | 46 | OF_DEV_AUXDATA("fsl,imx53-i2c", MX53_I2C1_BASE_ADDR, "imx21-i2c.0", NULL), |
47 | OF_DEV_AUXDATA("fsl,imx53-i2c", MX53_I2C2_BASE_ADDR, "imx-i2c.1", NULL), | 47 | OF_DEV_AUXDATA("fsl,imx53-i2c", MX53_I2C2_BASE_ADDR, "imx21-i2c.1", NULL), |
48 | OF_DEV_AUXDATA("fsl,imx53-i2c", MX53_I2C3_BASE_ADDR, "imx-i2c.2", NULL), | 48 | OF_DEV_AUXDATA("fsl,imx53-i2c", MX53_I2C3_BASE_ADDR, "imx21-i2c.2", NULL), |
49 | OF_DEV_AUXDATA("fsl,imx53-sdma", MX53_SDMA_BASE_ADDR, "imx35-sdma", NULL), | 49 | OF_DEV_AUXDATA("fsl,imx53-sdma", MX53_SDMA_BASE_ADDR, "imx35-sdma", NULL), |
50 | OF_DEV_AUXDATA("fsl,imx53-wdt", MX53_WDOG1_BASE_ADDR, "imx2-wdt.0", NULL), | 50 | OF_DEV_AUXDATA("fsl,imx53-wdt", MX53_WDOG1_BASE_ADDR, "imx2-wdt.0", NULL), |
51 | { /* sentinel */ } | 51 | { /* sentinel */ } |