mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2026-02-17 17:51:27 +01:00
arm: mxs: olinuxino: Enable USB only when needed
Enable the power to the USB port only when the USB port is really needed. Do not enable the power unconditionally. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Stefano Babic <sbabic@denx.de>
This commit is contained in:
parent
7c604e98c2
commit
ca11db2603
1 changed files with 17 additions and 5 deletions
|
|
@ -30,14 +30,26 @@ int board_early_init_f(void)
|
|||
/* SSP0 clock at 96MHz */
|
||||
mxs_set_sspclk(MXC_SSPCLK0, 96000, 0);
|
||||
|
||||
#ifdef CONFIG_CMD_USB
|
||||
/* Enable LAN9512 */
|
||||
gpio_direction_output(MX23_PAD_GPMI_ALE__GPIO_0_17, 1);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CMD_USB
|
||||
int board_ehci_hcd_init(int port)
|
||||
{
|
||||
/* Enable LAN9512 (Maxi) or GL850G (Mini) USB HUB power. */
|
||||
gpio_direction_output(MX23_PAD_GPMI_ALE__GPIO_0_17, 1);
|
||||
udelay(100);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int board_ehci_hcd_exit(int port)
|
||||
{
|
||||
/* Enable LAN9512 (Maxi) or GL850G (Mini) USB HUB power. */
|
||||
gpio_direction_output(MX23_PAD_GPMI_ALE__GPIO_0_17, 0);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
int dram_init(void)
|
||||
{
|
||||
return mxs_dram_init();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue