linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 06/11] ARM: shmobile: r8a7778: cleanup registration of hspi
@ 2013-07-11  8:32 Kuninori Morimoto
  2013-07-11 11:37 ` Sergei Shtylyov
  0 siblings, 1 reply; 2+ messages in thread
From: Kuninori Morimoto @ 2013-07-11  8:32 UTC (permalink / raw)
  To: linux-sh

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>
---
 arch/arm/mach-shmobile/board-bockw.c          |    1 -
 arch/arm/mach-shmobile/include/mach/r8a7778.h |    1 -
 arch/arm/mach-shmobile/setup-r8a7778.c        |    5 ++++-
 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 9583314..8978f61 100644
--- a/arch/arm/mach-shmobile/board-bockw.c
+++ b/arch/arm/mach-shmobile/board-bockw.c
@@ -205,7 +205,6 @@ static void __init bockw_init(void)
 	r8a7778_clock_init();
 	r8a7778_init_irq_extpin(1);
 	r8a7778_add_standard_devices();
-	r8a7778_add_hspi_device(0);
 
 	i2c_register_board_info(0, i2c0_devices,
 				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 d6d096d..b9dda26 100644
--- a/arch/arm/mach-shmobile/include/mach/r8a7778.h
+++ b/arch/arm/mach-shmobile/include/mach/r8a7778.h
@@ -20,7 +20,6 @@
 
 extern void r8a7778_add_standard_devices(void);
 extern void r8a7778_add_standard_devices_dt(void);
-extern void r8a7778_add_hspi_device(int id);
 
 extern void r8a7778_init_late(void);
 extern void r8a7778_init_delay(void);
diff --git a/arch/arm/mach-shmobile/setup-r8a7778.c b/arch/arm/mach-shmobile/setup-r8a7778.c
index 0f6edad..b77ebab 100644
--- a/arch/arm/mach-shmobile/setup-r8a7778.c
+++ b/arch/arm/mach-shmobile/setup-r8a7778.c
@@ -258,7 +258,7 @@ static struct resource hspi_resources[] __initdata = {
 	DEFINE_RES_IRQ(gic_iid(0x75)),
 };
 
-void __init r8a7778_add_hspi_device(int id)
+void __init r8a7778_register_hspi(int id)
 {
 	BUG_ON(id < 0 || id > 2);
 
@@ -293,6 +293,9 @@ void __init r8a7778_add_standard_devices(void)
 	r8a7778_register_i2c(1);
 	r8a7778_register_i2c(2);
 	r8a7778_register_i2c(3);
+	r8a7778_register_hspi(0);
+	r8a7778_register_hspi(1);
+	r8a7778_register_hspi(2);
 }
 
 void __init r8a7778_init_late(void)
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 06/11] ARM: shmobile: r8a7778: cleanup registration of hspi
  2013-07-11  8:32 [PATCH 06/11] ARM: shmobile: r8a7778: cleanup registration of hspi Kuninori Morimoto
@ 2013-07-11 11:37 ` Sergei Shtylyov
  0 siblings, 0 replies; 2+ messages in thread
From: Sergei Shtylyov @ 2013-07-11 11:37 UTC (permalink / raw)
  To: linux-sh

Hello.

On 11-07-2013 12:32, Kuninori Morimoto wrote:

> 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>

     How about PinMux again?

WBR, Sergei


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-07-11 11:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-11  8:32 [PATCH 06/11] ARM: shmobile: r8a7778: cleanup registration of hspi Kuninori Morimoto
2013-07-11 11:37 ` Sergei Shtylyov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).