From patchwork Mon Jul 8 06:00:30 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 2824705 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.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 4484CC0AB2 for ; Mon, 8 Jul 2013 06:01:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CD3ED20124 for ; Mon, 8 Jul 2013 06:01:05 +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 8502E2011F for ; Mon, 8 Jul 2013 06:01:04 +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 1Uw4VK-0006VY-6w; Mon, 08 Jul 2013 06:00:54 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Uw4VH-0001Gj-JE; Mon, 08 Jul 2013 06:00:51 +0000 Received: from mail-pb0-x229.google.com ([2607:f8b0:400e:c01::229]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Uw4VD-0001GO-KU for linux-arm-kernel@lists.infradead.org; Mon, 08 Jul 2013 06:00:48 +0000 Received: by mail-pb0-f41.google.com with SMTP id rp16so3948728pbb.14 for ; Sun, 07 Jul 2013 23:00:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:date:message-id:subject; bh=8nXSaNFkVAEWKylVOy/p+iUuBnxdSOTxEt2+D1M/JFg=; b=FlmdLhKbYHeOQotdNTt3HpTDrlf6YrMrSWLiySF1hQ9qg/GezJ5MddqvbZlif1l978 VVEOOkF3FgOqL2/UieZcqt/Q7ONlUsM7fq3q2N93+QX6Ta8O4exiSweNyBOxiPMaeZIT xo9cEqsDYH+xUdauf0azOHZ9ZvCDrbw75N1vAb4WoxUHtuD89JTBsDnAfnwSO6eS6hXn XH3hrCaVhG8Z6AZvPxr9I5Gurl4WI6sG5iW4CiHA+/cU27yJqUaZJTbMjpGxpdQj/xiA AhF+iLGJkPnRTRPjHG16fA2GxWVwQNFzHZJHz5kQ0Cpl7xWEA5hUh8yjEuZkqswf6OoL zkFg== X-Received: by 10.66.141.104 with SMTP id rn8mr21438322pab.52.1373263225915; Sun, 07 Jul 2013 23:00:25 -0700 (PDT) Received: from [127.0.0.1] (ac230065.ppp.asahi-net.or.jp. [183.77.230.65]) by mx.google.com with ESMTPSA id ai6sm22071332pad.15.2013.07.07.23.00.22 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 07 Jul 2013 23:00:24 -0700 (PDT) From: Magnus Damm To: linux-sh@vger.kernel.org Date: Mon, 08 Jul 2013 15:00:30 +0900 Message-Id: <20130708060030.13607.45725.sendpatchset@w520> Subject: [PATCH] ARM: shmobile: KZM9D DT reference implementation X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130708_020047_905236_2FC370D5 X-CRM114-Status: GOOD ( 15.94 ) X-Spam-Score: -2.0 (--) Cc: arnd@arndb.de, Magnus Damm , horms@verge.net.au, olof@lixom.net, shinya.kuribayashi.px@renesas.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.4 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 a DT reference implementation for the KZM9D board. Only DT devices are used in this case. UART, STI, GPIO and SMP / GIC are all provided by emev2.dtsi. There is still a board specific C file used for enabling legacy SH clocks. This file will be removed after we have moved over to common clocks. Signed-off-by: Magnus Damm --- Written against "renesas-next-20130704v2". Boot tested on KZM9D. arch/arm/boot/dts/Makefile | 1 arch/arm/boot/dts/emev2-kzm9d-reference.dts | 26 +++++++++++++ arch/arm/mach-shmobile/Kconfig | 12 ++++++ arch/arm/mach-shmobile/Makefile | 1 arch/arm/mach-shmobile/Makefile.boot | 1 arch/arm/mach-shmobile/board-kzm9d-reference.c | 47 ++++++++++++++++++++++++ 6 files changed, 88 insertions(+) --- 0001/arch/arm/boot/dts/Makefile +++ work/arch/arm/boot/dts/Makefile 2013-07-08 14:24:15.000000000 +0900 @@ -160,6 +160,7 @@ dtb-$(CONFIG_ARCH_U8500) += snowball.dtb hrefv60plus.dtb \ ccu9540.dtb dtb-$(CONFIG_ARCH_SHMOBILE) += emev2-kzm9d.dtb \ + emev2-kzm9d-reference.dtb \ r8a7740-armadillo800eva.dtb \ r8a7778-bockw.dtb \ r8a7740-armadillo800eva-reference.dtb \ --- /dev/null +++ work/arch/arm/boot/dts/emev2-kzm9d-reference.dts 2013-07-08 14:48:50.000000000 +0900 @@ -0,0 +1,26 @@ +/* + * Device Tree Source for the KZM9D board + * + * Copyright (C) 2013 Renesas Solutions Corp. + * + * This file is licensed under the terms of the GNU General Public License + * version 2. This program is licensed "as is" without any warranty of any + * kind, whether express or implied. + */ +/dts-v1/; + +/include/ "emev2.dtsi" + +/ { + model = "EMEV2 KZM9D Board"; + compatible = "renesas,kzm9d-reference", "renesas,emev2"; + + memory { + device_type = "memory"; + reg = <0x40000000 0x8000000>; + }; + + chosen { + bootargs = "console=ttyS1,115200n81 ignore_loglevel root=/dev/nfs ip=dhcp nfsroot=,rsize=4096,wsize=4096"; + }; +}; --- 0001/arch/arm/mach-shmobile/Kconfig +++ work/arch/arm/mach-shmobile/Kconfig 2013-07-08 14:24:15.000000000 +0900 @@ -167,6 +167,18 @@ config MACH_KZM9D select REGULATOR_FIXED_VOLTAGE if REGULATOR select USE_OF +config MACH_KZM9D_REFERENCE + bool "KZM9D board - Reference Device Tree Implementation" + depends on ARCH_EMEV2 + select REGULATOR_FIXED_VOLTAGE if REGULATOR + select USE_OF + ---help--- + Use reference implementation of KZM9D board support + which makes a greater use of device tree at the expense + of not supporting a number of devices. + + This is intended to aid developers + config MACH_KZM9G bool "KZM-A9-GT board" depends on ARCH_SH73A0 --- 0001/arch/arm/mach-shmobile/Makefile +++ work/arch/arm/mach-shmobile/Makefile 2013-07-08 14:24:15.000000000 +0900 @@ -47,6 +47,7 @@ obj-$(CONFIG_MACH_LAGER_REFERENCE) += bo obj-$(CONFIG_MACH_ARMADILLO800EVA) += board-armadillo800eva.o obj-$(CONFIG_MACH_ARMADILLO800EVA_REFERENCE) += board-armadillo800eva-reference.o obj-$(CONFIG_MACH_KZM9D) += board-kzm9d.o +obj-$(CONFIG_MACH_KZM9D_REFERENCE) += board-kzm9d-reference.o obj-$(CONFIG_MACH_KZM9G) += board-kzm9g.o obj-$(CONFIG_MACH_KZM9G_REFERENCE) += board-kzm9g-reference.o --- 0001/arch/arm/mach-shmobile/Makefile.boot +++ work/arch/arm/mach-shmobile/Makefile.boot 2013-07-08 14:24:15.000000000 +0900 @@ -7,6 +7,7 @@ loadaddr-$(CONFIG_MACH_ARMADILLO800EVA_R loadaddr-$(CONFIG_MACH_BOCKW) += 0x60008000 loadaddr-$(CONFIG_MACH_KOTA2) += 0x41008000 loadaddr-$(CONFIG_MACH_KZM9D) += 0x40008000 +loadaddr-$(CONFIG_MACH_KZM9D_REFERENCE) += 0x40008000 loadaddr-$(CONFIG_MACH_KZM9G) += 0x41008000 loadaddr-$(CONFIG_MACH_KZM9G_REFERENCE) += 0x41008000 loadaddr-$(CONFIG_MACH_LAGER) += 0x40008000 --- /dev/null +++ work/arch/arm/mach-shmobile/board-kzm9d-reference.c 2013-07-08 14:49:41.000000000 +0900 @@ -0,0 +1,47 @@ +/* + * kzm9d board support - Reference DT implementation + * + * Copyright (C) 2013 Renesas Solutions Corp. + * Copyright (C) 2013 Magnus Damm + * + * 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; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include +#include +#include +#include +#include + +static void __init kzm9d_add_standard_devices(void) +{ + emev2_clock_init(); + + of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); +} + +static const char *kzm9d_boards_compat_dt[] __initdata = { + "renesas,kzm9d-reference", + NULL, +}; + +DT_MACHINE_START(KZM9D_DT, "kzm9d") + .smp = smp_ops(emev2_smp_ops), + .map_io = emev2_map_io, + .init_early = emev2_init_delay, + .init_machine = kzm9d_add_standard_devices, + .init_late = shmobile_init_late, + .dt_compat = kzm9d_boards_compat_dt, +MACHINE_END +