linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/4 v2] ARM: shmobile: r8a7778: add r8a7778_add_usb_host_device()
@ 2013-07-10  2:28 Kuninori Morimoto
  2013-07-10 11:58 ` Sergei Shtylyov
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Kuninori Morimoto @ 2013-07-10  2:28 UTC (permalink / raw)
  To: linux-sh

The USB host driver was registered in compulsorily
on current r8a7778 SoC code.
But it should be decided on platform, not SoC.
This patch adds r8a7778_add_usb_host_device() for it.

Tested-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
v1 -> v2

 - no change

 arch/arm/mach-shmobile/board-bockw.c          |    7 ++++++-
 arch/arm/mach-shmobile/include/mach/r8a7778.h |    3 ++-
 arch/arm/mach-shmobile/setup-r8a7778.c        |   13 ++++++-------
 3 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/arch/arm/mach-shmobile/board-bockw.c b/arch/arm/mach-shmobile/board-bockw.c
index 6f541ad..a57be8a 100644
--- a/arch/arm/mach-shmobile/board-bockw.c
+++ b/arch/arm/mach-shmobile/board-bockw.c
@@ -232,6 +232,11 @@ static void __init bockw_init(void)
 	}
 }
 
+static void __init bockw_init_late(void)
+{
+	r8a7778_add_usb_host_device();
+}
+
 static const char *bockw_boards_compat_dt[] __initdata = {
 	"renesas,bockw",
 	NULL,
@@ -243,5 +248,5 @@ DT_MACHINE_START(BOCKW_DT, "bockw")
 	.init_machine	= bockw_init,
 	.init_time	= shmobile_timer_init,
 	.dt_compat	= bockw_boards_compat_dt,
-	.init_late      = r8a7778_init_late,
+	.init_late      = bockw_init_late,
 MACHINE_END
diff --git a/arch/arm/mach-shmobile/include/mach/r8a7778.h b/arch/arm/mach-shmobile/include/mach/r8a7778.h
index 35c8bce..54e0132 100644
--- a/arch/arm/mach-shmobile/include/mach/r8a7778.h
+++ b/arch/arm/mach-shmobile/include/mach/r8a7778.h
@@ -30,8 +30,9 @@ extern void r8a7778_add_ether_device(struct sh_eth_plat_data *pdata);
 extern void r8a7778_add_i2c_device(int id);
 extern void r8a7778_add_hspi_device(int id);
 extern void r8a7778_add_mmc_device(struct sh_mmcif_plat_data *info);
-
 extern void r8a7778_add_usb_phy_device(struct rcar_phy_platform_data *pdata);
+extern void r8a7778_add_usb_host_device(void);
+
 extern void r8a7778_init_late(void);
 extern void r8a7778_init_delay(void);
 extern void r8a7778_init_irq_dt(void);
diff --git a/arch/arm/mach-shmobile/setup-r8a7778.c b/arch/arm/mach-shmobile/setup-r8a7778.c
index 99dd715..9ea1e25 100644
--- a/arch/arm/mach-shmobile/setup-r8a7778.c
+++ b/arch/arm/mach-shmobile/setup-r8a7778.c
@@ -205,6 +205,12 @@ static struct platform_device_info hci##_info __initdata = {	\
 USB_PLATFORM_INFO(ehci);
 USB_PLATFORM_INFO(ohci);
 
+void __init r8a7778_add_usb_host_device(void)
+{
+	platform_device_register_full(&ehci_info);
+	platform_device_register_full(&ohci_info);
+}
+
 /* Ether */
 static struct resource ether_resources[] __initdata = {
 	DEFINE_RES_MEM(0xfde00000, 0x400),
@@ -374,12 +380,6 @@ void __init r8a7778_add_dt_devices(void)
 	r8a7778_register_tmu(1);
 }
 
-void __init r8a7778_init_late(void)
-{
-	platform_device_register_full(&ehci_info);
-	platform_device_register_full(&ohci_info);
-}
-
 void __init r8a7778_add_standard_devices(void)
 {
 	r8a7778_add_dt_devices();
@@ -468,7 +468,6 @@ DT_MACHINE_START(R8A7778_DT, "Generic R8A7778 (Flattened Device Tree)")
 	.init_irq	= r8a7778_init_irq_dt,
 	.init_time	= shmobile_timer_init,
 	.dt_compat	= r8a7778_compat_dt,
-	.init_late      = r8a7778_init_late,
 MACHINE_END
 
 #endif /* CONFIG_USE_OF */
-- 
1.7.9.5


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

* Re: [PATCH 2/4 v2] ARM: shmobile: r8a7778: add r8a7778_add_usb_host_device()
  2013-07-10  2:28 [PATCH 2/4 v2] ARM: shmobile: r8a7778: add r8a7778_add_usb_host_device() Kuninori Morimoto
@ 2013-07-10 11:58 ` Sergei Shtylyov
  2013-10-02  8:32 ` [PATCH 2/4 v2] ARM: shmobile: r8a7778: add renesas_intc_irqpin support on DTSI Kuninori Morimoto
  2013-10-03  4:13 ` Simon Horman
  2 siblings, 0 replies; 4+ messages in thread
