From patchwork Sat Jun 8 20:18:47 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 2692991 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 26989DF24C for ; Sat, 8 Jun 2013 20:18:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752698Ab3FHUSk (ORCPT ); Sat, 8 Jun 2013 16:18:40 -0400 Received: from mail-lb0-f169.google.com ([209.85.217.169]:53404 "EHLO mail-lb0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752689Ab3FHUSk (ORCPT ); Sat, 8 Jun 2013 16:18:40 -0400 Received: by mail-lb0-f169.google.com with SMTP id d10so5243964lbj.14 for ; Sat, 08 Jun 2013 13:18:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:organization:to:subject:date:user-agent:cc:references :in-reply-to:mime-version:content-type:content-transfer-encoding :message-id:x-gm-message-state; bh=cU0DDhiS1Pet0Srwx8lIvhyDAVEsQMqFi1C9+7La1F4=; b=MhOjZj4pBV0qUqpZCbPQ9YE92W/604sZd1CvixeTZcnZfrn6GBcMSc/IzT0ubnsx8u fZHhFfwFx36i3HMvsNDjRcr5zKAQ/T1M/SgW4lLtZTFYmJWEGJy1tSxMjY0S1ZlieP8D B0dZObjIyC9WMi01ZNgauMfxh5QFoY42cY2RkFib0vKuJol4zTqME8g1OLSEoRr8B02N a/Be5jtDM/QaIusTr8wQMcavBFAtq1bddyzuyhXC4hnYiTkBHkAcvEPOj34/+Ws9gfgQ JlogbeAVCeACYmvrJxndvfFWdJ1wPqnY1CJzri+XdWI6nI459V5Ttsvve0QuH/aga5s3 5j5w== X-Received: by 10.152.87.15 with SMTP id t15mr1827617laz.85.1370722718611; Sat, 08 Jun 2013 13:18:38 -0700 (PDT) Received: from wasted.dev.rtsoft.ru (mail.dev.rtsoft.ru. [213.79.90.226]) by mx.google.com with ESMTPSA id n7sm3040934lbd.12.2013.06.08.13.18.36 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Sat, 08 Jun 2013 13:18:37 -0700 (PDT) From: Sergei Shtylyov Organization: Cogent Embedded To: horms@verge.net.au, linux-sh@vger.kernel.org Subject: [PATCH v9 3/3] ARM: shmobile: BOCK-W: add USB support Date: Sun, 9 Jun 2013 00:18:47 +0400 User-Agent: KMail/1.13.5 (Linux/2.6.32.26-175.fc12.i686.PAE; KDE/4.4.5; i686; ; ) Cc: linux-usb@vger.kernel.org, magnus.damm@gmail.com, linux@arm.linux.org.uk, linux-arm-kernel@lists.infradead.org References: <201306090013.00313.sergei.shtylyov@cogentembedded.com> In-Reply-To: <201306090013.00313.sergei.shtylyov@cogentembedded.com> MIME-Version: 1.0 Message-Id: <201306090018.47692.sergei.shtylyov@cogentembedded.com> X-Gm-Message-State: ALoCoQnjjQtU1hhDmdQD6s6Hzgr1T27kbp+svGoww1a2FsZimensMNQ+zGDQxbaocjK7KmCp7Pka Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org Register the USB PHY device from bockw_init(), passing the platform data to it. Set machine's init_late() method to r8a7778_init_late() in order for [EO]HCI to get registered too... Don't forget to add USB PENC0/1 pins to bockw_pinctrl_map[]. The patch has been tested on the BOCK-W board. Signed-off-by: Sergei Shtylyov --- Changes since version 8: - resolved reject, refreshed the patch. Changes since version 6: - added USB PENC0/1 pins to bockw_pinctrl_map[]. Changes since version 4: - annotated 'usb_phy_platform_data' as '__initdata' since it's kmemdup()'ed while registering the platform device anyway; - refreshed the patch. Changes since version 3: - removed initializer for 'usb_phy_platform_data' letting it be set to all 0s; - refreshed the patch. Changes since version 2: - refreshed the patch. Changes since the original posting: - removed initializer for no longer existing field in 'usb_phy_platform_data', modified the comment to the 'ferrite_bead' field initializer. arch/arm/mach-shmobile/board-bockw.c | 8 ++++++++ 1 file changed, 8 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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 @@ -63,6 +63,8 @@ static struct sh_mobile_sdhi_info sdhi0_ .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT, }; +static struct rcar_phy_platform_data usb_phy_platform_data __initdata; + static const struct pinctrl_map bockw_pinctrl_map[] = { /* SCIF0 */ PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.0", "pfc-r8a7778", @@ -78,6 +80,10 @@ static const struct pinctrl_map bockw_pi "sdhi0_data4", "sdhi0"), PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7778", "sdhi0_wp", "sdhi0"), + PIN_MAP_MUX_GROUP_DEFAULT("ehci-platform", "pfc-r8a7778", + "usb0", "usb0"), + PIN_MAP_MUX_GROUP_DEFAULT("ehci-platform", "pfc-r8a7778", + "usb1", "usb1"), }; #define FPGA 0x18200000 @@ -91,6 +97,7 @@ static void __init bockw_init(void) r8a7778_clock_init(); r8a7778_init_irq_extpin(1); r8a7778_add_standard_devices(); + r8a7778_add_usb_phy_device(&usb_phy_platform_data); pinctrl_register_mappings(bockw_pinctrl_map, ARRAY_SIZE(bockw_pinctrl_map)); @@ -146,4 +153,5 @@ DT_MACHINE_START(BOCKW_DT, "bockw") .init_machine = bockw_init, .init_time = shmobile_timer_init, .dt_compat = bockw_boards_compat_dt, + .init_late = r8a7778_init_late, MACHINE_END