diff mbox

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

Message ID 1438205976-11105-2-git-send-email-peter.griffin@linaro.org
State Superseded
Delegated to: Tom Rini
Headers show

Commit Message

Peter Griffin July 29, 2015, 9:39 p.m. UTC
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 | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Marek Vasut July 29, 2015, 11:36 p.m. UTC | #1
On Wednesday, July 29, 2015 at 11:39:29 PM, Peter Griffin wrote:
> 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>

Applied to u-boot-usb/master, thanks!

Best regards,
Marek Vasut
Tom Rini July 30, 2015, 12:42 a.m. UTC | #2
On Thu, Jul 30, 2015 at 01:36:07AM +0200, Marek Vasut wrote:
> On Wednesday, July 29, 2015 at 11:39:29 PM, Peter Griffin wrote:
> > 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>
> 
> Applied to u-boot-usb/master, thanks!

Bah, can you please send me a PR sooner rather than later then so I can
take the rest of the board in, assuming others ack the relevant parts :)
Thanks!
Marek Vasut July 30, 2015, 8:59 a.m. UTC | #3
On Thursday, July 30, 2015 at 02:42:26 AM, Tom Rini wrote:
> On Thu, Jul 30, 2015 at 01:36:07AM +0200, Marek Vasut wrote:
> > On Wednesday, July 29, 2015 at 11:39:29 PM, Peter Griffin wrote:
> > > 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>
> > 
> > Applied to u-boot-usb/master, thanks!
> 
> Bah, can you please send me a PR sooner rather than later then so I can
> take the rest of the board in, assuming others ack the relevant parts :)
> Thanks!

Feel free to take the whole series, I can drop that one single patch ...

Best regards,
Marek Vasut
diff mbox

Patch

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);