[U-Boot] [PATCH 3/3] M28: Disable USB power on boot
Marek Vasut
marex at denx.de
Wed May 23 01:32:54 CEST 2012
This is a precaution to prevent some USB flash drives
from misbehaving in early boot stage.
Signed-off-by: Marek Vasut <marex at denx.de>
Cc: Wolfgang Denk <wd at denx.de>
Cc: Stefano Babic <sbabic at denx.de>
Cc: Fabio Estevam <festevam at gmail.com>
CC: Albert Aribaud <albert.u.boot at aribaud.net>
---
board/denx/m28evk/m28evk.c | 3 ---
board/denx/m28evk/spl_boot.c | 11 +++++++++++
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/board/denx/m28evk/m28evk.c b/board/denx/m28evk/m28evk.c
index 3d28ea8..5068071 100644
--- a/board/denx/m28evk/m28evk.c
+++ b/board/denx/m28evk/m28evk.c
@@ -53,9 +53,6 @@ int board_early_init_f(void)
mx28_set_sspclk(MXC_SSPCLK2, 96000, 0);
#ifdef CONFIG_CMD_USB
- mxs_iomux_setup_pad(MX28_PAD_SSP2_SS1__USB1_OVERCURRENT);
- mxs_iomux_setup_pad(MX28_PAD_AUART3_TX__GPIO_3_13 |
- MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_PULLUP);
gpio_direction_output(MX28_PAD_AUART3_TX__GPIO_3_13, 0);
#endif
diff --git a/board/denx/m28evk/spl_boot.c b/board/denx/m28evk/spl_boot.c
index 7a12592..6b51332 100644
--- a/board/denx/m28evk/spl_boot.c
+++ b/board/denx/m28evk/spl_boot.c
@@ -214,9 +214,20 @@ const iomux_cfg_t iomux_setup[] = {
MX28_PAD_SSP2_MISO__SSP2_D0 | MUX_CONFIG_SSP2,
MX28_PAD_SSP2_SS0__SSP2_D3 |
(MXS_PAD_3V3 | MXS_PAD_8MA | MXS_PAD_PULLUP),
+
+ /* USB */
+ MX28_PAD_SSP2_SS1__USB1_OVERCURRENT,
+ MX28_PAD_AUART3_TX__GPIO_3_13 |
+ MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_PULLUP,
};
void board_init_ll(void)
{
+ /* Powerdown the USB */
+ mxs_iomux_setup_pad(MX28_PAD_SSP2_SS1__USB1_OVERCURRENT);
+ mxs_iomux_setup_pad(MX28_PAD_AUART3_TX__GPIO_3_13 |
+ MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_PULLUP);
+ gpio_direction_output(MX28_PAD_AUART3_TX__GPIO_3_13, 1);
+
mx28_common_spl_init(iomux_setup, ARRAY_SIZE(iomux_setup));
}
--
1.7.10
More information about the U-Boot
mailing list