From: Tim Harvey Date: Mon, 4 Mar 2019 09:34:29 -0800 Subject: [U-Boot] [RFC/RESEND 14/22] xhci: add support for cavium thunderx XHCI In-Reply-To: <20190304173437.26989-1-tharvey@gateworks.com> References: <20190304173437.26989-1-tharvey@gateworks.com> Message-ID: <20190304173437.26989-15-tharvey@gateworks.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Signed-off-by: Tim Harvey --- 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