All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms+renesas@verge.net.au>
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/4] ARM: mach-shmobile: r8a7779: Allow initialisation of GIC by DT
Date: Thu, 31 Jan 2013 01:50:49 +0000	[thread overview]
Message-ID: <1359597051-32700-3-git-send-email-horms+renesas@verge.net.au> (raw)
In-Reply-To: <1359597051-32700-1-git-send-email-horms+renesas@verge.net.au>

This allows the GIC interrupt controller of the  r8a7779 SoC to be
initialised using a flattened device tree blob.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
 arch/arm/boot/dts/r8a7779.dtsi               |   40 ++++++++++++++++++++++++++
 arch/arm/mach-shmobile/include/mach/common.h |    1 +
 arch/arm/mach-shmobile/intc-r8a7779.c        |   27 +++++++++++++----
 3 files changed, 62 insertions(+), 6 deletions(-)
 create mode 100644 arch/arm/boot/dts/r8a7779.dtsi

diff --git a/arch/arm/boot/dts/r8a7779.dtsi b/arch/arm/boot/dts/r8a7779.dtsi
new file mode 100644
index 0000000..eadc12e
--- /dev/null
+++ b/arch/arm/boot/dts/r8a7779.dtsi
@@ -0,0 +1,40 @@
+/*
+ * Device Tree Source for Renesas r8a7740
+ *
+ * Copyright (C) 2013 Renesas Solutions Corp.
+ * Copyright (C) 2013 Simon Horman
+ *
+ * This file is licensed under the terms of the GNU General Public License
+ * version 2.  This program is licensed "as is" without any warranty of any
+ * kind, whether express or implied.
+ */
+
+/include/ "skeleton.dtsi"
+
+/ {
+	compatible = "renesas,r8a7779";
+
+	cpus {
+		cpu@0 {
+			compatible = "arm,cortex-a9";
+		};
+		cpu@1 {
+			compatible = "arm,cortex-a9";
+		};
+		cpu@2 {
+			compatible = "arm,cortex-a9";
+		};
+		cpu@3 {
+			compatible = "arm,cortex-a9";
+		};
+	};
+
+        gic: interrupt-controller@f0001000 {
+                compatible = "arm,cortex-a9-gic";
+                #interrupt-cells = <3>;
+                #address-cells = <1>;
+                interrupt-controller;
+                reg = <0xf0001000 0x1000>,
+                      <0xf0000100 0x100>;
+        };
+};
diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/include/mach/common.h
index 16dab18..8ef7ebb 100644
--- a/arch/arm/mach-shmobile/include/mach/common.h
+++ b/arch/arm/mach-shmobile/include/mach/common.h
@@ -63,6 +63,7 @@ extern void r8a7740_pinmux_init(void);
 extern void r8a7740_pm_init(void);
 
 extern void r8a7779_init_irq(void);
+extern void r8a7779_init_irq_dt(void);
 extern void r8a7779_map_io(void);
 extern void r8a7779_earlytimer_init(void);
 extern void r8a7779_add_early_devices(void);
diff --git a/arch/arm/mach-shmobile/intc-r8a7779.c b/arch/arm/mach-shmobile/intc-r8a7779.c
index 8807c27..f9cc4bc 100644
--- a/arch/arm/mach-shmobile/intc-r8a7779.c
+++ b/arch/arm/mach-shmobile/intc-r8a7779.c
@@ -24,6 +24,7 @@
 #include <linux/io.h>
 #include <linux/irqchip/arm-gic.h>
 #include <mach/common.h>
+#include <linux/irqchip.h>
 #include <mach/intc.h>
 #include <mach/r8a7779.h>
 #include <asm/mach-types.h>
@@ -43,13 +44,8 @@ static int r8a7779_set_wake(struct irq_data *data, unsigned int on)
 	return 0; /* always allow wakeup */
 }
 
-void __init r8a7779_init_irq(void)
+static void __init r8a7779_init_irq_common(void)
 {
-	void __iomem *gic_dist_base = IOMEM(0xf0001000);
-	void __iomem *gic_cpu_base = IOMEM(0xf0000100);
-
-	/* use GIC to handle interrupts */
-	gic_init(0, 29, gic_dist_base, gic_cpu_base);
 	gic_arch_extn.irq_set_wake = r8a7779_set_wake;
 
 	/* route all interrupts to ARM */
@@ -63,3 +59,22 @@ void __init r8a7779_init_irq(void)
 	__raw_writel(0xbffffffc, INT2SMSKCR3);
 	__raw_writel(0x003fee3f, INT2SMSKCR4);
 }
