Message ID | 20210802005446.2267075-14-sjg@chromium.org |
---|---|
State | Accepted |
Delegated to: | Tom Rini |
Headers | show |
Series | pci: Drop all pre-driver model code | expand |
On Sun, Aug 01, 2021 at 06:54:26PM -0600, Simon Glass wrote: > Now that DM_PCI is always enabled we don't need to check it. Drop this > old condition and update the comment. > > Signed-off-by: Simon Glass <sjg@chromium.org> > --- > > (no changes since v1) > > drivers/usb/host/ohci-hcd.c | 15 +++++---------- > 1 file changed, 5 insertions(+), 10 deletions(-) > > diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c > index c62d8feecce..7fa84f8bbe4 100644 > --- a/drivers/usb/host/ohci-hcd.c > +++ b/drivers/usb/host/ohci-hcd.c > @@ -52,13 +52,6 @@ > #include <asm/arch/hardware.h> /* needed for AT91_USB_HOST_BASE */ > #endif > > -#if defined(CONFIG_CPU_ARM920T) || \ > - defined(CONFIG_PCI_OHCI) || \ > - defined(CONFIG_DM_PCI) || \ > - defined(CONFIG_SYS_OHCI_USE_NPS) > -# define OHCI_USE_NPS /* force NoPowerSwitching mode */ > -#endif > - > #undef OHCI_VERBOSE_DEBUG /* not always helpful */ > #undef DEBUG > #undef SHOW_INFO > @@ -1885,12 +1878,14 @@ static int hc_start(ohci_t *ohci) > mask = OHCI_INTR_RHSC | OHCI_INTR_UE | OHCI_INTR_WDH | OHCI_INTR_SO; > ohci_writel(mask, &ohci->regs->intrenable); > > -#ifdef OHCI_USE_NPS > - /* required for AMD-756 and some Mac platforms */ > + /* > + * required for AMD-756 and some Mac platforms > + * Note: this is always enabled at present, since driver model is used > + * for PCI > + */ > ohci_writel((roothub_a(ohci) | RH_A_NPS) & ~RH_A_PSM, > &ohci->regs->roothub.a); > ohci_writel(RH_HS_LPSC, &ohci->regs->roothub.status); > -#endif /* OHCI_USE_NPS */ > > /* connect the virtual root hub */ > ohci->rh.devnum = 0; This is slightly wrong. We have non-PCI OHCI users, so the check needs to change from CONFIG_DM_PCI to CONFIG_PCI. I'll fix this up.
On Sun, Aug 01, 2021 at 06:54:26PM -0600, Simon Glass wrote: > Now that DM_PCI is always enabled we don't need to check it. Drop this > old condition and update the comment. > > Signed-off-by: Simon Glass <sjg@chromium.org> With the fix I noted, applied to u-boot/master, thanks!
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c index c62d8feecce..7fa84f8bbe4 100644 --- a/drivers/usb/host/ohci-hcd.c +++ b/drivers/usb/host/ohci-hcd.c @@ -52,13 +52,6 @@ #include <asm/arch/hardware.h> /* needed for AT91_USB_HOST_BASE */ #endif -#if defined(CONFIG_CPU_ARM920T) || \ - defined(CONFIG_PCI_OHCI) || \ - defined(CONFIG_DM_PCI) || \ - defined(CONFIG_SYS_OHCI_USE_NPS) -# define OHCI_USE_NPS /* force NoPowerSwitching mode */ -#endif - #undef OHCI_VERBOSE_DEBUG /* not always helpful */ #undef DEBUG #undef SHOW_INFO @@ -1885,12 +1878,14 @@ static int hc_start(ohci_t *ohci) mask = OHCI_INTR_RHSC | OHCI_INTR_UE | OHCI_INTR_WDH | OHCI_INTR_SO; ohci_writel(mask, &ohci->regs->intrenable); -#ifdef OHCI_USE_NPS - /* required for AMD-756 and some Mac platforms */ + /* + * required for AMD-756 and some Mac platforms + * Note: this is always enabled at present, since driver model is used + * for PCI + */ ohci_writel((roothub_a(ohci) | RH_A_NPS) & ~RH_A_PSM, &ohci->regs->roothub.a); ohci_writel(RH_HS_LPSC, &ohci->regs->roothub.status); -#endif /* OHCI_USE_NPS */ /* connect the virtual root hub */ ohci->rh.devnum = 0;
Now that DM_PCI is always enabled we don't need to check it. Drop this old condition and update the comment. Signed-off-by: Simon Glass <sjg@chromium.org> --- (no changes since v1) drivers/usb/host/ohci-hcd.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-)