From patchwork Fri May 13 11:26:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Shiyan X-Patchwork-Id: 9090681 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 699A0BF29F for ; Fri, 13 May 2016 11:28:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8235D2021A for ; Fri, 13 May 2016 11:28:41 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9FB1820256 for ; Fri, 13 May 2016 11:28:40 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1b1BFe-0001Xa-Ba; Fri, 13 May 2016 11:27:26 +0000 Received: from smtp38.i.mail.ru ([94.100.177.98]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1b1BFL-0001LM-8l for linux-arm-kernel@lists.infradead.org; Fri, 13 May 2016 11:27:09 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mail.ru; s=mail2; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=YP8tRexwN91KB2OAtIsbvli1WbtBpPfc3D/OLqabQn4=; b=Zz89syUANErjvE+vs7yvgyHCocNlCWe6tqO++2g1ndepQzDhQuVpObpCblH4RfkouPGR6K1AXkGOitducfxaqtkH+Bqg7dK39/rar5k0ZbyNdpflpCaIRJeubc7i1UM27+MZ5GwOLIZmraRRgI1z2UnHTLwh7szLEd7fMTKXUlE=; Received: from milas.spb.ru ([217.119.30.118]:52929 helo=shc.milas.spb.ru) by smtp38.i.mail.ru with esmtpa (envelope-from ) id 1b1BEy-0000HZ-PG; Fri, 13 May 2016 14:26:45 +0300 From: Alexander Shiyan To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/3] ARM: clps711x: Add basic DT support Date: Fri, 13 May 2016 14:26:27 +0300 Message-Id: <1463138788-5390-3-git-send-email-shc_work@mail.ru> X-Mailer: git-send-email 2.4.9 In-Reply-To: <1463138788-5390-1-git-send-email-shc_work@mail.ru> References: <1463138788-5390-1-git-send-email-shc_work@mail.ru> X-Mras: OK X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160513_042707_994823_545EEF72 X-CRM114-Status: GOOD ( 13.48 ) X-Spam-Score: -1.9 (-) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Alexander Shiyan , Pawel Moll , Ian Campbell , Russell King , Rob Herring , Kumar Gala 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=-4.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM,RCVD_IN_DNSWL_MED,RCVD_IN_SORBS_WEB,RP_MATCHES_RCVD, T_DKIM_INVALID, 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 This patch adds basic support to run Cirrus Logic ARMv4T CPUs with device-tree support. Signed-off-by: Alexander Shiyan --- arch/arm/Kconfig | 2 ++ arch/arm/mach-clps711x/Kconfig | 7 +++++++ arch/arm/mach-clps711x/common.c | 14 ++++++++++++++ arch/arm/mach-clps711x/devices.c | 6 ++++++ arch/arm/mach-clps711x/devices.h | 1 + 5 files changed, 30 insertions(+) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index cdfa6c2..afc1eaf 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -357,10 +357,12 @@ config ARCH_CLPS711X select ARCH_REQUIRE_GPIOLIB select AUTO_ZRELADDR select CLKSRC_MMIO + select CLKSRC_OF if OF select COMMON_CLK select CPU_ARM720T select GENERIC_CLOCKEVENTS select MFD_SYSCON + select OF_IRQ if OF select SOC_BUS help Support for Cirrus Logic 711x/721x/731x based boards. diff --git a/arch/arm/mach-clps711x/Kconfig b/arch/arm/mach-clps711x/Kconfig index f711498..3e11390 100644 --- a/arch/arm/mach-clps711x/Kconfig +++ b/arch/arm/mach-clps711x/Kconfig @@ -2,6 +2,13 @@ if ARCH_CLPS711X menu "CLPS711X/EP721X/EP731X Implementations" +config MACH_CLPS711X_DT + bool "Device-tree support" + select USE_OF + help + Select this if you want to experiment device-tree with + ARMv4T Cirrus Logic chips. + config ARCH_AUTCPU12 bool "AUTCPU12" help diff --git a/arch/arm/mach-clps711x/common.c b/arch/arm/mach-clps711x/common.c index bf62211..df0fdf8 100644 --- a/arch/arm/mach-clps711x/common.c +++ b/arch/arm/mach-clps711x/common.c @@ -23,12 +23,14 @@ #include #include +#include #include #include #include #include "common.h" +#include "devices.h" /* * This maps the generic CLPS711x registers @@ -63,3 +65,15 @@ void clps711x_restart(enum reboot_mode mode, const char *cmd) { soft_restart(0); } + +static const char *clps711x_dt_compat[] __initconst = { + "cirrus,clps711x", + NULL +}; + +DT_MACHINE_START(CLPS711X_DT, "Cirrus Logic CLPS711X (Device Tree Support)") + .dt_compat = clps711x_dt_compat, + .map_io = clps711x_map_io, + .init_late = clps711x_devices_init_dt, + .restart = clps711x_restart, +MACHINE_END diff --git a/arch/arm/mach-clps711x/devices.c b/arch/arm/mach-clps711x/devices.c index 77a9617..9ba5095 100644 --- a/arch/arm/mach-clps711x/devices.c +++ b/arch/arm/mach-clps711x/devices.c @@ -147,3 +147,9 @@ void __init clps711x_devices_init(void) clps711x_add_uart(); clps711x_soc_init(); } + +void __init clps711x_devices_init_dt(void) +{ + clps711x_add_cpuidle(); + clps711x_soc_init(); +}; diff --git a/arch/arm/mach-clps711x/devices.h b/arch/arm/mach-clps711x/devices.h index a5efc17..47378cd 100644 --- a/arch/arm/mach-clps711x/devices.h +++ b/arch/arm/mach-clps711x/devices.h @@ -10,3 +10,4 @@ */ void clps711x_devices_init(void); +void clps711x_devices_init_dt(void);