diff options
author | Maulik Mankad <x0082077@ti.com> | 2010-03-12 03:29:07 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-05-20 16:21:32 -0400 |
commit | de2e1b0c988c901989713869a8bea3b3d02bb9ce (patch) | |
tree | 7e94a92044e19651bedbc9ffb2f23ff0b345b12d /drivers/usb/musb/omap2430.c | |
parent | e6c213b2968cbee4cfb8f89f2d685b9ad07eefbd (diff) |
usb: musb: Set transceiver interface type
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@ti.com>
Cc: David Brownell <david-b@pacbell.net>
Cc: Sergei Shtylyov <sshtylyov@mvista.com>
Cc: Olof Johansson <olof@lixom.net>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/musb/omap2430.c')
-rw-r--r-- | drivers/usb/musb/omap2430.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c index 82592633502f..0e5d0670506b 100644 --- a/drivers/usb/musb/omap2430.c +++ b/drivers/usb/musb/omap2430.c | |||
@@ -199,9 +199,10 @@ int musb_platform_set_mode(struct musb *musb, u8 musb_mode) | |||
199 | return 0; | 199 | return 0; |
200 | } | 200 | } |
201 | 201 | ||
202 | int __init musb_platform_init(struct musb *musb) | 202 | int __init musb_platform_init(struct musb *musb, void *board_data) |
203 | { | 203 | { |
204 | u32 l; | 204 | u32 l; |
205 | struct omap_musb_board_data *data = board_data; | ||
205 | 206 | ||
206 | #if defined(CONFIG_ARCH_OMAP2430) | 207 | #if defined(CONFIG_ARCH_OMAP2430) |
207 | omap_cfg_reg(AE5_2430_USB0HS_STP); | 208 | omap_cfg_reg(AE5_2430_USB0HS_STP); |
@@ -235,7 +236,15 @@ int __init musb_platform_init(struct musb *musb) | |||
235 | musb_writel(musb->mregs, OTG_SYSCONFIG, l); | 236 | musb_writel(musb->mregs, OTG_SYSCONFIG, l); |
236 | 237 | ||
237 | l = musb_readl(musb->mregs, OTG_INTERFSEL); | 238 | l = musb_readl(musb->mregs, OTG_INTERFSEL); |
238 | l |= ULPI_12PIN; | 239 | |
240 | if (data->interface_type == MUSB_INTERFACE_UTMI) { | ||
241 | /* OMAP4 uses Internal PHY GS70 which uses UTMI interface */ | ||
242 | l &= ~ULPI_12PIN; /* Disable ULPI */ | ||
243 | l |= UTMI_8BIT; /* Enable UTMI */ | ||
244 | } else { | ||
245 | l |= ULPI_12PIN; | ||
246 | } | ||
247 | |||
239 | musb_writel(musb->mregs, OTG_INTERFSEL, l); | 248 | musb_writel(musb->mregs, OTG_INTERFSEL, l); |
240 | 249 | ||
241 | pr_debug("HS USB OTG: revision 0x%x, sysconfig 0x%02x, " | 250 | pr_debug("HS USB OTG: revision 0x%x, sysconfig 0x%02x, " |