linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: haojian.zhuang@linaro.org (Haojian Zhuang)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 09/11] ARM: hi3xxx: add board support with device tree
Date: Wed, 13 Mar 2013 13:05:40 +0800	[thread overview]
Message-ID: <1363151142-32162-10-git-send-email-haojian.zhuang@linaro.org> (raw)
In-Reply-To: <1363151142-32162-1-git-send-email-haojian.zhuang@linaro.org>

Add board support with device tree for Hisilicon Hi36xx/Hi37xx platform.

Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
---
 .../bindings/arm/hisilicon/hisilicon.txt           |   10 +++++
 arch/arm/Kconfig                                   |    2 +
 arch/arm/Makefile                                  |    1 +
 arch/arm/mach-hi3xxx/Kconfig                       |   13 ++++++
 arch/arm/mach-hi3xxx/Makefile                      |    5 +++
 arch/arm/mach-hi3xxx/hi3xxx.c                      |   45 ++++++++++++++++++++
 6 files changed, 76 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/arm/hisilicon/hisilicon.txt
 create mode 100644 arch/arm/mach-hi3xxx/Kconfig
 create mode 100644 arch/arm/mach-hi3xxx/Makefile
 create mode 100644 arch/arm/mach-hi3xxx/hi3xxx.c

diff --git a/Documentation/devicetree/bindings/arm/hisilicon/hisilicon.txt b/Documentation/devicetree/bindings/arm/hisilicon/hisilicon.txt
new file mode 100644
index 0000000..3be60c8
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/hisilicon/hisilicon.txt
@@ -0,0 +1,10 @@
+Hisilicon Platforms Device Tree Bindings
+----------------------------------------------------
+
+Hi3716 Development Board
+Required root node properties:
+	- compatible = "hisilicon,hi3716-dkb";
+
+Hi4511 Board
+Required root node properties:
+	- compatible = "hisilicon,hi3620-hi4511";
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 10d7e2c..11ef3ea 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1060,6 +1060,8 @@ source "arch/arm/mach-gemini/Kconfig"
 
 source "arch/arm/mach-h720x/Kconfig"
 
+source "arch/arm/mach-hi3xxx/Kconfig"
+
 source "arch/arm/mach-highbank/Kconfig"
 
 source "arch/arm/mach-integrator/Kconfig"
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index ee4605f..4b0de9e 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -148,6 +148,7 @@ machine-$(CONFIG_ARCH_EBSA110)		+= ebsa110
 machine-$(CONFIG_ARCH_EP93XX)		+= ep93xx
 machine-$(CONFIG_ARCH_GEMINI)		+= gemini
 machine-$(CONFIG_ARCH_H720X)		+= h720x
+machine-$(CONFIG_ARCH_HI3xxx)		+= hi3xxx
 machine-$(CONFIG_ARCH_HIGHBANK)		+= highbank
 machine-$(CONFIG_ARCH_INTEGRATOR)	+= integrator
 machine-$(CONFIG_ARCH_IOP13XX)		+= iop13xx
