On Monday, November 30, 2015 at 06:47:45 PM, Alexey Brodkin wrote: > From: Alexey Brodkin <alexey.brod...@synopsys.com> > > This driver is meant to be used with any EHCI-compatible host > controller in case if there's no need for platform-specific > glue such as setup of controller or PHY's power mode via > GPIOs etc. > > Signed-off-by: Alexey Brodkin <abrod...@synopsys.com> > Reviewed-by: Simon Glass <s...@chromium.org> > Reviewed-by: Marek Vasut <ma...@denx.de> > Cc: Stephen Warren <swar...@nvidia.com> > --- > > Changes compared to v2: > * Driver is disabled by default now > * Use uintptr_t instead of uint32_t for "struct ehci_hcor" > address calculation > > Changes compared to v1: > * Updated commit message with removal of Synopsys board mention > * Cleaned-up ehci_usb_remove() > > drivers/usb/host/Kconfig | 7 ++++++ > drivers/usb/host/Makefile | 1 + > drivers/usb/host/ehci-generic.c | 51 > +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 59 > insertions(+) > create mode 100644 drivers/usb/host/ehci-generic.c > > diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig > index 2a2bffe..6bb9caa 100644 > --- a/drivers/usb/host/Kconfig > +++ b/drivers/usb/host/Kconfig > @@ -73,4 +73,11 @@ config USB_EHCI_UNIPHIER > ---help--- > Enables support for the on-chip EHCI controller on UniPhier SoCs. > > +config USB_EHCI_GENERIC > + bool "Support for generic EHCI USB controller" > + depends on OF_CONTROL > + default n > + ---help--- > + Enables support for generic EHCI controller.
This should depend on EHCI_HCD somehow, no (since it's using ehci_deregister and friends) ? [...] > +static const struct udevice_id ehci_usb_ids[] = { > + { .compatible = "generic-ehci" }, > + { } > +}; > + > +U_BOOT_DRIVER(usb_ehci) = { The driver name should be ehci_generic, not usb_ehci, otherwise this will collide with other drivers who do the same mistake. > + .name = "ehci_generic", > + .id = UCLASS_USB, > + .of_match = ehci_usb_ids, > + .probe = ehci_usb_probe, > + .remove = ehci_usb_remove, > + .ops = &ehci_usb_ops, > + .priv_auto_alloc_size = sizeof(struct generic_ehci), > + .flags = DM_FLAG_ALLOC_PRIV_DMA, > +}; > + Best regards, Marek Vasut _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot