diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2011-06-29 21:24:26 -0400 |
---|---|---|
committer | Shawn Guo <shawn.guo@linaro.org> | 2011-07-26 21:31:27 -0400 |
commit | 57ed3314e0bfa90ea63c63b8d3038814e9d98a20 (patch) | |
tree | ce82f977d851c5cb2b0d6c28da0ef7270f3be848 /arch/arm/plat-mxc | |
parent | 842afc02cf04f0474392b4c5efd808996a804fa6 (diff) |
mmc: sdhci-esdhc-imx: get rid of the uses of cpu_is_mx()
The patch removes all the uses of cpu_is_mx(). Instead, it utilizes
platform_device_id to distinguish the esdhc differences among SoCs.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Cc: Wolfram Sang <w.sang@pengutronix.de>
Cc: Chris Ball <cjb@laptop.org>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'arch/arm/plat-mxc')
-rw-r--r-- | arch/arm/plat-mxc/devices/platform-sdhci-esdhc-imx.c | 17 | ||||
-rw-r--r-- | arch/arm/plat-mxc/include/mach/devices-common.h | 1 |
2 files changed, 10 insertions, 8 deletions
diff --git a/arch/arm/plat-mxc/devices/platform-sdhci-esdhc-imx.c b/arch/arm/plat-mxc/devices/platform-sdhci-esdhc-imx.c index 79d6d711d123..5955f5da82ee 100644 --- a/arch/arm/plat-mxc/devices/platform-sdhci-esdhc-imx.c +++ b/arch/arm/plat-mxc/devices/platform-sdhci-esdhc-imx.c | |||
@@ -10,21 +10,22 @@ | |||
10 | #include <mach/devices-common.h> | 10 | #include <mach/devices-common.h> |
11 | #include <mach/esdhc.h> | 11 | #include <mach/esdhc.h> |
12 | 12 | ||
13 | #define imx_sdhci_esdhc_imx_data_entry_single(soc, _id, hwid) \ | 13 | #define imx_sdhci_esdhc_imx_data_entry_single(soc, _devid, _id, hwid) \ |
14 | { \ | 14 | { \ |
15 | .devid = _devid, \ | ||
15 | .id = _id, \ | 16 | .id = _id, \ |
16 | .iobase = soc ## _ESDHC ## hwid ## _BASE_ADDR, \ | 17 | .iobase = soc ## _ESDHC ## hwid ## _BASE_ADDR, \ |
17 | .irq = soc ## _INT_ESDHC ## hwid, \ | 18 | .irq = soc ## _INT_ESDHC ## hwid, \ |
18 | } | 19 | } |
19 | 20 | ||
20 | #define imx_sdhci_esdhc_imx_data_entry(soc, id, hwid) \ | 21 | #define imx_sdhci_esdhc_imx_data_entry(soc, devid, id, hwid) \ |
21 | [id] = imx_sdhci_esdhc_imx_data_entry_single(soc, id, hwid) | 22 | [id] = imx_sdhci_esdhc_imx_data_entry_single(soc, devid, id, hwid) |
22 | 23 | ||
23 | #ifdef CONFIG_SOC_IMX25 | 24 | #ifdef CONFIG_SOC_IMX25 |
24 | const struct imx_sdhci_esdhc_imx_data | 25 | const struct imx_sdhci_esdhc_imx_data |
25 | imx25_sdhci_esdhc_imx_data[] __initconst = { | 26 | imx25_sdhci_esdhc_imx_data[] __initconst = { |
26 | #define imx25_sdhci_esdhc_imx_data_entry(_id, _hwid) \ | 27 | #define imx25_sdhci_esdhc_imx_data_entry(_id, _hwid) \ |
27 | imx_sdhci_esdhc_imx_data_entry(MX25, _id, _hwid) | 28 | imx_sdhci_esdhc_imx_data_entry(MX25, "sdhci-esdhc-imx25", _id, _hwid) |
28 | imx25_sdhci_esdhc_imx_data_entry(0, 1), | 29 | imx25_sdhci_esdhc_imx_data_entry(0, 1), |
29 | imx25_sdhci_esdhc_imx_data_entry(1, 2), | 30 | imx25_sdhci_esdhc_imx_data_entry(1, 2), |
30 | }; | 31 | }; |
@@ -34,7 +35,7 @@ imx25_sdhci_esdhc_imx_data[] __initconst = { | |||
34 | const struct imx_sdhci_esdhc_imx_data | 35 | const struct imx_sdhci_esdhc_imx_data |
35 | imx35_sdhci_esdhc_imx_data[] __initconst = { | 36 | imx35_sdhci_esdhc_imx_data[] __initconst = { |
36 | #define imx35_sdhci_esdhc_imx_data_entry(_id, _hwid) \ | 37 | #define imx35_sdhci_esdhc_imx_data_entry(_id, _hwid) \ |
37 | imx_sdhci_esdhc_imx_data_entry(MX35, _id, _hwid) | 38 | imx_sdhci_esdhc_imx_data_entry(MX35, "sdhci-esdhc-imx35", _id, _hwid) |
38 | imx35_sdhci_esdhc_imx_data_entry(0, 1), | 39 | imx35_sdhci_esdhc_imx_data_entry(0, 1), |
39 | imx35_sdhci_esdhc_imx_data_entry(1, 2), | 40 | imx35_sdhci_esdhc_imx_data_entry(1, 2), |
40 | imx35_sdhci_esdhc_imx_data_entry(2, 3), | 41 | imx35_sdhci_esdhc_imx_data_entry(2, 3), |
@@ -45,7 +46,7 @@ imx35_sdhci_esdhc_imx_data[] __initconst = { | |||
45 | const struct imx_sdhci_esdhc_imx_data | 46 | const struct imx_sdhci_esdhc_imx_data |
46 | imx51_sdhci_esdhc_imx_data[] __initconst = { | 47 | imx51_sdhci_esdhc_imx_data[] __initconst = { |
47 | #define imx51_sdhci_esdhc_imx_data_entry(_id, _hwid) \ | 48 | #define imx51_sdhci_esdhc_imx_data_entry(_id, _hwid) \ |
48 | imx_sdhci_esdhc_imx_data_entry(MX51, _id, _hwid) | 49 | imx_sdhci_esdhc_imx_data_entry(MX51, "sdhci-esdhc-imx51", _id, _hwid) |
49 | imx51_sdhci_esdhc_imx_data_entry(0, 1), | 50 | imx51_sdhci_esdhc_imx_data_entry(0, 1), |
50 | imx51_sdhci_esdhc_imx_data_entry(1, 2), | 51 | imx51_sdhci_esdhc_imx_data_entry(1, 2), |
51 | imx51_sdhci_esdhc_imx_data_entry(2, 3), | 52 | imx51_sdhci_esdhc_imx_data_entry(2, 3), |
@@ -57,7 +58,7 @@ imx51_sdhci_esdhc_imx_data[] __initconst = { | |||
57 | const struct imx_sdhci_esdhc_imx_data | 58 | const struct imx_sdhci_esdhc_imx_data |
58 | imx53_sdhci_esdhc_imx_data[] __initconst = { | 59 | imx53_sdhci_esdhc_imx_data[] __initconst = { |
59 | #define imx53_sdhci_esdhc_imx_data_entry(_id, _hwid) \ | 60 | #define imx53_sdhci_esdhc_imx_data_entry(_id, _hwid) \ |
60 | imx_sdhci_esdhc_imx_data_entry(MX53, _id, _hwid) | 61 | imx_sdhci_esdhc_imx_data_entry(MX53, "sdhci-esdhc-imx53", _id, _hwid) |
61 | imx53_sdhci_esdhc_imx_data_entry(0, 1), | 62 | imx53_sdhci_esdhc_imx_data_entry(0, 1), |
62 | imx53_sdhci_esdhc_imx_data_entry(1, 2), | 63 | imx53_sdhci_esdhc_imx_data_entry(1, 2), |
63 | imx53_sdhci_esdhc_imx_data_entry(2, 3), | 64 | imx53_sdhci_esdhc_imx_data_entry(2, 3), |
@@ -93,6 +94,6 @@ struct platform_device *__init imx_add_sdhci_esdhc_imx( | |||
93 | if (!pdata) | 94 | if (!pdata) |
94 | pdata = &default_esdhc_pdata; | 95 | pdata = &default_esdhc_pdata; |
95 | 96 | ||
96 | return imx_add_platform_device("sdhci-esdhc-imx", data->id, res, | 97 | return imx_add_platform_device(data->devid, data->id, res, |
97 | ARRAY_SIZE(res), pdata, sizeof(*pdata)); | 98 | ARRAY_SIZE(res), pdata, sizeof(*pdata)); |
98 | } | 99 | } |
diff --git a/arch/arm/plat-mxc/include/mach/devices-common.h b/arch/arm/plat-mxc/include/mach/devices-common.h index 6ac24501426d..3beef7729788 100644 --- a/arch/arm/plat-mxc/include/mach/devices-common.h +++ b/arch/arm/plat-mxc/include/mach/devices-common.h | |||
@@ -277,6 +277,7 @@ struct platform_device *__init imx_add_mxc_w1( | |||
277 | 277 | ||
278 | #include <mach/esdhc.h> | 278 | #include <mach/esdhc.h> |
279 | struct imx_sdhci_esdhc_imx_data { | 279 | struct imx_sdhci_esdhc_imx_data { |
280 | const char *devid; | ||
280 | int id; | 281 | int id; |
281 | resource_size_t iobase; | 282 | resource_size_t iobase; |
282 | resource_size_t irq; | 283 | resource_size_t irq; |