From patchwork Tue Mar 12 17:08:38 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haojian Zhuang X-Patchwork-Id: 15298 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 13AE223E3E for ; Tue, 12 Mar 2013 17:09:39 +0000 (UTC) Received: from mail-vc0-f170.google.com (mail-vc0-f170.google.com [209.85.220.170]) by fiordland.canonical.com (Postfix) with ESMTP id A79B4A18677 for ; Tue, 12 Mar 2013 17:09:38 +0000 (UTC) Received: by mail-vc0-f170.google.com with SMTP id p16so35370vcq.15 for ; Tue, 12 Mar 2013 10:09:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state; bh=dsjiXAcr8rPnFLPRHdKYsZePot/8x3vBn6BRcqR8hwc=; b=MUxunl3u2jEBqxezoYovOaUBT3SAlT5DxXa5HebPGlZ2GNQQGxeJNpedBQZtBp94zO GgaqKhd4Dv89UOZZ+um5i6QVhs5ag3agARBYZ1foA1Vo8rb36gihmfonJzrAnkYqUxoj T8Z+/cqANuUPfNOTpHWJC9zZkUgjOlWwiYCagkKPbTTqiQ35ML8aKIOQ+04+S9X0YaU5 pxKWb3K17EpjmOQ3izR3gkbM7VSSf1lXQ8TIa97wyZJ/71LanBtrTjjF4rKMGUy0clHG R2/aZN41O6hxIUUU6ZT7hBlos6Lp5DFuIANXurnJ47lENUVqsYDzl5hsUSWCSeeDDKxQ LYYA== X-Received: by 10.52.18.148 with SMTP id w20mr5987982vdd.8.1363108178154; Tue, 12 Mar 2013 10:09:38 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.127.98 with SMTP id nf2csp138407veb; Tue, 12 Mar 2013 10:09:37 -0700 (PDT) X-Received: by 10.182.2.198 with SMTP id 6mr12789484obw.8.1363108177472; Tue, 12 Mar 2013 10:09:37 -0700 (PDT) Received: from mail-ie0-x22c.google.com (mail-ie0-x22c.google.com [2607:f8b0:4001:c03::22c]) by mx.google.com with ESMTPS id lg7si20913124obb.108.2013.03.12.10.09.37 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 12 Mar 2013 10:09:37 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:4001:c03::22c is neither permitted nor denied by best guess record for domain of haojian.zhuang@linaro.org) client-ip=2607:f8b0:4001:c03::22c; Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:4001:c03::22c is neither permitted nor denied by best guess record for domain of haojian.zhuang@linaro.org) smtp.mail=haojian.zhuang@linaro.org Received: by mail-ie0-f172.google.com with SMTP id c10so101837ieb.31 for ; Tue, 12 Mar 2013 10:09:37 -0700 (PDT) X-Received: by 10.50.41.71 with SMTP id d7mr1097412igl.86.1363108176954; Tue, 12 Mar 2013 10:09:36 -0700 (PDT) Received: from localhost.localdomain ([140.206.155.72]) by mx.google.com with ESMTPS id xc3sm20593825igb.10.2013.03.12.10.09.32 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 12 Mar 2013 10:09:36 -0700 (PDT) From: Haojian Zhuang To: linux@arm.linux.org.uk, linus.walleij@linaro.org, arnd@arndb.de, olof@lixom.net, rob.herring@calxeda.com, linux-arm-kernel@lists.infradead.org, pawel.moll@arm.com, swarren@nvidia.com, john.stultz@linaro.org, tglx@linutronix.de, mturquette@linaro.org Cc: patches@linaro.org, Haojian Zhuang Subject: [PATCH v2 09/14] ARM: hs: add board support with device tree Date: Wed, 13 Mar 2013 01:08:38 +0800 Message-Id: <1363108124-17484-10-git-send-email-haojian.zhuang@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1363108124-17484-1-git-send-email-haojian.zhuang@linaro.org> References: <1363108124-17484-1-git-send-email-haojian.zhuang@linaro.org> X-Gm-Message-State: ALoCoQkeXQq9DfmZnHyE2afvjgeLSgjx66qL6dfXE5BjwUjW5LlW+bEpEluyUj4SOVJIlR9UN9gU Add board support with device tree for Hisilicon Hi36xx/Hi37xx platform. Signed-off-by: Haojian Zhuang --- 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 +++++++++++++++++++++++++++++++++++++++++ 5 files changed, 66 insertions(+) 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/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..f93f8b9 --- /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 + * + * 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 + +extern void __init hs_init_clocks(void); +static void __init hi3xxx_timer_init(void) +{ + hs_init_clocks(); + 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 */ + .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