linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 4/6] ARM: shmobile: r8a7740: Add OF support to initialze the GIC
@ 2013-04-17 10:34 Bastian Hecht
  2013-04-18 12:37 ` Simon Horman
  2013-06-06 15:48 ` [PATCH v2 4/6] ARM: shmobile: r8a7740: add MMCIF DMA definitions Guennadi Liakhovetski
  0 siblings, 2 replies; 3+ messages in thread
From: Bastian Hecht @ 2013-04-17 10:34 UTC (permalink / raw)
  To: linux-sh

We add a variant to initalize the interrupt controller in case we describe
the GIC using the Device Tree and not platform data.

Signed-off-by: Bastian Hecht <hechtb+renesas@gmail.com>
---
v2:
r8a7740_init_irq_common is static now
Reordered patch

 arch/arm/mach-shmobile/include/mach/r8a7740.h |    1 +
 arch/arm/mach-shmobile/intc-r8a7740.c         |   24 ++++++++++++++++++------
 2 files changed, 19 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-shmobile/include/mach/r8a7740.h b/arch/arm/mach-shmobile/include/mach/r8a7740.h
index abdc4d4..19c0423 100644
--- a/arch/arm/mach-shmobile/include/mach/r8a7740.h
+++ b/arch/arm/mach-shmobile/include/mach/r8a7740.h
@@ -534,6 +534,7 @@ enum {
 
 extern void r8a7740_meram_workaround(void);
 extern void r8a7740_init_irq(void);
+extern void r8a7740_init_irq_of(void);
 extern void r8a7740_map_io(void);
 extern void r8a7740_add_early_devices(void);
 extern void r8a7740_add_standard_devices(void);
diff --git a/arch/arm/mach-shmobile/intc-r8a7740.c b/arch/arm/mach-shmobile/intc-r8a7740.c
index b741c84..8871f77 100644
--- a/arch/arm/mach-shmobile/intc-r8a7740.c
+++ b/arch/arm/mach-shmobile/intc-r8a7740.c
@@ -20,19 +20,15 @@
 
 #include <linux/init.h>
 #include <linux/io.h>
+#include <linux/irqchip.h>
 #include <linux/irqchip/arm-gic.h>
 
-void __init r8a7740_init_irq(void)
+static void __init r8a7740_init_irq_common(void)
 {
-	void __iomem *gic_dist_base = ioremap_nocache(0xc2800000, 0x1000);
-	void __iomem *gic_cpu_base = ioremap_nocache(0xc2000000, 0x1000);
 	void __iomem *intc_prio_base = ioremap_nocache(0xe6900010, 0x10);
 	void __iomem *intc_msk_base = ioremap_nocache(0xe6900040, 0x10);
 	void __iomem *pfc_inta_ctrl = ioremap_nocache(0xe605807c, 0x4);
 
-	/* initialize the Generic Interrupt Controller PL390 r0p0 */
-	gic_init(0, 29, gic_dist_base, gic_cpu_base);
-
 	/* route signals to GIC */
 	iowrite32(0x0, pfc_inta_ctrl);
 
@@ -54,3 +50,19 @@ void __init r8a7740_init_irq(void)
 	iounmap(intc_msk_base);
 	iounmap(pfc_inta_ctrl);
 }
+
+void __init r8a7740_init_irq_of(void)
+{
+	irqchip_init();
+	r8a7740_init_irq_common();
+}
+
+void __init r8a7740_init_irq(void)
+{
+	void __iomem *gic_dist_base = ioremap_nocache(0xc2800000, 0x1000);
+	void __iomem *gic_cpu_base = ioremap_nocache(0xc2000000, 0x1000);
+
+	/* initialize the Generic Interrupt Controller PL390 r0p0 */
+	gic_init(0, 29, gic_dist_base, gic_cpu_base);
+	r8a7740_init_irq_common();
+}
-- 
1.7.9.5


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

* Re: [PATCH v2 4/6] ARM: shmobile: r8a7740: Add OF support to initialze the GIC
  2013-04-17 10:34 [PATCH v2 4/6] ARM: shmobile: r8a7740: Add OF support to initialze the GIC Bastian Hecht
@ 2013-04-18 12:37 ` Simon Horman
  2013-06-06 15:48 ` [PATCH v2 4/6] ARM: shmobile: r8a7740: add MMCIF DMA definitions Guennadi Liakhovetski
  1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2013-04-18 12:37 UTC (permalink / raw)
  To: linux-sh

On Wed, Apr 17, 2013 at 12:34:04PM +0200, Bastian Hecht wrote:
> We add a variant to initalize the interrupt controller in case we describe
> the GIC using the Device Tree and not platform data.
> 
> Signed-off-by: Bastian Hecht <hechtb+renesas@gmail.com>

Thanks, queued-up for v3.11 in the r8a7740 branch.

> ---
> v2:
> r8a7740_init_irq_common is static now
> Reordered patch
> 
>  arch/arm/mach-shmobile/include/mach/r8a7740.h |    1 +
>  arch/arm/mach-shmobile/intc-r8a7740.c         |   24 ++++++++++++++++++------
>  2 files changed, 19 insertions(+), 6 deletions(-)
> 
> diff --git a/arch/arm/mach-shmobile/include/mach/r8a7740.h b/arch/arm/mach-shmobile/include/mach/r8a7740.h
> index abdc4d4..19c0423 100644
> --- a/arch/arm/mach-shmobile/include/mach/r8a7740.h
> +++ b/arch/arm/mach-shmobile/include/mach/r8a7740.h
> @@ -534,6 +534,7 @@ enum {
>  
>  extern void r8a7740_meram_workaround(void);
>  extern void r8a7740_init_irq(void);
> +extern void r8a7740_init_irq_of(void);
>  extern void r8a7740_map_io(void);
>  extern void r8a7740_add_early_devices(void);
>  extern void r8a7740_add_standard_devices(void);
> diff --git a/arch/arm/mach-shmobile/intc-r8a7740.c b/arch/arm/mach-shmobile/intc-r8a7740.c
> index b741c84..8871f77 100644
> --- a/arch/arm/mach-shmobile/intc-r8a7740.c
> +++ b/arch/arm/mach-shmobile/intc-r8a7740.c
> @@ -20,19 +20,15 @@
>  
>  #include <linux/init.h>
>  #include <linux/io.h>
> +#include <linux/irqchip.h>
>  #include <linux/irqchip/arm-gic.h>
>  
> -void __init r8a7740_init_irq(void)
> +static void __init r8a7740_init_irq_common(void)
>  {
> -	void __iomem *gic_dist_base = ioremap_nocache(0xc2800000, 0x1000);
> -	void __iomem *gic_cpu_base = ioremap_nocache(0xc2000000, 0x1000);
>  	void __iomem *intc_prio_base = ioremap_nocache(0xe6900010, 0x10);
>  	void __iomem *intc_msk_base = ioremap_nocache(0xe6900040, 0x10);
>  	void __iomem *pfc_inta_ctrl = ioremap_nocache(0xe605807c, 0x4);
>  
> -	/* initialize the Generic Interrupt Controller PL390 r0p0 */
> -	gic_init(0, 29, gic_dist_base, gic_cpu_base);
> -
>  	/* route signals to GIC */
>  	iowrite32(0x0, pfc_inta_ctrl);
>  
> @@ -54,3 +50,19 @@ void __init r8a7740_init_irq(void)
>  	iounmap(intc_msk_base);
>  	iounmap(pfc_inta_ctrl);
>  }
> +
> +void __init r8a7740_init_irq_of(void)
> +{
> +	irqchip_init();
> +	r8a7740_init_irq_common();
> +}
> +
> +void __init r8a7740_init_irq(void)
> +{
> +	void __iomem *gic_dist_base = ioremap_nocache(0xc2800000, 0x1000);
> +	void __iomem *gic_cpu_base = ioremap_nocache(0xc2000000, 0x1000);
> +
> +	/* initialize the Generic Interrupt Controller PL390 r0p0 */
> +	gic_init(0, 29, gic_dist_base, gic_cpu_base);
> +	r8a7740_init_irq_common();
> +}
> -- 
> 1.7.9.5
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

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

* [PATCH v2 4/6] ARM: shmobile: r8a7740: add MMCIF DMA definitions
  2013-04-17 10:34 [PATCH v2 4/6] ARM: shmobile: r8a7740: Add OF support to initialze the GIC Bastian Hecht
  2013-04-18 12:37 ` Simon Horman
@ 2013-06-06 15:48 ` Guennadi Liakhovetski
  1 sibling, 0 replies; 3+ messages in thread
From: Guennadi Liakhovetski @ 2013-06-06 15:48 UTC (permalink / raw)
  To: linux-sh

Add DMA channel slave IDs and configuration entries for the r8a7740
MMCIF controller.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
---
 arch/arm/mach-shmobile/include/mach/r8a7740.h |    2 ++
 arch/arm/mach-shmobile/setup-r8a7740.c        |   10 ++++++++++
 2 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-shmobile/include/mach/r8a7740.h b/arch/arm/mach-shmobile/include/mach/r8a7740.h
index b34d19b..56f3750 100644
--- a/arch/arm/mach-shmobile/include/mach/r8a7740.h
+++ b/arch/arm/mach-shmobile/include/mach/r8a7740.h
@@ -42,6 +42,8 @@ enum {
 	SHDMA_SLAVE_FSIB_TX,
 	SHDMA_SLAVE_USBHS_TX,
 	SHDMA_SLAVE_USBHS_RX,
+	SHDMA_SLAVE_MMCIF_TX,
+	SHDMA_SLAVE_MMCIF_RX,
 };
 
 extern void r8a7740_meram_workaround(void);
diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c
index 00c5a70..6b3ed42 100644
--- a/arch/arm/mach-shmobile/setup-r8a7740.c
+++ b/arch/arm/mach-shmobile/setup-r8a7740.c
@@ -588,6 +588,16 @@ static const struct sh_dmae_slave_config r8a7740_dmae_slaves[] = {
 		.addr		= 0xfe1f0064,
 		.chcr		= CHCR_TX(XMIT_SZ_32BIT),
 		.mid_rid	= 0xb5,
+	}, {
+		.slave_id	= SHDMA_SLAVE_MMCIF_TX,
+		.addr		= 0xe6bd0034,
+		.chcr		= CHCR_TX(XMIT_SZ_32BIT),
+		.mid_rid	= 0xd1,
+	}, {
+		.slave_id	= SHDMA_SLAVE_MMCIF_RX,
+		.addr		= 0xe6bd0034,
+		.chcr		= CHCR_RX(XMIT_SZ_32BIT),
+		.mid_rid	= 0xd2,
 	},
 };
 
-- 
1.7.2.5


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

end of thread, other threads:[~2013-06-06 15:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-17 10:34 [PATCH v2 4/6] ARM: shmobile: r8a7740: Add OF support to initialze the GIC Bastian Hecht
2013-04-18 12:37 ` Simon Horman
2013-06-06 15:48 ` [PATCH v2 4/6] ARM: shmobile: r8a7740: add MMCIF DMA definitions Guennadi Liakhovetski

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