From patchwork Sat Sep 28 00:45:33 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 2957231 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 A075CBFF0B for ; Sat, 28 Sep 2013 00:46:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CF6822016D for ; Sat, 28 Sep 2013 00:46:00 +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 E3F76202E8 for ; Sat, 28 Sep 2013 00:45:59 +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 1VPifU-0002iD-Kd; Sat, 28 Sep 2013 00:45:56 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VPifS-00045i-7K; Sat, 28 Sep 2013 00:45:54 +0000 Received: from mail-la0-f51.google.com ([209.85.215.51]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VPifP-000450-4H for linux-arm-kernel@lists.infradead.org; Sat, 28 Sep 2013 00:45:51 +0000 Received: by mail-la0-f51.google.com with SMTP id es20so2705669lab.24 for ; Fri, 27 Sep 2013 17:45:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:organization:to:subject:date:user-agent:cc :references:in-reply-to:mime-version:content-type :content-transfer-encoding:message-id; bh=VXrJ69UFYt3hvBXHzQF6Brw4mcM5oL+MCDveiyv7r18=; b=CawDkXpZo019Sggkbf4ViCHYoOJfm0VihCuD9edZk/spSlG3AEBM2hMV3WJX4Ts1vV qVOiSF8p4G/s9qGc+6W5oxWed69otyynF/F7qzlBlP0KmoP8vLshh+u3fl2UOsP63QVA +brq4/V4NGQkyqTPKmhcIGqv8mo4OGnMc4BaBzgqowZnyxThGD6TcXy2Orob6+d22xUx on91AUge9EHYgS7xxMn+k49r1nPaBKuEW24mK1tfAtGOyhvVWuFWdhuVI4XnCew83sRD xEFVmqRpzKCIatiMK4p92ec36uc2TBw73jiKf+ldi0Y49bvrQOza00nMOPOPVyK2xspx Ejtg== X-Gm-Message-State: ALoCoQllU2Ut4RJFGRIQJlPIVwY2JAqI2EJEWPgt9ObdiGxsEUpytf4guLesnotJ8EbwbrJDhJrR X-Received: by 10.112.156.166 with SMTP id wf6mr10763827lbb.13.1380329129186; Fri, 27 Sep 2013 17:45:29 -0700 (PDT) Received: from wasted.dev.rtsoft.ru (ppp91-76-85-193.pppoe.mtu-net.ru. [91.76.85.193]) by mx.google.com with ESMTPSA id vx8sm7494355lbb.8.1969.12.31.16.00.00 (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 27 Sep 2013 17:45:28 -0700 (PDT) From: Sergei Shtylyov Organization: Cogent Embedded To: horms@verge.net.au, linux-sh@vger.kernel.org Subject: [PATCH 2/2] ARM: shmobile: BOCK-W: add CAN0 support Date: Sat, 28 Sep 2013 04:45:33 +0400 User-Agent: KMail/1.13.5 (Linux/2.6.32.26-175.fc12.i686.PAE; KDE/4.4.5; i686; ; ) References: <201309280441.52414.sergei.shtylyov@cogentembedded.com> In-Reply-To: <201309280441.52414.sergei.shtylyov@cogentembedded.com> MIME-Version: 1.0 Message-Id: <201309280445.34234.sergei.shtylyov@cogentembedded.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130927_204551_328962_E6F175FB X-CRM114-Status: GOOD ( 12.17 ) X-Spam-Score: -2.6 (--) Cc: linux@arm.linux.org.uk, magnus.damm@gmail.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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-6.6 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 Register platform device and pin data for CAN0 controller on the BOCK-W board. Signed-off-by: Sergei Shtylyov --- arch/arm/mach-shmobile/board-bockw.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) Index: renesas/arch/arm/mach-shmobile/board-bockw.c =================================================================== --- renesas.orig/arch/arm/mach-shmobile/board-bockw.c +++ renesas/arch/arm/mach-shmobile/board-bockw.c @@ -19,6 +19,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include #include #include #include @@ -193,6 +194,16 @@ static struct resource usb_phy_resources static struct rcar_phy_platform_data usb_phy_platform_data __initdata = USB_PHY_SETTING; +/* CAN */ +static struct resource can_resources[] __initdata = { + /* CAN0 */ + DEFINE_RES_MEM(0xfffd0000, 0x1000), + DEFINE_RES_IRQ(gic_iid(0x64)), +}; + +static struct rcar_can_platform_data can_platform_data __initdata = { + .clock_select = CLKR_CLKP1, +}; /* SDHI */ static struct sh_mobile_sdhi_info sdhi0_info __initdata = { @@ -523,6 +534,9 @@ static const struct pinctrl_map bockw_pi "ssi7_data", "ssi"), PIN_MAP_MUX_GROUP_DEFAULT("rcar_sound", "pfc-r8a7778", "ssi8_data", "ssi"), + /* CAN0 */ + PIN_MAP_MUX_GROUP_DEFAULT("rcar_can.0", "pfc-r8a7778", + "can0_data_a", "can0"), /* Ether */ PIN_MAP_MUX_GROUP_DEFAULT("r8a777x-ether", "pfc-r8a7778", "ether_rmii", "ether"), @@ -684,6 +698,12 @@ static void __init bockw_init(void) platform_device_register_full(&cardinfo); } + + platform_device_register_resndata(&platform_bus, "rcar_can", 0, + can_resources, + ARRAY_SIZE(can_resources), + &can_platform_data, + sizeof(can_platform_data)); } static void __init bockw_init_late(void)