diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2013-07-26 03:33:48 -0400 |
---|---|---|
committer | Simon Horman <horms+renesas@verge.net.au> | 2013-08-06 05:07:09 -0400 |
commit | a66c9744574c0e7b5c935c7c1ec84e0e741fb725 (patch) | |
tree | 84df4b637ffcabe5af83655f892d78f55b100331 /arch/arm/mach-shmobile | |
parent | 4e0f3fcfe2f3716e3fa9c442cee93211bf2ac793 (diff) |
ARM: shmobile: r8a7778: cleanup registration of mmcif
sh_mmcif driver which needs platform data at the time of
registration is used from BockW only.
Now, ARM/shmobile aims to support DT,
and the C code base board support will be removed
if DT support is completed.
Current driver registration method which needs platform data
and which is not shared complicates codes.
This means legacy C code cleanup after DT supporting
will be more complicated
This patch registers it on board code as cleanup C code
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Diffstat (limited to 'arch/arm/mach-shmobile')
-rw-r--r-- | arch/arm/mach-shmobile/board-bockw.c | 12 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/include/mach/r8a7778.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/setup-r8a7778.c | 14 |
3 files changed, 11 insertions, 17 deletions
diff --git a/arch/arm/mach-shmobile/board-bockw.c b/arch/arm/mach-shmobile/board-bockw.c index d5554646916c..58e686d1cad6 100644 --- a/arch/arm/mach-shmobile/board-bockw.c +++ b/arch/arm/mach-shmobile/board-bockw.c | |||
@@ -20,6 +20,7 @@ | |||
20 | 20 | ||
21 | #include <linux/mfd/tmio.h> | 21 | #include <linux/mfd/tmio.h> |
22 | #include <linux/mmc/host.h> | 22 | #include <linux/mmc/host.h> |
23 | #include <linux/mmc/sh_mmcif.h> | ||
23 | #include <linux/mtd/partitions.h> | 24 | #include <linux/mtd/partitions.h> |
24 | #include <linux/pinctrl/machine.h> | 25 | #include <linux/pinctrl/machine.h> |
25 | #include <linux/platform_device.h> | 26 | #include <linux/platform_device.h> |
@@ -135,6 +136,11 @@ static struct spi_board_info spi_board_info[] __initdata = { | |||
135 | }; | 136 | }; |
136 | 137 | ||
137 | /* MMC */ | 138 | /* MMC */ |
139 | static struct resource mmc_resources[] __initdata = { | ||
140 | DEFINE_RES_MEM(0xffe4e000, 0x100), | ||
141 | DEFINE_RES_IRQ(gic_iid(0x5d)), | ||
142 | }; | ||
143 | |||
138 | static struct sh_mmcif_plat_data sh_mmcif_plat = { | 144 | static struct sh_mmcif_plat_data sh_mmcif_plat = { |
139 | .sup_pclk = 0, | 145 | .sup_pclk = 0, |
140 | .ocr = MMC_VDD_165_195 | MMC_VDD_32_33 | MMC_VDD_33_34, | 146 | .ocr = MMC_VDD_165_195 | MMC_VDD_32_33 | MMC_VDD_33_34, |
@@ -185,7 +191,6 @@ static void __init bockw_init(void) | |||
185 | r8a7778_add_ether_device(ðer_platform_data); | 191 | r8a7778_add_ether_device(ðer_platform_data); |
186 | r8a7778_add_i2c_device(0); | 192 | r8a7778_add_i2c_device(0); |
187 | r8a7778_add_hspi_device(0); | 193 | r8a7778_add_hspi_device(0); |
188 | r8a7778_add_mmc_device(&sh_mmcif_plat); | ||
189 | 194 | ||
190 | i2c_register_board_info(0, i2c0_devices, | 195 | i2c_register_board_info(0, i2c0_devices, |
191 | ARRAY_SIZE(i2c0_devices)); | 196 | ARRAY_SIZE(i2c0_devices)); |
@@ -195,6 +200,11 @@ static void __init bockw_init(void) | |||
195 | ARRAY_SIZE(bockw_pinctrl_map)); | 200 | ARRAY_SIZE(bockw_pinctrl_map)); |
196 | r8a7778_pinmux_init(); | 201 | r8a7778_pinmux_init(); |
197 | 202 | ||
203 | platform_device_register_resndata( | ||
204 | &platform_bus, "sh_mmcif", -1, | ||
205 | mmc_resources, ARRAY_SIZE(mmc_resources), | ||
206 | &sh_mmcif_plat, sizeof(struct sh_mmcif_plat_data)); | ||
207 | |||
198 | /* for SMSC */ | 208 | /* for SMSC */ |
199 | base = ioremap_nocache(FPGA, SZ_1M); | 209 | base = ioremap_nocache(FPGA, SZ_1M); |
200 | if (base) { | 210 | if (base) { |
diff --git a/arch/arm/mach-shmobile/include/mach/r8a7778.h b/arch/arm/mach-shmobile/include/mach/r8a7778.h index 8d24f73d142f..2f456071732b 100644 --- a/arch/arm/mach-shmobile/include/mach/r8a7778.h +++ b/arch/arm/mach-shmobile/include/mach/r8a7778.h | |||
@@ -18,7 +18,6 @@ | |||
18 | #ifndef __ASM_R8A7778_H__ | 18 | #ifndef __ASM_R8A7778_H__ |
19 | #define __ASM_R8A7778_H__ | 19 | #define __ASM_R8A7778_H__ |
20 | 20 | ||
21 | #include <linux/mmc/sh_mmcif.h> | ||
22 | #include <linux/mmc/sh_mobile_sdhi.h> | 21 | #include <linux/mmc/sh_mobile_sdhi.h> |
23 | #include <linux/sh_eth.h> | 22 | #include <linux/sh_eth.h> |
24 | #include <linux/platform_data/usb-rcar-phy.h> | 23 | #include <linux/platform_data/usb-rcar-phy.h> |
@@ -29,7 +28,6 @@ extern void r8a7778_add_ether_device(struct sh_eth_plat_data *pdata); | |||
29 | extern void r8a7778_add_usb_phy_device(struct rcar_phy_platform_data *pdata); | 28 | extern void r8a7778_add_usb_phy_device(struct rcar_phy_platform_data *pdata); |
30 | extern void r8a7778_add_i2c_device(int id); | 29 | extern void r8a7778_add_i2c_device(int id); |
31 | extern void r8a7778_add_hspi_device(int id); | 30 | extern void r8a7778_add_hspi_device(int id); |
32 | extern void r8a7778_add_mmc_device(struct sh_mmcif_plat_data *info); | ||
33 | extern void r8a7778_add_dt_devices(void); | 31 | extern void r8a7778_add_dt_devices(void); |
34 | 32 | ||
35 | extern void r8a7778_init_late(void); | 33 | extern void r8a7778_init_late(void); |
diff --git a/arch/arm/mach-shmobile/setup-r8a7778.c b/arch/arm/mach-shmobile/setup-r8a7778.c index 9d4b6bf4245e..960084626f8b 100644 --- a/arch/arm/mach-shmobile/setup-r8a7778.c +++ b/arch/arm/mach-shmobile/setup-r8a7778.c | |||
@@ -319,20 +319,6 @@ void __init r8a7778_add_hspi_device(int id) | |||
319 | hspi_resources + (2 * id), 2); | 319 | hspi_resources + (2 * id), 2); |
320 | } | 320 | } |
321 | 321 | ||
322 | /* MMC */ | ||
323 | static struct resource mmc_resources[] __initdata = { | ||
324 | DEFINE_RES_MEM(0xffe4e000, 0x100), | ||
325 | DEFINE_RES_IRQ(gic_iid(0x5d)), | ||
326 | }; | ||
327 | |||
328 | void __init r8a7778_add_mmc_device(struct sh_mmcif_plat_data *info) | ||
329 | { | ||
330 | platform_device_register_resndata( | ||
331 | &platform_bus, "sh_mmcif", -1, | ||
332 | mmc_resources, ARRAY_SIZE(mmc_resources), | ||
333 | info, sizeof(*info)); | ||
334 | } | ||
335 | |||
336 | void __init r8a7778_add_dt_devices(void) | 322 | void __init r8a7778_add_dt_devices(void) |
337 | { | 323 | { |
338 | int i; | 324 | int i; |