aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2013-07-30 03:02:24 -0400
committerSimon Horman <horms+renesas@verge.net.au>2013-08-06 05:07:09 -0400
commit3c7b5362323cd4b5d09a5b21ba8e74b3de05fc73 (patch)
tree4676c3750adae0d4379a75fd1441c35419929b96
parent1fd4eecd480b82e11900ae6a8f44d92efeb96004 (diff)
ARM: shmobile: r8a7778: cleanup registration of hspi
sh-hspi driver which doesn't need platform data at the time of registration can be registerd on SoC. And, registering these drivers in the SoC code can avoid unwanted device numbering issue. (ex. the hspi2 device number will be spi.0 if hspi2 only registered) This patch registers it on SoC 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>
-rw-r--r--arch/arm/mach-shmobile/board-bockw.c1
-rw-r--r--arch/arm/mach-shmobile/include/mach/r8a7778.h1
-rw-r--r--arch/arm/mach-shmobile/setup-r8a7778.c5
3 files changed, 4 insertions, 3 deletions
diff --git a/arch/arm/mach-shmobile/board-bockw.c b/arch/arm/mach-shmobile/board-bockw.c
index d7d342740003..b6f3d2f4108f 100644
--- a/arch/arm/mach-shmobile/board-bockw.c
+++ b/arch/arm/mach-shmobile/board-bockw.c
@@ -200,7 +200,6 @@ static void __init bockw_init(void)
200 r8a7778_init_irq_extpin(1); 200 r8a7778_init_irq_extpin(1);
201 r8a7778_add_standard_devices(); 201 r8a7778_add_standard_devices();
202 r8a7778_add_ether_device(&ether_platform_data); 202 r8a7778_add_ether_device(&ether_platform_data);
203 r8a7778_add_hspi_device(0);
204 203
205 i2c_register_board_info(0, i2c0_devices, 204 i2c_register_board_info(0, i2c0_devices,
206 ARRAY_SIZE(i2c0_devices)); 205 ARRAY_SIZE(i2c0_devices));
diff --git a/arch/arm/mach-shmobile/include/mach/r8a7778.h b/arch/arm/mach-shmobile/include/mach/r8a7778.h
index 9874511bbdbb..41fd6da27574 100644
--- a/arch/arm/mach-shmobile/include/mach/r8a7778.h
+++ b/arch/arm/mach-shmobile/include/mach/r8a7778.h
@@ -23,7 +23,6 @@
23extern void r8a7778_add_standard_devices(void); 23extern void r8a7778_add_standard_devices(void);
24extern void r8a7778_add_standard_devices_dt(void); 24extern void r8a7778_add_standard_devices_dt(void);
25extern void r8a7778_add_ether_device(struct sh_eth_plat_data *pdata); 25extern void r8a7778_add_ether_device(struct sh_eth_plat_data *pdata);
26extern void r8a7778_add_hspi_device(int id);
27extern void r8a7778_add_dt_devices(void); 26extern void r8a7778_add_dt_devices(void);
28 27
29extern void r8a7778_init_late(void); 28extern void r8a7778_init_late(void);
diff --git a/arch/arm/mach-shmobile/setup-r8a7778.c b/arch/arm/mach-shmobile/setup-r8a7778.c
index ce3b54dfcc44..1a154d4a4907 100644
--- a/arch/arm/mach-shmobile/setup-r8a7778.c
+++ b/arch/arm/mach-shmobile/setup-r8a7778.c
@@ -272,7 +272,7 @@ static struct resource hspi_resources[] __initdata = {
272 DEFINE_RES_IRQ(gic_iid(0x75)), 272 DEFINE_RES_IRQ(gic_iid(0x75)),
273}; 273};
274 274
275void __init r8a7778_add_hspi_device(int id) 275void __init r8a7778_register_hspi(int id)
276{ 276{
277 BUG_ON(id < 0 || id > 2); 277 BUG_ON(id < 0 || id > 2);
278 278
@@ -312,6 +312,9 @@ void __init r8a7778_add_standard_devices(void)
312 r8a7778_register_i2c(1); 312 r8a7778_register_i2c(1);
313 r8a7778_register_i2c(2); 313 r8a7778_register_i2c(2);
314 r8a7778_register_i2c(3); 314 r8a7778_register_i2c(3);
315 r8a7778_register_hspi(0);
316 r8a7778_register_hspi(1);
317 r8a7778_register_hspi(2);
315} 318}
316 319
317void __init r8a7778_init_late(void) 320void __init r8a7778_init_late(void)