Program the OTG_INTERFSEL register based on transcevier type passed from board file. Adapt signature of musb_platform_init() function for davinci, blackfin and tusb6010. Signed-off-by: Maulik Mankad <x0082077@xxxxxx> Cc: Felipe Balbi <felipe.balbi@xxxxxxxxx> Cc: David Brownell <david-b@xxxxxxxxxxx> Cc: Greg Kroah-Hartman <gregkh@xxxxxxx> --- drivers/usb/musb/blackfin.c | 2 +- drivers/usb/musb/davinci.c | 2 +- drivers/usb/musb/musb_core.c | 2 +- drivers/usb/musb/musb_core.h | 2 +- drivers/usb/musb/omap2430.c | 13 +++++++++++-- drivers/usb/musb/tusb6010.c | 2 +- 6 files changed, 16 insertions(+), 7 deletions(-) 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; -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html