+
+void __init r8a7779_init_irq(void)
+{
+	void __iomem *gic_dist_base = IOMEM(0xf0001000);
+	void __iomem *gic_cpu_base = IOMEM(0xf0000100);
+
+	/* use GIC to handle interrupts */
+	gic_init(0, 29, gic_dist_base, gic_cpu_base);
+
+	r8a7779_init_irq_common();
+}
+
+#ifdef CONFIG_OF
+void __init r8a7779_init_irq_dt(void)
+{
+	irqchip_init();
+	r8a7779_init_irq_common();
+}
+#endif
-- 
1.7.10.4


WARNING: multiple messages have this Message-ID (diff)
From: horms+renesas@verge.net.au (Simon Horman)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/4] ARM: mach-shmobile: r8a7779: Allow initialisation of GIC by DT
Date: Thu, 31 Jan 2013 10:50:49 +0900	[thread overview]
Message-ID: <1359597051-32700-3-git-send-email-horms+renesas@verge.net.au> (raw)
In-Reply-To: <1359597051-32700-1-git-send-email-horms+renesas@verge.net.au>

This allows the GIC interrupt controller of the  r8a7779 SoC to be
initialised using a flattened device tree blob.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
 arch/arm/boot/dts/r8a7779.dtsi               |   40 ++++++++++++++++++++++++++
 arch/arm/mach-shmobile/include/mach/common.h |    1 +
 arch/arm/mach-shmobile/intc-r8a7779.c        |   27 +++++++++++++----
 3 files changed, 62 insertions(+), 6 deletions(-)
 create mode 100644 arch/arm/boot/dts/r8a7779.dtsi

diff --git a/arch/arm/boot/dts/r8a7779.dtsi b/arch/arm/boot/dts/r8a7779.dtsi
new file mode 100644
index 0000000..eadc12e
--- /dev/null
+++ b/arch/arm/boot/dts/r8a7779.dtsi
@@ -0,0 +1,40 @@
+/*
+ * Device Tree Source for Renesas r8a7740
+ *
+ * Copyright (C) 2013 Renesas Solutions Corp.
+ * Copyright (C) 2013 Simon Horman
+ *
+ * This file is licensed under the terms of the GNU General Public License
+ * version 2.  This program is licensed "as is" without any warranty of any
+ * kind, whether express or implied.
+ */
+
+/include/ "skeleton.dtsi"
+
+/ {
+	compatible = "renesas,r8a7779";
+
+	cpus {
+		cpu at 0 {
+			compatible = "arm,cortex-a9";
+		};
+		cpu at 1 {
+			compatible = "arm,cortex-a9";
+		};
+		cpu at 2 {
+			compatible = "arm,cortex-a9";
+		};
+		cpu at 3 {
+			compatible = "arm,cortex-a9";
+		};
+	};
+
+        gic: interrupt-controller at f0001000 {
+                compatible = "arm,cortex-a9-gic";
+                #interrupt-cells = <3>;
+                #address-cells = <1>;
+                interrupt-controller;
+                reg = <0xf0001000 0x1000>,
+                      <0xf0000100 0x100>;
+        };
+};
diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/include/mach/common.h
index 16dab18..8ef7ebb 100644
--- a/arch/arm/mach-shmobile/include/mach/common.h
+++ b/arch/arm/mach-shmobile/include/mach/common.h
@@ -63,6 +63,7 @@ extern void r8a7740_pinmux_init(void);
 extern void r8a7740_pm_init(void);
 
 extern void r8a7779_init_irq(void);
+extern void r8a7779_init_irq_dt(void);
 extern void r8a7779_map_io(void);
 extern void r8a7779_earlytimer_init(void);
 extern void r8a7779_add_early_devices(void);
diff --git a/arch/arm/mach-shmobile/intc-r8a7779.c b/arch/arm/mach-shmobile/intc-r8a7779.c
index 8807c27..f9cc4bc 100644
--- a/arch/arm/mach-shmobile/intc-r8a7779.c
+++ b/arch/arm/mach-shmobile/intc-r8a7779.c
@@ -24,6 +24,7 @@
 #include <linux/io.h>
 #include <linux/irqchip/arm-gic.h>
 #include <mach/common.h>
+#include <linux/irqchip.h>
 #include <mach/intc.h>
 #include <mach/r8a7779.h>
 #include <asm/mach-types.h>
@@ -43,13 +44,8 @@ static int r8a7779_set_wake(struct irq_data *data, unsigned int on)
 	return 0; /* always allow wakeup */
 }
 
-void __init r8a7779_init_irq(void)
+static void __init r8a7779_init_irq_common(void)
 {
-	void __iomem *gic_dist_base = IOMEM(0xf0001000);
-	void __iomem *gic_cpu_base = IOMEM(0xf0000100);
-
-	/* use GIC to handle interrupts */
-	gic_init(0, 29, gic_dist_base, gic_cpu_base);
 	gic_arch_extn.irq_set_wake = r8a7779_set_wake;
 
 	/* route all interrupts to ARM */
@@ -63,3 +59,22 @@ void __init r8a7779_init_irq(void)
 	__raw_writel(0xbffffffc, INT2SMSKCR3);
 	__raw_writel(0x003fee3f, INT2SMSKCR4);
 }
