From patchwork Thu Feb 17 06:37:19 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kalliguddi, Hema" X-Patchwork-Id: 569371 X-Patchwork-Delegate: me@felipebalbi.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p1H6bmiP005872 for ; Thu, 17 Feb 2011 06:37:49 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755251Ab1BQGhi (ORCPT ); Thu, 17 Feb 2011 01:37:38 -0500 Received: from comal.ext.ti.com ([198.47.26.152]:36320 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755141Ab1BQGhg (ORCPT ); Thu, 17 Feb 2011 01:37:36 -0500 Received: from dbdp31.itg.ti.com ([172.24.170.98]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id p1H6bU8h002246 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 17 Feb 2011 00:37:32 -0600 Received: from localhost.localdomain (localhost [127.0.0.1]) by dbdp31.itg.ti.com (8.13.8/8.13.8) with ESMTP id p1H6bN4d018214; Thu, 17 Feb 2011 12:07:28 +0530 (IST) From: Hema HK To: linux-usb@vger.kernel.org Cc: linux-omap@vger.kernel.org, Hema HK , Felipe Balbi , Tony Lindgren , Kevin Hilman , "Cousson, Benoit" , Paul Walmsley Subject: [PATCH 3/6 v8] AM35xx: hwmod data: Add USBOTG Date: Thu, 17 Feb 2011 12:07:19 +0530 Message-Id: <1297924642-3791-4-git-send-email-hemahk@ti.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1297924642-3791-1-git-send-email-hemahk@ti.com> References: <1297924642-3791-1-git-send-email-hemahk@ti.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 17 Feb 2011 06:37:49 +0000 (UTC) Index: linux-2.6/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c =================================================================== --- linux-2.6.orig/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +++ linux-2.6/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c @@ -28,6 +28,7 @@ #include "prm-regbits-34xx.h" #include "cm-regbits-34xx.h" #include "wd_timer.h" +#include /* * OMAP3xxx hardware module integration data @@ -55,6 +56,8 @@ static struct omap_hwmod omap3xxx_gpio5_ static struct omap_hwmod omap3xxx_gpio6_hwmod; static struct omap_hwmod omap34xx_sr1_hwmod; static struct omap_hwmod omap34xx_sr2_hwmod; +static struct omap_hwmod am35xx_usbhsotg_hwmod; + static struct omap_hwmod omap3xxx_dma_system_hwmod; @@ -117,6 +120,13 @@ static struct omap_hwmod_ocp_if omap3xxx .user = OCP_USER_MPU, }; +/* l3_core -> am35xx_usbhsotg interface */ +static struct omap_hwmod_ocp_if am35xx_usbhsotg__l3 = { + .master = &am35xx_usbhsotg_hwmod, + .slave = &omap3xxx_l3_main_hwmod, + .clk = "core_l3_ick", + .user = OCP_USER_MPU, +}; /* L4_CORE -> L4_WKUP interface */ static struct omap_hwmod_ocp_if omap3xxx_l4_core__l4_wkup = { .master = &omap3xxx_l4_core_hwmod, @@ -340,6 +350,31 @@ static struct omap_hwmod_ocp_if *omap3xx &omap3xxx_l4_core__usbhsotg, }; +static struct omap_hwmod_addr_space am35xx_usbhsotg_addrs[] = { + { + .pa_start = AM35XX_IPSS_USBOTGSS_BASE, + .pa_end = AM35XX_IPSS_USBOTGSS_BASE + SZ_4K - 1, + .flags = ADDR_TYPE_RT + }, +}; + +/* l4_core -> usbhsotg */ +static struct omap_hwmod_ocp_if am35xx_l4_core__usbhsotg = { + .master = &omap3xxx_l4_core_hwmod, + .slave = &am35xx_usbhsotg_hwmod, + .clk = "l4_ick", + .addr = am35xx_usbhsotg_addrs, + .addr_cnt = ARRAY_SIZE(am35xx_usbhsotg_addrs), + .user = OCP_USER_MPU, +}; + +static struct omap_hwmod_ocp_if *am35xx_usbhsotg_masters[] = { + &am35xx_usbhsotg__l3, +}; + +static struct omap_hwmod_ocp_if *am35xx_usbhsotg_slaves[] = { + &am35xx_l4_core__usbhsotg, +}; /* Slave interfaces on the L4_CORE interconnect */ static struct omap_hwmod_ocp_if *omap3xxx_l4_core_slaves[] = { &omap3xxx_l3_main__l4_core, @@ -1452,6 +1487,33 @@ static struct omap_hwmod omap3xxx_usbhso | HWMOD_SWSUP_MSTANDBY, .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430) }; +/* usb_otg_hs */ +static struct omap_hwmod_irq_info am35xx_usbhsotg_mpu_irqs[] = { + + { .name = "mc", .irq = 71 }, +}; + +static struct omap_hwmod_class am35xx_usbotg_class = { + .name = "am35xx_usbotg", + .sysc = NULL, +}; + +static struct omap_hwmod am35xx_usbhsotg_hwmod = { + .name = "am35x_otg_hs", + .mpu_irqs = am35xx_usbhsotg_mpu_irqs, + .mpu_irqs_cnt = ARRAY_SIZE(am35xx_usbhsotg_mpu_irqs), + .main_clk = NULL, + .prcm = { + .omap2 = { + }, + }, + .masters = am35xx_usbhsotg_masters, + .masters_cnt = ARRAY_SIZE(am35xx_usbhsotg_masters), + .slaves = am35xx_usbhsotg_slaves, + .slaves_cnt = ARRAY_SIZE(am35xx_usbhsotg_slaves), + .class = &am35xx_usbotg_class, + .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES3_1) +}; static __initdata struct omap_hwmod *omap3xxx_hwmods[] = { &omap3xxx_l3_main_hwmod, @@ -1488,6 +1550,9 @@ static __initdata struct omap_hwmod *oma /* usbotg class */ &omap3xxx_usbhsotg_hwmod, + /* usbotg for am35x */ + &am35xx_usbhsotg_hwmod, + NULL, };