From patchwork Tue Oct 29 15:23:13 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 3108701 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 479C69F3E2 for ; Tue, 29 Oct 2013 15:24:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1A8272034E for ; Tue, 29 Oct 2013 15:24: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 D16882034A for ; Tue, 29 Oct 2013 15:24:51 +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 1VbB9H-0002e1-Pf; Tue, 29 Oct 2013 15:24:04 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VbB90-0003jF-Kd; Tue, 29 Oct 2013 15:23:46 +0000 Received: from perceval.ideasonboard.com ([95.142.166.194]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VbB8p-0003gr-Jg for linux-arm-kernel@lists.infradead.org; Tue, 29 Oct 2013 15:23:40 +0000 Received: from avalon.ideasonboard.com (unknown [91.178.173.243]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 746DF35A6C; Tue, 29 Oct 2013 16:22:14 +0100 (CET) From: Laurent Pinchart To: linux-sh@vger.kernel.org Subject: [PATCH 3/3] ARM: shmobile: lager: Enable SCIF0 and SCIF1 serial ports in DT Date: Tue, 29 Oct 2013 16:23:13 +0100 Message-Id: <1383060193-1505-4-git-send-email-laurent.pinchart+renesas@ideasonboard.com> X-Mailer: git-send-email 1.8.1.5 In-Reply-To: <1383060193-1505-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com> References: <1383060193-1505-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131029_112335_780716_814AFE88 X-CRM114-Status: GOOD ( 11.20 ) X-Spam-Score: -2.4 (--) Cc: 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.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, 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 SCIF0 and SCIF1 are used as debug serial ports. Enable them and configure pinmuxing appropriately. We can now remove the clkdev registration hack for SCIF devices from the Lager reference board file. Signed-off-by: Laurent Pinchart --- arch/arm/boot/dts/r8a7790-lager.dts | 24 ++++++++++++++++++++---- arch/arm/mach-shmobile/board-lager-reference.c | 18 ++---------------- 2 files changed, 22 insertions(+), 20 deletions(-) diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts index a923ab6..9830c87 100644 --- a/arch/arm/boot/dts/r8a7790-lager.dts +++ b/arch/arm/boot/dts/r8a7790-lager.dts @@ -16,8 +16,13 @@ model = "Lager"; compatible = "renesas,lager", "renesas,r8a7790"; + aliases { + serial0 = &scif0; + serial1 = &scif1; + }; + chosen { - bootargs = "console=ttySC6,115200 ignore_loglevel rw root=/dev/nfs ip=dhcp"; + bootargs = "console=ttySC0,115200 ignore_loglevel rw root=/dev/nfs ip=dhcp"; }; memory@40000000 { @@ -58,9 +63,6 @@ }; &pfc { - pinctrl-0 = <&scif0_pins &scif1_pins>; - pinctrl-names = "default"; - scif0_pins: scif0 { renesas,groups = "scif0_data"; renesas,function = "scif0"; @@ -86,3 +88,17 @@ non-removable; status = "okay"; }; + +&scif0 { + pinctrl-0 = <&scif0_pins>; + pinctrl-names = "default"; + + status = "okay"; +}; + +&scif1 { + pinctrl-0 = <&scif1_pins>; + pinctrl-names = "default"; + + status = "okay"; +}; diff --git a/arch/arm/mach-shmobile/board-lager-reference.c b/arch/arm/mach-shmobile/board-lager-reference.c index bc3d0d2..1f5d6e2 100644 --- a/arch/arm/mach-shmobile/board-lager-reference.c +++ b/arch/arm/mach-shmobile/board-lager-reference.c @@ -36,24 +36,10 @@ static void __init lager_init_time(void) static void __init lager_add_standard_devices(void) { /* - * This is a really crude hack to provide clkdev support to the SCIF - * and CMT devices until they get moved to DT. + * This is a really crude hack to provide clkdev support to the CMT + * CMT device until it gets moved to DT. */ - static const char * const scif_names[] = { - "scifa0", "scifa1", "scifb0", "scifb1", - "scifb2", "scifa2", "scif0", "scif1", - "hscif0", "hscif1", - }; struct clk *clk; - unsigned int i; - - for (i = 0; i < ARRAY_SIZE(scif_names); ++i) { - clk = clk_get(NULL, scif_names[i]); - if (clk) { - clk_register_clkdev(clk, NULL, "sh-sci.%u", i); - clk_put(clk); - } - } clk = clk_get(NULL, "cmt0"); if (clk) {