From patchwork Thu Jul 18 18:35:01 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Shiyan X-Patchwork-Id: 2829768 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 B14969F4E1 for ; Thu, 18 Jul 2013 18:47:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B0F83201BD for ; Thu, 18 Jul 2013 18:47:53 +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 655E320121 for ; Thu, 18 Jul 2013 18:47:52 +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 1Uzt6O-0006qE-8c; Thu, 18 Jul 2013 18:38:58 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Uzt5b-0001Qb-8c; Thu, 18 Jul 2013 18:38:07 +0000 Received: from smtp49.i.mail.ru ([94.100.177.109]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Uzt5X-0001P6-H3 for linux-arm-kernel@lists.infradead.org; Thu, 18 Jul 2013 18:38:04 +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=7pbqHlAmuqQmnoQRnCUQfg2fDt5FAxm20NdKfugKtSo=; b=OG/7dur2KUXcJsd96K6UEAGBWIGdCRmsNhQDgkXcCkEwySB7LBOj4+fFW2NJx+IdB0hAZh3Z5Ok9st518bJ1uFX8YuavvguAVP/vvo6mnA7gceLccvPTwdrO+Tr+N/Or/Y/ndSnHz/oNZAub+20MD59cRyfRDdiUIVtGZFlGTDw=; Received: from [188.134.40.128] (port=48263 helo=shc.zet) by smtp49.i.mail.ru with esmtpa (envelope-from ) id 1Uzt5B-0007tN-Og; Thu, 18 Jul 2013 22:37:42 +0400 From: Alexander Shiyan To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 10/10] ARM: clps711x: Add initial DT support Date: Thu, 18 Jul 2013 22:35:01 +0400 Message-Id: <1374172501-26796-11-git-send-email-shc_work@mail.ru> X-Mailer: git-send-email 1.8.1.5 In-Reply-To: <1374172501-26796-1-git-send-email-shc_work@mail.ru> References: <1374172501-26796-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-20130718_143803_860399_6A6DBAEF X-CRM114-Status: GOOD ( 16.60 ) X-Spam-Score: -2.0 (--) Cc: Mike Turquette , Alexander Shiyan , Arnd Bergmann , Daniel Lezcano , "Rafael J. Wysocki" , Olof Johansson , Russell King 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=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM,RCVD_IN_DNSWL_MED,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 initial support for Cirrus Logic CLPS711X based platforms using the device tree for discovery. The basic devices is not yet DT-capable, so the CLPS711X DT option is marked as experimental. Signed-off-by: Alexander Shiyan --- arch/arm/mach-clps711x/Kconfig | 7 +++++ arch/arm/mach-clps711x/Makefile | 1 + arch/arm/mach-clps711x/board-dt.c | 56 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 64 insertions(+) create mode 100644 arch/arm/mach-clps711x/board-dt.c diff --git a/arch/arm/mach-clps711x/Kconfig b/arch/arm/mach-clps711x/Kconfig index bea6295..8ef38c6 100644 --- a/arch/arm/mach-clps711x/Kconfig +++ b/arch/arm/mach-clps711x/Kconfig @@ -33,6 +33,13 @@ config ARCH_P720T Say Y here if you intend to run this kernel on the ARM Prospector 720T. +config CLPS711X_DT + bool "Support CLPS711X platforms from device tree (Very Experimental!)" + depends on USE_OF + help + Include support for Cirrus Logic CLPS711X based platforms + using the device tree for discovery. + config EP72XX_ROM_BOOT bool "EP721x/EP731x ROM boot" help diff --git a/arch/arm/mach-clps711x/Makefile b/arch/arm/mach-clps711x/Makefile index f04151e..77d3a76 100644 --- a/arch/arm/mach-clps711x/Makefile +++ b/arch/arm/mach-clps711x/Makefile @@ -11,3 +11,4 @@ obj-$(CONFIG_ARCH_CDB89712) += board-cdb89712.o obj-$(CONFIG_ARCH_CLEP7312) += board-clep7312.o obj-$(CONFIG_ARCH_EDB7211) += board-edb7211.o obj-$(CONFIG_ARCH_P720T) += board-p720t.o +obj-$(CONFIG_CLPS711X_DT) += board-dt.o diff --git a/arch/arm/mach-clps711x/board-dt.c b/arch/arm/mach-clps711x/board-dt.c new file mode 100644 index 0000000..5b6f3f1 --- /dev/null +++ b/arch/arm/mach-clps711x/board-dt.c @@ -0,0 +1,56 @@ +/* + * CLPS711X Generic DT board + * + * Author: Alexander Shiyan , 2013 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + */ + +#include +#include +#include +#include + +#include + +#include + +#include "common.h" + +void __init clps711x_timer_init_dt(void) +{ + of_clk_init(NULL); + clocksource_of_init(); +} + +static struct of_dev_auxdata clps711x_auxdata_lookup[] __initdata = { + OF_DEV_AUXDATA("cirrus,clps711x-syscon", CLPS711X_PHYS_BASE + SYSCON1, + "syscon.1", NULL), + OF_DEV_AUXDATA("cirrus,clps711x-syscon", CLPS711X_PHYS_BASE + SYSCON2, + "syscon.2", NULL), + OF_DEV_AUXDATA("cirrus,clps711x-syscon", CLPS711X_PHYS_BASE + SYSCON3, + "syscon.3", NULL), + { } +}; + +static void __init clps711x_init_dt(void) +{ + of_platform_populate(NULL, of_default_bus_match_table, + clps711x_auxdata_lookup, NULL); +} + +static const char *clps711x_dt_compat[] __initdata = { + "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_time = clps711x_timer_init, + .init_machine = clps711x_init_dt, + .restart = clps711x_restart, +MACHINE_END