From patchwork Tue Feb 19 18:29:46 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bastian Hecht X-Patchwork-Id: 2163761 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id F26CA3FCF6 for ; Tue, 19 Feb 2013 17:29:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758695Ab3BSR34 (ORCPT ); Tue, 19 Feb 2013 12:29:56 -0500 Received: from mail-vb0-f42.google.com ([209.85.212.42]:51646 "EHLO mail-vb0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753636Ab3BSR34 (ORCPT ); Tue, 19 Feb 2013 12:29:56 -0500 Received: by mail-vb0-f42.google.com with SMTP id ff1so1295167vbb.15 for ; Tue, 19 Feb 2013 09:29:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=Vtyvyn/M15L7Jip3Lnw7vstBkK6JZ+fle3C5GZcmaz4=; b=BZvlhqqdhErT5HK1dA7C4lyhyN3P91HxLtuQe8xDbH40UN0IndieDSrKUzXCl+LGuY rTXaVTaxrBPMBF/8QjBkqri8y4jMV6xeE1qi+aAKez9w4QPvrq7wCLNb9FKT3xhpwvQe x5O++rNo88XBj5lv2ovSTeMA4J2U4lysshjlZxYBrxCy68amhnFVko8oEP5Ks1IwA4WA lzKfAMN+30H9ZXp9GZlRJbf+7lpIoMXXEkv1/ZJrP3Zwv6iaYMbcjcPU3dY8CZcs6nbW yhbL/KOIES4pdyCOpm+is/HX6/ZkR5rMtwFyrf295rhjmyOZTBjIJ0zIaqlrHJL2THXI W0Ug== X-Received: by 10.58.245.200 with SMTP id xq8mr22488729vec.21.1361294995239; Tue, 19 Feb 2013 09:29:55 -0800 (PST) Received: from bender.routerdd3bcc.com (rrcs-50-74-208-202.nyc.biz.rr.com. [50.74.208.202]) by mx.google.com with ESMTPS id h11sm101822815vdj.12.2013.02.19.09.29.53 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 19 Feb 2013 09:29:54 -0800 (PST) From: Bastian Hecht To: linux-sh@vger.kernel.org Cc: Magnus Damm , Paul Mundt Subject: [PATCH 3/3] ARM: mach-shmobile: r8a7740: Setup the serial devices using DT Date: Tue, 19 Feb 2013 12:29:46 -0600 Message-Id: <1361298586-30357-4-git-send-email-hechtb+renesas@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1361298586-30357-1-git-send-email-hechtb+renesas@gmail.com> References: <1361298586-30357-1-git-send-email-hechtb+renesas@gmail.com> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org We can now use the Device Tree for bringing up our serial devices. We need to add an alternative early_devices list in setup-r8a7740 without the serial devices and move them into the Armadillo-reference .dts config file. Signed-off-by: Bastian Hecht --- .../boot/dts/r8a7740-armadillo800eva-reference.dts | 76 ++++++++++++++++++++ arch/arm/mach-shmobile/setup-r8a7740.c | 15 ++-- 2 files changed, 87 insertions(+), 4 deletions(-) diff --git a/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts b/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts index 1e339cd..94fdad3 100644 --- a/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts +++ b/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts @@ -134,6 +134,82 @@ renesas,pins = "eth_base"; renesas,function = "eth"; }; + + sci@0xe6c40000 { + compatible = "renesas,shmobile-sci-r8a7740"; + interrupt-parent = <&intca>; + reg = <0xe6c40000 0x100>; + interrupts = <0x0c00>, <0x0c00>, <0x0c00>, <0x0c00>; + cell-index = <0>; + renesas,serial-type = <3>; + }; + + sci@0xe6c50000 { + compatible = "renesas,shmobile-sci-r8a7740"; + interrupt-parent = <&intca>; + reg = <0xe6c50000 0x100>; + interrupts = <0x0c20>, <0x0c20>, <0x0c20>, <0x0c20>; + cell-index = <1>; + renesas,serial-type = <3>; + }; + + sci@0xe6c60000 { + compatible = "renesas,shmobile-sci-r8a7740"; + interrupt-parent = <&intca>; + reg = <0xe6c60000 0x100>; + interrupts = <0x0c40>, <0x0c40>, <0x0c40>, <0x0c40>; + cell-index = <2>; + renesas,serial-type = <3>; + }; + + sci@0xe6c70000 { + compatible = "renesas,shmobile-sci-r8a7740"; + interrupt-parent = <&intca>; + reg = <0xe6c70000 0x100>; + interrupts = <0x0c60>, <0x0c60>, <0x0c60>, <0x0c60>; + cell-index = <3>; + renesas,serial-type = <3>; + }; + sci@0xe6c80000 { + compatible = "renesas,shmobile-sci-r8a7740"; + interrupt-parent = <&intca>; + reg = <0xe6c80000 0x100>; + interrupts = <0x0d20>, <0x0d20>, <0x0d20>, <0x0d20>; + cell-index = <4>; + renesas,serial-type = <3>; + }; + sci@0xe6cb0000 { + compatible = "renesas,shmobile-sci-r8a7740"; + interrupt-parent = <&intca>; + reg = <0xe6cb0000 0x100>; + interrupts = <0x0d40>, <0x0d40>, <0x0d40>, <0x0d40>; + cell-index = <5>; + renesas,serial-type = <3>; + }; + sci@0xe6cc0000 { + compatible = "renesas,shmobile-sci-r8a7740"; + interrupt-parent = <&intca>; + reg = <0xe6cc0000 0x100>; + interrupts = <0x04c0>, <0x04c0>, <0x04c0>, <0x04c0>; + cell-index = <6>; + renesas,serial-type = <3>; + }; + sci@0xe6cd0000 { + compatible = "renesas,shmobile-sci-r8a7740"; + interrupt-parent = <&intca>; + reg = <0xe6cd0000 0x100>; + interrupts = <0x04e0>, <0x04e0>, <0x04e0>, <0x04e0>; + cell-index = <7>; + renesas,serial-type = <3>; + }; + sci@0xe6c30000 { + compatible = "renesas,shmobile-sci-r8a7740"; + interrupt-parent = <&intca>; + reg = <0xe6c30000 0x100>; + interrupts = <0x0d60>, <0x0d60>, <0x0d60>, <0x0d60>; + cell-index = <8>; + renesas,serial-type = <4>; + }; }; &gpio { diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c index 5312aad..5f7597a 100644 --- a/arch/arm/mach-shmobile/setup-r8a7740.c +++ b/arch/arm/mach-shmobile/setup-r8a7740.c @@ -394,6 +394,13 @@ static struct platform_device *r8a7740_early_devices[] __initdata = { &tmu02_device, }; +static struct platform_device *r8a7740_early_devices_dt[] __initdata = { + &cmt10_device, + &tmu00_device, + &tmu01_device, + &tmu02_device, +}; + /* DMA */ static const struct sh_dmae_slave_config r8a7740_dmae_slaves[] = { { @@ -839,8 +846,8 @@ void __init r8a7740_add_early_devices_dt(void) { shmobile_setup_delay(800, 1, 3); /* Cortex-A9 @ 800MHz */ - early_platform_add_devices(r8a7740_early_devices, - ARRAY_SIZE(r8a7740_early_devices)); + early_platform_add_devices(r8a7740_early_devices_dt, + ARRAY_SIZE(r8a7740_early_devices_dt)); /* setup early console here as well */ shmobile_setup_console(); @@ -852,8 +859,8 @@ static const struct of_dev_auxdata r8a7740_auxdata_lookup[] __initconst = { void __init r8a7740_add_standard_devices_dt(void) { - platform_add_devices(r8a7740_early_devices, - ARRAY_SIZE(r8a7740_early_devices)); + platform_add_devices(r8a7740_early_devices_dt, + ARRAY_SIZE(r8a7740_early_devices_dt)); of_platform_populate(NULL, of_default_bus_match_table, r8a7740_auxdata_lookup, NULL);