[U-Boot] [RFC/RESEND 14/22] xhci: add support for cavium thunderx XHCI
Tim Harvey
tharvey at gateworks.com
Mon Mar 4 17:34:29 UTC 2019
Signed-off-by: Tim Harvey <tharvey at gateworks.com>
---
drivers/usb/host/xhci-pci.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
index d42f06bc32..3605357d33 100644
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -18,9 +18,16 @@ static void xhci_pci_init(struct udevice *dev, struct xhci_hccr **ret_hccr,
struct xhci_hcor *hcor;
size_t size;
u32 cmd;
+ u16 vendor, device;
+ int bar = PCI_BASE_ADDRESS_0;
+ dm_pci_read_config16(dev, PCI_VENDOR_ID, &vendor);
+ dm_pci_read_config16(dev, PCI_DEVICE_ID, &device);
+ if ((vendor == PCI_VENDOR_ID_CAVIUM) &&
+ (device == PCI_DEVICE_ID_THUNDERX_XHCI))
+ bar = 0;
hccr = (struct xhci_hccr *)dm_pci_map_bar(dev,
- PCI_BASE_ADDRESS_0, &size, PCI_REGION_MEM);
+ bar, &size, PCI_REGION_MEM);
hcor = (struct xhci_hcor *)((uintptr_t) hccr +
HC_LENGTH(xhci_readl(&hccr->cr_capbase)));
--
2.17.1
More information about the U-Boot
mailing list