From patchwork Sat Jun 8 14:47:22 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haojian Zhuang X-Patchwork-Id: 17700 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f69.google.com (mail-qa0-f69.google.com [209.85.216.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7137F2390C for ; Sat, 8 Jun 2013 14:48:53 +0000 (UTC) Received: by mail-qa0-f69.google.com with SMTP id hu16sf2780651qab.0 for ; Sat, 08 Jun 2013 07:48:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-beenthere:x-forwarded-to:x-forwarded-for :delivered-to:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=7k/AdOuRx/q7UDNtj5CftCz4bbe8gWPgPk93xdfpSbc=; b=RNmdilsw3OE/9UkJgKKtYDQ8s3/zGShxnmjeVKhQj6VgNRP08CfKqocq4u+hOx+DkQ KUmTLSEOiYpKhHtQ2N4B+ae3Kug3gM0XjCvTVAKxTiaH0WdlpD7poRM3JiQnfw8mDo1Q zbWTu8sy8izctzzdPW5q6EqGJJ03fYUoIFJQ1kSwBe2kIH9U3R5bYcOkblpei/GdroFT D7dgZ/d4Uq3WYen6XckYY/Rv+RwrXbAuRTadJQ8Id6FFC5i2TpcB1qzi9UYXsP1peOXG aFW/YW0VBPIFjivEESHp7EnS2NA3aq24DhtSq/VigwBZ80d69whAzgF/qt/U5lO9Dj2X jtFw== X-Received: by 10.236.149.113 with SMTP id w77mr2442315yhj.2.1370702932931; Sat, 08 Jun 2013 07:48:52 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.129.36 with SMTP id nt4ls2207123qeb.25.gmail; Sat, 08 Jun 2013 07:48:52 -0700 (PDT) X-Received: by 10.52.165.36 with SMTP id yv4mr1408775vdb.31.1370702932739; Sat, 08 Jun 2013 07:48:52 -0700 (PDT) Received: from mail-vc0-f169.google.com (mail-vc0-f169.google.com [209.85.220.169]) by mx.google.com with ESMTPS id w13si1612452vcl.31.2013.06.08.07.48.52 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 08 Jun 2013 07:48:52 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.169 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.169; Received: by mail-vc0-f169.google.com with SMTP id ia10so3493837vcb.28 for ; Sat, 08 Jun 2013 07:48:52 -0700 (PDT) X-Received: by 10.52.53.36 with SMTP id y4mr1353028vdo.51.1370702932617; Sat, 08 Jun 2013 07:48:52 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.221.10.206 with SMTP id pb14csp16007vcb; Sat, 8 Jun 2013 07:48:52 -0700 (PDT) X-Received: by 10.68.96.193 with SMTP id du1mr3137793pbb.142.1370702931271; Sat, 08 Jun 2013 07:48:51 -0700 (PDT) Received: from mail-pd0-f171.google.com (mail-pd0-f171.google.com [209.85.192.171]) by mx.google.com with ESMTPS id xl2si1620654pbc.91.2013.06.08.07.48.50 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 08 Jun 2013 07:48:51 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.192.171 is neither permitted nor denied by best guess record for domain of haojian.zhuang@linaro.org) client-ip=209.85.192.171; Received: by mail-pd0-f171.google.com with SMTP id y14so2994458pdi.2 for ; Sat, 08 Jun 2013 07:48:50 -0700 (PDT) X-Received: by 10.68.191.167 with SMTP id gz7mr3273509pbc.16.1370702930712; Sat, 08 Jun 2013 07:48:50 -0700 (PDT) Received: from localhost.localdomain ([27.115.121.40]) by mx.google.com with ESMTPSA id rn7sm3320951pbc.12.2013.06.08.07.48.44 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 08 Jun 2013 07:48:50 -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, heiko@sntech.de Cc: patches@linaro.org, Haojian Zhuang Subject: [PATCH v4 6/7] ARM: hi3xxx: add board support with device tree Date: Sat, 8 Jun 2013 22:47:22 +0800 Message-Id: <1370702843-27172-7-git-send-email-haojian.zhuang@linaro.org> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1370702843-27172-1-git-send-email-haojian.zhuang@linaro.org> References: <1370702843-27172-1-git-send-email-haojian.zhuang@linaro.org> X-Gm-Message-State: ALoCoQkwWzZ8ruh36/I2f2bcbLxycBGUsQp6zbTW5S8tZ6ig0ehrkXB3GosgL+mKa/3RGqNtAsqN X-Original-Sender: haojian.zhuang@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.169 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 | 13 ++++++++ arch/arm/mach-hi3xxx/Makefile | 5 +++ arch/arm/mach-hi3xxx/hi3xxx.c | 37 ++++++++++++++++++++++ 6 files changed, 68 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 49d993c..acd2358 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -936,6 +936,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 1ba358b..748a9ca 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -147,6 +147,7 @@ machine-$(CONFIG_ARCH_DOVE) += dove machine-$(CONFIG_ARCH_EBSA110) += ebsa110 machine-$(CONFIG_ARCH_EP93XX) += ep93xx 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..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..064b303 --- /dev/null +++ b/arch/arm/mach-hi3xxx/hi3xxx.c @@ -0,0 +1,37 @@ +/* + * (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)") + /* Maintainer: Haojian Zhuang */ + .init_time = hi3xxx_timer_init, + .dt_compat = hs_compat, +MACHINE_END