From: Ajay Kumar Gupta Date: Thu, 10 Jun 2010 05:50:50 +0000 (+0530) Subject: musb: Program extvbus for OMAP3EVM Rev >= E X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=944a4894c047f9fc17d21f1e4ca92d5909b8405b;p=u-boot.git musb: Program extvbus for OMAP3EVM Rev >= E OMAP3EVM Rev >=E uses external Vbus supply so setting 'extvbus' to '1' for OMAP3EVM Rev >=E runtime based on EVM revision. CC: Remy Bohmer Signed-off-by: Ajay Kumar Gupta --- diff --git a/board/ti/evm/evm.c b/board/ti/evm/evm.c index fcc1803bcd..9948b9cd30 100644 --- a/board/ti/evm/evm.c +++ b/board/ti/evm/evm.c @@ -64,6 +64,19 @@ static void omap3_evm_get_revision(void) } } +/* + * MUSB port on OMAP3EVM Rev >= E requires extvbus programming. + */ +u8 omap3_evm_need_extvbus(void) +{ + u8 retval = 0; + + if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2) + retval = 1; + + return retval; +} + /* * Routine: board_init * Description: Early hardware init. diff --git a/drivers/usb/musb/omap3.c b/drivers/usb/musb/omap3.c index 785629cb7b..a983552357 100644 --- a/drivers/usb/musb/omap3.c +++ b/drivers/usb/musb/omap3.c @@ -119,6 +119,9 @@ int musb_platform_init(void) stdby &= ~OMAP3_OTG_FORCESTDBY_STANDBY; writel(stdby, &otg->forcestdby); +#ifdef CONFIG_OMAP3_EVM + musb_cfg.extvbus = omap3_evm_need_extvbus(); +#endif platform_needs_initialization = 0; } diff --git a/drivers/usb/musb/omap3.h b/drivers/usb/musb/omap3.h index b591862b2d..c934e0cadd 100644 --- a/drivers/usb/musb/omap3.h +++ b/drivers/usb/musb/omap3.h @@ -44,4 +44,8 @@ int musb_platform_init(void); +#ifdef CONFIG_OMAP3_EVM +extern u8 omap3_evm_use_extvbus(void); +#endif + #endif /* _MUSB_OMAP3_H */