[U-Boot] [PATCH v2 2/6] board: ks2_evm: Enable the USB clocks if DM_USB is used

Jean-Jacques Hiblot jjhiblot at ti.com
Tue Dec 4 10:12:57 UTC 2018


Signed-off-by: Jean-Jacques Hiblot <jjhiblot at ti.com>
---

Changes in v2: None

 board/ti/ks2_evm/board.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/board/ti/ks2_evm/board.c b/board/ti/ks2_evm/board.c
index 72709c0..c888306 100644
--- a/board/ti/ks2_evm/board.c
+++ b/board/ti/ks2_evm/board.c
@@ -61,6 +61,18 @@ int dram_init(void)
 
 int board_init(void)
 {
+#if CONFIG_IS_ENABLED(DM_USB)
+	int rc = psc_enable_module(KS2_LPSC_USB);
+
+	if (rc)
+		puts("Cannot enable USB0 module");
+#ifdef KS2_LPSC_USB_1
+	rc = psc_enable_module(KS2_LPSC_USB_1);
+	if (rc)
+		puts("Cannot enable USB1 module");
+#endif
+#endif
+
 	gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
 
 	return 0;
-- 
2.7.4



More information about the U-Boot mailing list