[U-Boot] [PATCH v3 1/8] usb: dwc2: Call board_usb_init() from usb_lowlevel_init()

Peter Griffin peter.griffin at linaro.org
Wed Jul 29 23:39:29 CEST 2015


This patch makes the dwc2 controller like ehci / ohci / xhci controllers
by calling the board_usb_init() function from usb_lowlevel_init.

This can then be implemented by specific platforms to initialise
their USB hardware (phys / clocks etc).

Signed-off-by: Peter Griffin <peter.griffin at linaro.org>
---
 drivers/usb/host/dwc2.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/usb/host/dwc2.c b/drivers/usb/host/dwc2.c
index eee60a2..ad35841 100644
--- a/drivers/usb/host/dwc2.c
+++ b/drivers/usb/host/dwc2.c
@@ -929,6 +929,10 @@ int usb_lowlevel_init(int index, enum usb_init_type init, void **controller)
 
 	root_hub_devnum = 0;
 
+	/*  board dependant init */
+	if (board_usb_init(index, USB_INIT_HOST))
+		return -1;
+
 	snpsid = readl(&regs->gsnpsid);
 	printf("Core Release: %x.%03x\n", snpsid >> 12 & 0xf, snpsid & 0xfff);
 
-- 
1.9.1



More information about the U-Boot mailing list