From patchwork Wed Nov 6 10:40:01 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 3146261 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 79B0F9F3C4 for ; Wed, 6 Nov 2013 10:40:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A640F20398 for ; Wed, 6 Nov 2013 10:40:06 +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 CC122202AE for ; Wed, 6 Nov 2013 10:40:01 +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 1Ve0Wd-0001fV-AY; Wed, 06 Nov 2013 10:39:51 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Ve0Wa-00037w-RU; Wed, 06 Nov 2013 10:39:48 +0000 Received: from mail-pa0-x22d.google.com ([2607:f8b0:400e:c03::22d]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Ve0WX-00036u-IP for linux-arm-kernel@lists.infradead.org; Wed, 06 Nov 2013 10:39:46 +0000 Received: by mail-pa0-f45.google.com with SMTP id kp14so10338122pab.18 for ; Wed, 06 Nov 2013 02:39:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:date:message-id:subject; bh=BFSez2r3EzXzZxlQFiXunma6DisB20LUALejj8K9ch4=; b=OZrjR5ufNJXc8ugXu42pcwbCb+IPALpTqmICCHxmQKKjLH0ukYafGEjEwRE8R2uZEe 78NFbyOEzAmyhdyEJw1lG1aYSui9lZa9x//7Wzst1lw/RpE8i95F7VD6cMkasjz6QFGS gT94/feS8XjakRVglMs030sAvb+p14gJtO+jQ7ZF93PgGcM0kY3yuV5Yz5EvbyhV+DWM sW4PwTpAp+B8VFaXV1EX0AAwZF3VAz/xdVDruK+YW3TOt6eFUrd2NbvXw5LqyTytd40H 4xDS6PgZL1NTTgPGIPPrt9Ch98gItEQmbVjfATSRwFBmcYkHFVgTEYLYWPNj+NYL7ZkU Byqw== X-Received: by 10.68.88.161 with SMTP id bh1mr2515084pbb.49.1383734363984; Wed, 06 Nov 2013 02:39:23 -0800 (PST) Received: from [127.0.0.1] (ac230065.ppp.asahi-net.or.jp. [183.77.230.65]) by mx.google.com with ESMTPSA id rp8sm40497343pbc.25.2013.11.06.02.39.21 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 Nov 2013 02:39:22 -0800 (PST) From: Magnus Damm To: linux-sh@vger.kernel.org Date: Wed, 06 Nov 2013 19:40:01 +0900 Message-Id: <20131106104001.6305.85689.sendpatchset@w520> Subject: [PATCH] ARM: shmobile: Initial r8a7791 and Koelsch multiplatform support X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131106_053945_688032_028914E8 X-CRM114-Status: GOOD ( 10.32 ) X-Spam-Score: -2.0 (--) Cc: horms@verge.net.au, Magnus Damm , laurent.pinchart@ideasonboard.com, linux-arm-kernel@lists.infradead.org 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.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, 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 From: Magnus Damm Add Koelsch and r8a7791 to CONFIG_SHMOBILE_MULTI. At this point CCF is not yet supported so you cannot run this code yet. For CCF support to happen several different components are needed, and this is one simple portion that moves us forward. Other patches need to build on top of this one. Koelsch board support exists in 3 flavors: 1) SHMOBILE_MULTI, MACH_KOELSCH - board-koelsch-reference.c (CCF + DT) 2) SHMOBILE, MACH_KOELSCH_REFERENCE - board-koelsch-reference.c (DT) 3) SHMOBILE, MACH_KOELSCH - board-koelsch.c (legacy C code) When CCF is done then 2) will be removed. When 1) includes same features as 3) then 3) will be removed. Signed-off-by: Magnus Damm --- Built against "renesas-devel-v3.12-rc7-20131101" arch/arm/boot/dts/Makefile | 3 ++- arch/arm/mach-shmobile/Kconfig | 8 ++++++++ arch/arm/mach-shmobile/Makefile | 1 + arch/arm/mach-shmobile/board-koelsch-reference.c | 5 +++++ 4 files changed, 16 insertions(+), 1 deletion(-) --- 0001/arch/arm/boot/dts/Makefile +++ work/arch/arm/boot/dts/Makefile 2013-11-06 19:06:45.000000000 +0900 @@ -214,7 +214,8 @@ dtb-$(CONFIG_ARCH_SHMOBILE) += emev2-kzm r8a73a4-ape6evm.dtb \ r8a73a4-ape6evm-reference.dtb \ sh7372-mackerel.dtb -dtb-$(CONFIG_ARCH_SHMOBILE_MULTI) += emev2-kzm9d.dtb +dtb-$(CONFIG_ARCH_SHMOBILE_MULTI) += emev2-kzm9d.dtb \ + r8a7791-koelsch-reference.dtb dtb-$(CONFIG_ARCH_SOCFPGA) += socfpga_cyclone5.dtb \ socfpga_vt.dtb dtb-$(CONFIG_ARCH_SPEAR13XX) += spear1310-evb.dtb \ --- 0008/arch/arm/mach-shmobile/Kconfig +++ work/arch/arm/mach-shmobile/Kconfig 2013-11-06 19:07:10.000000000 +0900 @@ -20,8 +20,16 @@ comment "SH-Mobile System Type" config ARCH_EMEV2 bool "Emma Mobile EV2" +config ARCH_R8A7791 + bool "R-Car M2 (R8A77910)" + select RENESAS_IRQC + comment "SH-Mobile Board Type" +config MACH_KOELSCH + bool "Koelsch board" + depends on ARCH_R8A7791 + config MACH_KZM9D bool "KZM9D board" depends on ARCH_EMEV2 --- 0004/arch/arm/mach-shmobile/Makefile +++ work/arch/arm/mach-shmobile/Makefile 2013-11-06 19:07:22.000000000 +0900 @@ -56,6 +56,7 @@ obj-$(CONFIG_ARCH_R8A7779) += pm-r8a7779 # Board objects ifdef CONFIG_ARCH_SHMOBILE_MULTI +obj-$(CONFIG_MACH_KOELSCH) += board-koelsch-reference.o obj-$(CONFIG_MACH_KZM9D) += board-kzm9d-reference.o else obj-$(CONFIG_MACH_APE6EVM) += board-ape6evm.o --- 0001/arch/arm/mach-shmobile/board-koelsch-reference.c +++ work/arch/arm/mach-shmobile/board-koelsch-reference.c 2013-11-06 19:09:52.000000000 +0900 @@ -19,6 +19,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include #include #include #include @@ -27,7 +28,11 @@ static void __init koelsch_add_standard_devices(void) { +#ifdef CONFIG_COMMON_CLK + of_clk_init(NULL); +#else r8a7791_clock_init(); +#endif r8a7791_add_dt_devices(); of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); }