]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
usb: xhci: xhci-dwc3.c: Use dev_remap_addr() instead of dev_get_addr()
authorStefan Roese <sr@denx.de>
Mon, 24 Aug 2020 11:04:36 +0000 (13:04 +0200)
committerDaniel Schwierzeck <daniel.schwierzeck@gmail.com>
Wed, 7 Oct 2020 18:25:57 +0000 (20:25 +0200)
On MIPS platforms, mapping of the base address is needed. This patch
switches from dev_get_addr() to dev_remap_addr() to get the mapped base
address of the xHCI controller.

Signed-off-by: Stefan Roese <sr@denx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Marek Vasut <marex@denx.de>
drivers/usb/host/xhci-dwc3.c

index 27f84102db380c3f02d2c6ecab44a56c6564e2ee..045de2ffdec0198d1c8cb2703e64d8162997a187 100644 (file)
@@ -122,7 +122,7 @@ static int xhci_dwc3_probe(struct udevice *dev)
        u32 reg;
        int ret;
 
-       hccr = (struct xhci_hccr *)((uintptr_t)dev_read_addr(dev));
+       hccr = (struct xhci_hccr *)((uintptr_t)dev_remap_addr(dev));
        hcor = (struct xhci_hcor *)((uintptr_t)hccr +
                        HC_LENGTH(xhci_readl(&(hccr)->cr_capbase)));