All of lore.kernel.org
 help / color / mirror / Atom feed
From: netz.kernel@gmail.com (Marty Plummer)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH v2 4/5] ARM: hisi: enable devicetree support for hi3520
Date: Thu, 15 Sep 2016 16:05:04 -0500	[thread overview]
Message-ID: <20160915210505.21878-5-netz.kernel@gmail.com> (raw)
In-Reply-To: <20160915210505.21878-1-netz.kernel@gmail.com>

GIC removed from the ARCH_HISI namespace and placed in individual SoC as
hi3520 uses a VIC instead and doesn't require a GIC

Signed-off-by: Marty Plummer <netz.kernel@gmail.com>
---
 arch/arm/mach-hisi/Kconfig     | 28 +++++++++++++++++++---------
 arch/arm/mach-hisi/hisilicon.c | 28 ++++++++++++++++++++++++++++
 2 files changed, 47 insertions(+), 9 deletions(-)

diff --git a/arch/arm/mach-hisi/Kconfig b/arch/arm/mach-hisi/Kconfig
index 8a552c3..ea4e5b1 100644
--- a/arch/arm/mach-hisi/Kconfig
+++ b/arch/arm/mach-hisi/Kconfig
@@ -1,8 +1,7 @@
 config ARCH_HISI
 	bool "Hisilicon SoC Support"
-	depends on ARCH_MULTI_V7
+	depends on ARCH_MULTI_V6 || ARCH_MULTI_V7
 	select ARM_AMBA
-	select ARM_GIC
 	select ARM_TIMER_SP804
 	select POWER_RESET
 	select POWER_RESET_HISI
@@ -12,9 +11,17 @@ if ARCH_HISI
 
 menu "Hisilicon platform type"
 
+config ARCH_HI3520_1176
+	bool "Hisilicon	Hi3520 family"
+	depends on ARCH_MULTI_V6
+	select ARM_VIC
+	help
+	  Support for Hisilicon Hi3520 SoC family
+
 config ARCH_HI3620
 	bool "Hisilicon Hi3620 family"
 	depends on ARCH_MULTI_V7
+	select ARM_GIC
 	select CACHE_L2X0
 	select HAVE_ARM_SCU if SMP
 	select HAVE_ARM_TWD if SMP
@@ -24,17 +31,19 @@ config ARCH_HI3620
 	  Support for Hisilicon Hi36xx SoC family
 
 config ARCH_HIP01
-       bool "Hisilicon HIP01 family"
-       depends on ARCH_MULTI_V7
-       select HAVE_ARM_SCU if SMP
-       select HAVE_ARM_TWD if SMP
-       select ARM_GLOBAL_TIMER
-       help
-         Support for Hisilicon HIP01 SoC family
+	bool "Hisilicon HIP01 family"
+	depends on ARCH_MULTI_V7
+	select ARM_GIC
+	select HAVE_ARM_SCU if SMP
+	select HAVE_ARM_TWD if SMP
+	select ARM_GLOBAL_TIMER
+	help
+	  Support for Hisilicon HIP01 SoC family
 
 config ARCH_HIP04
 	bool "Hisilicon HiP04 Cortex A15 family"
 	depends on ARCH_MULTI_V7
+	select ARM_GIC
 	select ARM_ERRATA_798181 if SMP
 	select HAVE_ARM_ARCH_TIMER
 	select MCPM if SMP
@@ -45,6 +54,7 @@ config ARCH_HIP04
 config ARCH_HIX5HD2
 	bool "Hisilicon X5HD2 family"
 	depends on ARCH_MULTI_V7
+	select ARM_GIC
 	select CACHE_L2X0
 	select HAVE_ARM_SCU if SMP
 	select HAVE_ARM_TWD if SMP
diff --git a/arch/arm/mach-hisi/hisilicon.c b/arch/arm/mach-hisi/hisilicon.c
index dfa1ee8..7a15936 100644
--- a/arch/arm/mach-hisi/hisilicon.c
+++ b/arch/arm/mach-hisi/hisilicon.c
@@ -17,6 +17,8 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
+#define HI3520_1176_SYSCTRL_PHYS_BASE		0x20050000
+#define HI3520_1176_SYSCTRL_VIRT_BASE		0xfe350000
 #define HI3620_SYSCTRL_PHYS_BASE		0xfc802000
 #define HI3620_SYSCTRL_VIRT_BASE		0xfe802000
 
@@ -28,6 +30,16 @@
  * spaces wasted since ioremap() may be called multi times for the same
  * IO space.
  */
+static struct map_desc hi3520_1176_io_desc[] __initdata = {
+	{
+		/* sysctrl */
+		.virtual	= HI3520_1176_SYSCTRL_VIRT_BASE,
+		.pfn		= __phys_to_pfn(HI3520_1176_SYSCTRL_PHYS_BASE),
+		.length		= 0x10000,
+		.type		= MT_DEVICE,
+	},
+};
+
 static struct map_desc hi3620_io_desc[] __initdata = {
 	{
 		/* sysctrl */
@@ -38,17 +50,33 @@ static struct map_desc hi3620_io_desc[] __initdata = {
 	},
 };
 
+static void __init hi3520_1176_map_io(void)
+{
+	debug_ll_io_init();
+	iotable_init(hi3520_1176_io_desc, ARRAY_SIZE(hi3520_1176_io_desc));
+}
+
 static void __init hi3620_map_io(void)
 {
 	debug_ll_io_init();
 	iotable_init(hi3620_io_desc, ARRAY_SIZE(hi3620_io_desc));
 }
 
+static const char *const hi3520_1176_compat[] __initconst = {
+	"hisilicon,hi3520-1176",
+	NULL,
+};
+
 static const char *const hi3620_compat[] __initconst = {
 	"hisilicon,hi3620-hi4511",
 	NULL,
 };
 
+DT_MACHINE_START(HI3520_1176, "Hisilicon Hi3520-1176 (Flattened Device Tree)")
+	.map_io		= hi3520_1176_map_io,
+	.dt_compat	= hi3520_1176_compat,
+MACHINE_END
+
 DT_MACHINE_START(HI3620, "Hisilicon Hi3620 (Flattened Device Tree)")
 	.map_io		= hi3620_map_io,
 	.dt_compat	= hi3620_compat,
-- 
2.9.3

  parent reply	other threads:[~2016-09-15 21:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-15 21:05 [RFC PATCH v2 0/5] Add support for hi3520 Marty Plummer
2016-09-15 21:05 ` [RFC PATCH v2 1/5] ARM: hisi: Make 3620 explicit, remove wildcards Marty Plummer
2016-09-16  7:54   ` Arnd Bergmann
2016-09-15 21:05 ` [RFC PATCH v2 2/5] clk: hi3620: Make 3620 explicit, remove wildcard Marty Plummer
2016-09-16  8:05   ` Arnd Bergmann
2016-09-15 21:05 ` [RFC PATCH v2 3/5] dmaengine: hi3620: Make hi3620 " Marty Plummer
2016-09-16  8:04   ` Arnd Bergmann
2016-09-15 21:05 ` Marty Plummer [this message]
2016-09-16  7:56   ` [RFC PATCH v2 4/5] ARM: hisi: enable devicetree support for hi3520 Arnd Bergmann
2016-09-15 21:05 ` [RFC PATCH v2 5/5] ARM: hisi: add devicetree " Marty Plummer
2016-09-16  8:02   ` Arnd Bergmann

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=20160915210505.21878-5-netz.kernel@gmail.com \
    --to=netz.kernel@gmail.com \
    --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.