X-Git-Url: https://git.librecmc.org/?p=oweals%2Fu-boot.git;a=blobdiff_plain;f=drivers%2Fusb%2Fhost%2Fehci-fsl.c;h=ac6c5b58452ee2fe82c23a0aed280d0afb8225cd;hp=23e7e7125fd2f2426fc4cc9a75be984f41f9f6d1;hb=c05ed00afb95fa5237f16962fccf5810437317bf;hpb=0a3d59e01038a3a50484b8bfcf834376a7215af0 diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c index 23e7e7125f..ac6c5b5845 100644 --- a/drivers/usb/host/ehci-fsl.c +++ b/drivers/usb/host/ehci-fsl.c @@ -8,9 +8,12 @@ */ #include +#include +#include #include #include #include +#include #include #include #include @@ -75,8 +78,12 @@ static int ehci_fsl_init_after_reset(struct ehci_ctrl *ctrl) struct usb_ehci *ehci = NULL; struct ehci_fsl_priv *priv = container_of(ctrl, struct ehci_fsl_priv, ehci); - +#ifdef CONFIG_PPC + ehci = (struct usb_ehci *)lower_32_bits(priv->hcd_base); +#else ehci = (struct usb_ehci *)priv->hcd_base; +#endif + if (ehci_fsl_init(priv, ehci, priv->ehci.hccr, priv->ehci.hcor) < 0) return -ENXIO; @@ -103,7 +110,11 @@ static int ehci_fsl_probe(struct udevice *dev) debug("Can't get the EHCI register base address\n"); return -ENXIO; } +#ifdef CONFIG_PPC + ehci = (struct usb_ehci *)lower_32_bits(priv->hcd_base); +#else ehci = (struct usb_ehci *)priv->hcd_base; +#endif hccr = (struct ehci_hccr *)(&ehci->caplength); hcor = (struct ehci_hcor *) ((void *)hccr + HC_LENGTH(ehci_readl(&hccr->cr_capbase)));