From patchwork Thu Feb 25 06:35:03 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maulik Mankad X-Patchwork-Id: 81906 X-Patchwork-Delegate: me@felipebalbi.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o1P6ZKRf009285 for ; Thu, 25 Feb 2010 06:35:21 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754823Ab0BYGfR (ORCPT ); Thu, 25 Feb 2010 01:35:17 -0500 Received: from devils.ext.ti.com ([198.47.26.153]:44166 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753712Ab0BYGfQ (ORCPT ); Thu, 25 Feb 2010 01:35:16 -0500 Received: from dbdp31.itg.ti.com ([172.24.170.98]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id o1P6Z7fo018918 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 25 Feb 2010 00:35:09 -0600 Received: from linfarm476.india.ti.com (localhost [127.0.0.1]) by dbdp31.itg.ti.com (8.13.8/8.13.8) with ESMTP id o1P6Z4aX013124; Thu, 25 Feb 2010 12:05:04 +0530 (IST) Received: from linfarm476.india.ti.com (localhost [127.0.0.1]) by linfarm476.india.ti.com (8.12.11/8.12.11) with ESMTP id o1P6Z3fQ014366; Thu, 25 Feb 2010 12:05:03 +0530 Received: (from x0082077@localhost) by linfarm476.india.ti.com (8.12.11/8.12.11/Submit) id o1P6Z3QQ014364; Thu, 25 Feb 2010 12:05:03 +0530 From: Maulik Mankad To: linux-usb@vger.kernel.org Cc: linux-omap@vger.kernel.org, Maulik Mankad , Felipe Balbi , David Brownell , Greg Kroah-Hartman Subject: [PATCH 1/4] USB: MUSB: Set transceiver interface type Date: Thu, 25 Feb 2010 12:05:03 +0530 Message-Id: <1267079703-14316-1-git-send-email-x0082077@ti.com> X-Mailer: git-send-email 1.5.5 USB: MUSB: Set transceiver interface type 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.3 (demeter.kernel.org [140.211.167.41]); Thu, 25 Feb 2010 06:35:21 +0000 (UTC) Index: mainline/drivers/usb/musb/musb_core.c =================================================================== --- mainline.orig/drivers/usb/musb/musb_core.c +++ mainline/drivers/usb/musb/musb_core.c @@ -1959,7 +1959,7 @@ bad_config: * isp1504, non-OTG, etc) mostly hooking up through ULPI. */ musb->isr = generic_interrupt; - status = musb_platform_init(musb); + status = musb_platform_init(musb, plat->board_data); if (status < 0) goto fail; Index: mainline/drivers/usb/musb/musb_core.h =================================================================== --- mainline.orig/drivers/usb/musb/musb_core.h +++ mainline/drivers/usb/musb/musb_core.h @@ -567,7 +567,7 @@ extern int musb_platform_get_vbus_status #define musb_platform_get_vbus_status(x) 0 #endif -extern int __init musb_platform_init(struct musb *musb); +extern int __init musb_platform_init(struct musb *musb, void *board_data); extern int musb_platform_exit(struct musb *musb); #endif /* __MUSB_CORE_H__ */ Index: mainline/drivers/usb/musb/omap2430.c =================================================================== --- mainline.orig/drivers/usb/musb/omap2430.c +++ mainline/drivers/usb/musb/omap2430.c @@ -200,9 +200,10 @@ int musb_platform_set_mode(struct musb * return 0; } -int __init musb_platform_init(struct musb *musb) +int __init musb_platform_init(struct musb *musb, void *board_data) { u32 l; + struct omap_musb_board_data *data = board_data; #if defined(CONFIG_ARCH_OMAP2430) omap_cfg_reg(AE5_2430_USB0HS_STP); @@ -236,7 +237,15 @@ int __init musb_platform_init(struct mus omap_writel(l, OTG_SYSCONFIG); l = omap_readl(OTG_INTERFSEL); - l |= ULPI_12PIN; + + if (data->interface_type == MUSB_INTERFACE_UTMI) { + /* OMAP4 uses Internal PHY GS70 which uses UTMI interface */ + l &= ~ULPI_12PIN; /* Disable ULPI */ + l |= UTMI_8BIT; /* Enable UTMI */ + } else { + l |= ULPI_12PIN; + } + omap_writel(l, OTG_INTERFSEL); pr_debug("HS USB OTG: revision 0x%x, sysconfig 0x%02x, " Index: mainline/drivers/usb/musb/blackfin.c =================================================================== --- mainline.orig/drivers/usb/musb/blackfin.c +++ mainline/drivers/usb/musb/blackfin.c @@ -277,7 +277,7 @@ int musb_platform_set_mode(struct musb * return -EIO; } -int __init musb_platform_init(struct musb *musb) +int __init musb_platform_init(struct musb *musb, void *board_data) { /* Index: mainline/drivers/usb/musb/davinci.c =================================================================== --- mainline.orig/drivers/usb/musb/davinci.c +++ mainline/drivers/usb/musb/davinci.c @@ -377,7 +377,7 @@ int musb_platform_set_mode(struct musb * return -EIO; } -int __init musb_platform_init(struct musb *musb) +int __init musb_platform_init(struct musb *musb, void *board_data) { void __iomem *tibase = musb->ctrl_base; u32 revision; Index: mainline/drivers/usb/musb/tusb6010.c =================================================================== --- mainline.orig/drivers/usb/musb/tusb6010.c +++ mainline/drivers/usb/musb/tusb6010.c @@ -1091,7 +1091,7 @@ err: return -ENODEV; } -int __init musb_platform_init(struct musb *musb) +int __init musb_platform_init(struct musb *musb, void *board_data) { struct platform_device *pdev; struct resource *mem;