diff --git a/arch/arm/mach-hi3xxx/Kconfig b/arch/arm/mach-hi3xxx/Kconfig
new file mode 100644
index 0000000..a991dee
--- /dev/null
+++ b/arch/arm/mach-hi3xxx/Kconfig
@@ -0,0 +1,13 @@
+config ARCH_HI3xxx
+	bool "Hisilicon Hi36xx/Hi37xx family" if ARCH_MULTI_V7
+	select ARM_AMBA
+	select ARM_GIC
+	select CACHE_L2X0
+	select CACHE_PL310
+	select CLKSRC_OF
+	select PINCTRL
+	select PINCTRL_SINGLE
+	select SERIAL_AMBA_PL011
+	select SERIAL_AMBA_PL011_CONSOLE
+	help
+	  Support for Hisilicon Hi36xx/Hi37xx processor family
diff --git a/arch/arm/mach-hi3xxx/Makefile b/arch/arm/mach-hi3xxx/Makefile
new file mode 100644
index 0000000..d68ebb3
--- /dev/null
+++ b/arch/arm/mach-hi3xxx/Makefile
@@ -0,0 +1,5 @@
+#
+# Makefile for Hisilicon Hi36xx/Hi37xx processors line
+#
+
+obj-y	+= hi3xxx.o
diff --git a/arch/arm/mach-hi3xxx/hi3xxx.c b/arch/arm/mach-hi3xxx/hi3xxx.c
new file mode 100644
index 0000000..df0a472
--- /dev/null
+++ b/arch/arm/mach-hi3xxx/hi3xxx.c
@@ -0,0 +1,45 @@
+/*
+ * (Hisilicon's Hi36xx/Hi37xx SoC based) flattened device tree enabled machine
+ *
+ * Copyright (c) 2012-2013 Hisilicon Ltd.
+ * Copyright (c) 2012-2013 Linaro Ltd.
+ *
+ * Author: Haojian Zhuang <haojian.zhuang@linaro.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+
+#include <linux/clk-provider.h>
+#include <linux/clocksource.h>
+#include <linux/irqchip.h>
+#include <linux/of_platform.h>
+
+#include <asm/mach/arch.h>
+#include <asm/mach/map.h>
+
+static void __init hi3xxx_timer_init(void)
+{
+	of_clk_init(NULL);
+	clocksource_of_init();
+}
+
+static void __init hs_init(void)
+{
+	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+}
+
+static const char *hs_compat[] __initdata = {
+	"hisilicon,hi3620-hi4511",
+	NULL,
+};
+
+DT_MACHINE_START(HI3xxx, "Hisilicon Hi36xx/Hi37xx (Flattened Device Tree)")
+	/* Maintainer: Haojian Zhuang <haojian.zhuang@linaro.org> */
+	.map_io		= debug_ll_io_init,
+	.init_irq	= irqchip_init,
+	.init_time	= hi3xxx_timer_init,
+	.init_machine	= hs_init,
+	.dt_compat	= hs_compat,
+MACHINE_END
-- 
1.7.10.4

  parent reply	other threads:[~2013-03-13  5:05 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-13  5:05 [PATCH v3 00/11] add hisilicon SoC support Haojian Zhuang
2013-03-13  5:05 ` [PATCH v3 01/11] clocksource: move sp timer driver Haojian Zhuang
2013-03-13  5:05 ` [PATCH v3 02/11] clocksource: select USE_OF by default Haojian Zhuang
2013-03-13  5:05 ` [PATCH v3 03/11] clocksource: sp804: add device tree support Haojian Zhuang
2013-03-13 11:05   ` Pawel Moll
2013-03-13 11:37     ` Haojian Zhuang
2013-03-13 11:41       ` Pawel Moll
2013-03-13 14:17     ` Rob Herring
2013-03-13 14:42       ` Pawel Moll
2013-03-13 14:51         ` Rob Herring
2013-03-13 14:55           ` Pawel Moll
2013-03-13 15:11             ` Haojian Zhuang
2013-03-13 15:23               ` Pawel Moll
2013-03-13 15:25                 ` Haojian Zhuang
2013-03-13 15:29                   ` Pawel Moll
2013-03-13 15:39                     ` Rob Herring
2013-03-13 15:41                       ` Pawel Moll
2013-03-13 15:44                         ` Haojian Zhuang
2013-03-13 15:42                     ` Haojian Zhuang
2013-03-13 15:49                       ` Pawel Moll
2013-03-13 16:35                         ` Arnd Bergmann
2013-03-13 16:41                           ` Pawel Moll
2013-03-15 12:20       ` Russell King - ARM Linux
2013-03-13  5:05 ` [PATCH v3 04/11] ARM: integrator: use clocksource_of_init for sp804 Haojian Zhuang
2013-03-13  5:05 ` [PATCH v3 05/11] ARM: highbank: " Haojian Zhuang
2013-03-13  5:05 ` [PATCH v3 06/11] ARM: vexpress: " Haojian Zhuang
2013-03-13 11:10   ` Pawel Moll
2013-03-13 11:42     ` Haojian Zhuang
2013-03-13 11:46       ` Pawel Moll
2013-03-13 12:21         ` Haojian Zhuang
2013-03-13 14:48           ` Pawel Moll
2013-03-13 15:01             ` Haojian Zhuang
2013-03-13 15:19               ` Pawel Moll
2013-03-13 15:59                 ` Haojian Zhuang
2013-03-13 16:28                   ` Pawel Moll
2013-03-13 16:32                   ` Rob Herring
2013-03-15 12:34                     ` Russell King - ARM Linux
2013-03-15 12:58                       ` Pawel Moll
2013-03-15 18:10                         ` Russell King - ARM Linux
2013-03-13  5:05 ` [PATCH v3 07/11] ARM: debug: support debug ll on hisilicon soc Haojian Zhuang
2013-03-13  5:05 ` [PATCH v3 08/11] clk: hi3xxx: add clock support Haojian Zhuang
2013-03-13  5:05 ` Haojian Zhuang [this message]
2013-03-13  5:05 ` [PATCH v3 10/11] ARM: hi3xxx: enable hi4511 with device tree Haojian Zhuang
2013-03-13  5:05 ` [PATCH v3 11/11] ARM: config: append arch hi3xxx into multi defconfig Haojian Zhuang

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=1363151142-32162-10-git-send-email-haojian.zhuang@linaro.org \
    --to=haojian.zhuang@linaro.org \
    --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 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).