From patchwork Sat Aug 24 09:29:58 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haojian Zhuang X-Patchwork-Id: 2849184 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E481A9F239 for ; Sat, 24 Aug 2013 09:32:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F030920270 for ; Sat, 24 Aug 2013 09:32:23 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DD3BD2026F for ; Sat, 24 Aug 2013 09:32:22 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VDABz-00061N-Ef; Sat, 24 Aug 2013 09:31:35 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VDABk-0006ML-Rb; Sat, 24 Aug 2013 09:31:20 +0000 Received: from mail-pd0-f171.google.com ([209.85.192.171]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VDABH-0006Hs-Hy for linux-arm-kernel@lists.infradead.org; Sat, 24 Aug 2013 09:30:53 +0000 Received: by mail-pd0-f171.google.com with SMTP id g10so1599154pdj.16 for ; Sat, 24 Aug 2013 02:30:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=99FKnq2ZneGTd6Zs35eeRTQk73lTsVTeM0b9Xu4J5Vo=; b=MoQ8kb3AAlyTKhkIr1cDx07C2cMVSQ/h/UOV+b5/FBJW4xhSHgmTdxwvvyggTo8Cbi nFklamZFHZl15TO2T9Xgy3S/5RCtLsj3QjQtSronrlQQDrUPl/2fSLk2M/koIlpnV00q 0Rf+Xw+UQ6ZNWOXq9kUPqX3rzRqw9my/hNNQHJC6zpd/AQmLEiAx13y+2UFFJAmv0Mjy mKO4iiHBUzawiLFlguC9zHQ1l/6hLxpH+uCNtzoASpcWK7w7CA3BxB7kS5C8ltWvdkUc vfNEawz/jY/Yh81daaZb51Hpw6phU+JSMxTHSW6sPJUqjeTUXKLrDwddhKycHYmOBqtu ddwA== X-Gm-Message-State: ALoCoQmfWIjw4hBt9ZykgB02Hcxg37qd+mmyTz7SRU4DETmj8rDafw2sZ8CKkcsOJv64RT+Q+YKb X-Received: by 10.67.23.199 with SMTP id ic7mr3603869pad.73.1377336625961; Sat, 24 Aug 2013 02:30:25 -0700 (PDT) Received: from localhost.localdomain ([27.115.121.40]) by mx.google.com with ESMTPSA id sz3sm5057093pbc.5.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 24 Aug 2013 02:30:25 -0700 (PDT) From: Haojian Zhuang To: arnd@arndb.de, linux@arm.linux.org.uk, linus.walleij@linaro.org, olof@lixom.net, rob.herring@calxeda.com, linux-arm-kernel@lists.infradead.org, tglx@linutronix.de, john.stultz@linaro.org, mturquette@linaro.org, grant.likely@linaro.org, mark.rutland@arm.com, khilman@linaro.org, swarren@wwwdotorg.org Subject: [PATCH v8 3/8] ARM: hi3xxx: add board support with device tree Date: Sat, 24 Aug 2013 17:29:58 +0800 Message-Id: <1377336603-10303-4-git-send-email-haojian.zhuang@linaro.org> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1377336603-10303-1-git-send-email-haojian.zhuang@linaro.org> References: <1377336603-10303-1-git-send-email-haojian.zhuang@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130824_053052_719425_755E501A X-CRM114-Status: GOOD ( 14.79 ) X-Spam-Score: -1.9 (-) Cc: Haojian Zhuang X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add board support with device tree for Hisilicon Hi36xx/Hi37xx platform. Changelog: v3: 1. Remove .map_io() in DT machine descriptor. Since debug_ll_io_init() is called by default. 2. Remove .init_machine() in DT machine descriptor. Since of_platform_populate() is called by default in DT mode. v2: 1. Remove .init_irq() in DT machine descriptor. Since irqchip_init() is called by default in DT mode. Signed-off-by: Haojian Zhuang --- .../bindings/arm/hisilicon/hisilicon.txt | 10 ++++++ arch/arm/Kconfig | 2 ++ arch/arm/Makefile | 1 + arch/arm/mach-hi3xxx/Kconfig | 12 ++++++++ arch/arm/mach-hi3xxx/Makefile | 5 +++ arch/arm/mach-hi3xxx/hi3xxx.c | 36 ++++++++++++++++++++++ 6 files changed, 66 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 16f088a..f0e7374 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -943,6 +943,8 @@ source "arch/arm/mach-footbridge/Kconfig" source "arch/arm/mach-gemini/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 a37a50f..23fb0b0 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -155,6 +155,7 @@ machine-$(CONFIG_ARCH_EBSA110) += ebsa110 machine-$(CONFIG_ARCH_EP93XX) += ep93xx machine-$(CONFIG_ARCH_EXYNOS) += exynos machine-$(CONFIG_ARCH_GEMINI) += gemini +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..68bd26c --- /dev/null +++ b/arch/arm/mach-hi3xxx/Kconfig @@ -0,0 +1,12 @@ +config ARCH_HI3xxx + bool "Hisilicon Hi36xx/Hi37xx family" if ARCH_MULTI_V7 + select ARM_AMBA + select ARM_GIC + select ARM_TIMER_SP804 + select CACHE_L2X0 + select CLKSRC_OF + select GENERIC_CLOCKEVENTS + select PINCTRL + select PINCTRL_SINGLE + 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..e7c54bc --- /dev/null +++ b/arch/arm/mach-hi3xxx/hi3xxx.c @@ -0,0 +1,36 @@ +/* + * (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 + * + * 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 +#include +#include +#include + +#include +#include + +static void __init hi3xxx_timer_init(void) +{ + of_clk_init(NULL); + clocksource_of_init(); +} + +static const char *hs_compat[] __initdata = { + "hisilicon,hi3620-hi4511", + NULL, +}; + +DT_MACHINE_START(HI3xxx, "Hisilicon Hi36xx/Hi37xx (Flattened Device Tree)") + .init_time = hi3xxx_timer_init, + .dt_compat = hs_compat, +MACHINE_END