]> git.sur5r.net Git - u-boot/commitdiff
usb: dwc2: Call board_usb_init() from usb_lowlevel_init()
authorPeter Griffin <peter.griffin@linaro.org>
Wed, 29 Jul 2015 21:39:29 +0000 (22:39 +0100)
committerMarek Vasut <marex@denx.de>
Wed, 5 Aug 2015 15:20:34 +0000 (17:20 +0200)
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@linaro.org>
drivers/usb/host/dwc2.c

index eee60a2b039a247b8c1282d1c2e92294a2377ae8..ad35841769ee0fd09741b05868a850354cb9c8b6 100644 (file)
@@ -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);