+
+void __init r8a7779_init_irq(void)
+{
+	void __iomem *gic_dist_base = IOMEM(0xf0001000);
+	void __iomem *gic_cpu_base = IOMEM(0xf0000100);
+
+	/* use GIC to handle interrupts */
+	gic_init(0, 29, gic_dist_base, gic_cpu_base);
+
+	r8a7779_init_irq_common();
+}
+
+#ifdef CONFIG_OF
+void __init r8a7779_init_irq_dt(void)
+{
+	irqchip_init();
+	r8a7779_init_irq_common();
+}
+#endif
-- 
1.7.10.4

  parent reply	other threads:[~2013-01-31  1:50 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-31  1:50 ARM: mach-shmobile: r8a7779, marzen: Reference DT implementation Simon Horman
2013-01-31  1:50 ` Simon Horman
2013-01-31  1:50 ` [PATCH 1/4] ARM: mach-shmobile: marzen: defconfig: use regulators by default Simon Horman
2013-01-31  1:50   ` Simon Horman
2013-01-31  1:50 ` Simon Horman [this message]
2013-01-31  1:50   ` [PATCH 2/4] ARM: mach-shmobile: r8a7779: Allow initialisation of GIC by DT Simon Horman
2013-01-31 12:32   ` Mark Rutland
2013-01-31 12:32     ` Mark Rutland
2013-02-01  0:11     ` Simon Horman
2013-02-01  0:11       ` Simon Horman
2013-02-01  0:34       ` Simon Horman
2013-02-01  0:34         ` Simon Horman
2013-02-01  1:47         ` Simon Horman
2013-02-01  1:47           ` Simon Horman
2013-02-01  4:39           ` Simon Horman
2013-02-01  4:39             ` Simon Horman
2013-02-01 11:31             ` Mark Rutland
2013-02-01 11:31               ` Mark Rutland
2013-02-01 10:58         ` Mark Rutland
2013-02-01 10:58           ` Mark Rutland
2013-02-01 14:15           ` Rob Herring
2013-02-01 14:15             ` Rob Herring
2013-02-04 17:37             ` Mark Rutland
2013-02-04 17:37               ` Mark Rutland
2013-02-16 21:43   ` [PATCH 2/4] ARM: mach-shmobile: r8a7779: add SATA support Sergei Shtylyov
2013-02-16 22:43     ` Sergei Shtylyov
2013-02-18  1:23     ` Kuninori Morimoto
2013-02-18  1:23       ` Kuninori Morimoto
2013-02-18 14:07       ` Sergei Shtylyov
2013-02-18 14:07         ` Sergei Shtylyov
2013-02-18 14:21         ` Magnus Damm
2013-02-18 14:21           ` Magnus Damm
2013-02-19  0:40           ` Kuninori Morimoto
2013-02-19  0:40             ` Kuninori Morimoto
2013-02-19  1:26             ` Simon Horman
2013-02-19  1:26               ` Simon Horman
2013-02-19 14:26             ` Sergei Shtylyov
2013-02-19 14:26               ` Sergei Shtylyov
2013-02-19  1:25           ` Simon Horman
2013-02-19  1:25             ` Simon Horman
2013-01-31  1:50 ` [PATCH 3/4] ARM: mach-shmobile: r8a7779: Minimal setup using DT Simon Horman
2013-01-31  1:50   ` Simon Horman
2013-02-18  9:36   ` Magnus Damm
2013-02-18  9:36     ` Magnus Damm
2013-02-18 11:37     ` Simon Horman
2013-02-18 11:37       ` Simon Horman
2013-02-18 12:14       ` Magnus Damm
2013-02-18 12:14         ` Magnus Damm
2013-02-18 12:37         ` Simon Horman
2013-02-18 12:37           ` Simon Horman
2013-02-18 12:22   ` Magnus Damm
2013-02-18 12:22     ` Magnus Damm
2013-02-18 12:37     ` Simon Horman
2013-02-18 12:37       ` Simon Horman
2013-02-18 19:30   ` [PATCH 3/4] ARM: mach-shmobile: r8a7779: add SATA support Sergei Shtylyov
2013-02-18 20:31     ` Sergei Shtylyov
2013-01-31  1:50 ` [PATCH 4/4] ARM: mach-shmobile: marzen: Reference DT implementation Simon Horman
2013-01-31  1:50   ` Simon Horman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1359597051-32700-3-git-send-email-horms+renesas@verge.net.au \
    --to=horms+renesas@verge.net.au \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.