From: Sergei Shtylyov @ 2013-07-10 11:58 UTC (permalink / raw)
  To: linux-sh

Hello.

On 10-07-2013 6:28, Kuninori Morimoto wrote:

> The USB host driver was registered in compulsorily
> on current r8a7778 SoC code.
> But it should be decided on platform, not SoC.
> This patch adds r8a7778_add_usb_host_device() for it.

> Tested-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

[...]
> diff --git a/arch/arm/mach-shmobile/setup-r8a7778.c b/arch/arm/mach-shmobile/setup-r8a7778.c
> index 99dd715..9ea1e25 100644
> --- a/arch/arm/mach-shmobile/setup-r8a7778.c
> +++ b/arch/arm/mach-shmobile/setup-r8a7778.c
> @@ -205,6 +205,12 @@ static struct platform_device_info hci##_info __initdata = {	\
>   USB_PLATFORM_INFO(ehci);
>   USB_PLATFORM_INFO(ohci);
>
> +void __init r8a7778_add_usb_host_device(void)

    s/device/devices/.

> +{
> +	platform_device_register_full(&ehci_info);
> +	platform_device_register_full(&ohci_info);
> +}
> +
>   /* Ether */
>   static struct resource ether_resources[] __initdata = {
>   	DEFINE_RES_MEM(0xfde00000, 0x400),

    Will you do the same change to Marzen/R8A7779?

WBR, Sergei


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

* [PATCH 2/4 v2] ARM: shmobile: r8a7778: add renesas_intc_irqpin support on DTSI
  2013-07-10  2:28 [PATCH 2/4 v2] ARM: shmobile: r8a7778: add r8a7778_add_usb_host_device() Kuninori Morimoto
  2013-07-10 11:58 ` Sergei Shtylyov
@ 2013-10-02  8:32 ` Kuninori Morimoto
  2013-10-03  4:13 ` Simon Horman
  2 siblings, 0 replies; 4+ messages in thread
From: Kuninori Morimoto @ 2013-10-02  8:32 UTC (permalink / raw)
  To: linux-sh

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
v1 -> v2

 - no change

 arch/arm/boot/dts/r8a7778.dtsi |   19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7778.dtsi b/arch/arm/boot/dts/r8a7778.dtsi
index 3577aba..a6308a3 100644
--- a/arch/arm/boot/dts/r8a7778.dtsi
+++ b/arch/arm/boot/dts/r8a7778.dtsi
@@ -33,6 +33,25 @@
 		      <0xfe430000 0x100>;
 	};
 
+	/* irqpin: IRQ0 - IRQ3 */
+	irqpin: irqpin@fe78001c {
+		compatible = "renesas,intc-irqpin";
+		#interrupt-cells = <2>;
+		interrupt-controller;
+		status = "disabled"; /* default off */
+		reg =	<0xfe78001c 4>,
+			<0xfe780010 4>,
+			<0xfe780024 4>,
+			<0xfe780044 4>,
+			<0xfe780064 4>;
+		interrupt-parent = <&gic>;
+		interrupts =   <0 27 0x4
+				0 28 0x4
+				0 29 0x4
+				0 30 0x4>;
+		sense-bitfield-width = <2>;
+	};
+
 	gpio0: gpio@ffc40000 {
 		compatible = "renesas,gpio-r8a7778", "renesas,gpio-rcar";
 		reg = <0xffc40000 0x2c>;
-- 
1.7.9.5


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

* Re: [PATCH 2/4 v2] ARM: shmobile: r8a7778: add renesas_intc_irqpin support on DTSI
  2013-07-10  2:28 [PATCH 2/4 v2] ARM: shmobile: r8a7778: add r8a7778_add_usb_host_device() Kuninori Morimoto
  2013-07-10 11:58 ` Sergei Shtylyov
  2013-10-02  8:32 ` [PATCH 2/4 v2] ARM: shmobile: r8a7778: add renesas_intc_irqpin support on DTSI Kuninori Morimoto
@ 2013-10-03  4:13 ` Simon Horman
  2 siblings, 0 replies; 4+ messages in thread
From: Simon Horman @ 2013-10-03  4:13 UTC (permalink / raw)
  To: linux-sh

On Wed, Oct 02, 2013 at 01:32:12AM -0700, Kuninori Morimoto wrote:
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
> v1 -> v2
> 
>  - no change
> 
>  arch/arm/boot/dts/r8a7778.dtsi |   19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)

Thanks, I have queued this up in the dt3 branch.
It should make it into v3.13 but if not I'll rename the branch
dt after rebasing it on v3.13-rcX which will then be targeted at v3.14.

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

end of thread, other threads:[~2013-10-03  4:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-10  2:28 [PATCH 2/4 v2] ARM: shmobile: r8a7778: add r8a7778_add_usb_host_device() Kuninori Morimoto
2013-07-10 11:58 ` Sergei Shtylyov
2013-10-02  8:32 ` [PATCH 2/4 v2] ARM: shmobile: r8a7778: add renesas_intc_irqpin support on DTSI Kuninori Morimoto
2013-10-03  4:13 ` Simon Horman

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