summaryrefslogtreecommitdiff
path: root/src/drivers/usb/pci_ehci.c
diff options
context:
space:
mode:
authorPatrick Rudolph <patrick.rudolph@9elements.com>2019-11-30 09:42:20 +0100
committerPatrick Rudolph <siro@das-labor.org>2019-12-02 07:45:38 +0000
commitae64f22e8d5707ef715ad4bd01b6181653a3f9ca (patch)
tree532862f66e103515ffb5ea589bfb6250bfc3c8df /src/drivers/usb/pci_ehci.c
parenta8582c4c0266bc54db7957173b496dcf1cb4a9e7 (diff)
drivers/usb/ehci_debug: Add x86_64 support
Use proper int to pointer conversions. Tested on Lenovo T410 with x86_64 enabled. Still works. Change-Id: I4ed62297fb47d7d83d4b28e80f3770de99ce70f7 Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/37393 Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/drivers/usb/pci_ehci.c')
-rw-r--r--src/drivers/usb/pci_ehci.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/drivers/usb/pci_ehci.c b/src/drivers/usb/pci_ehci.c
index a740d50dbf..dfc78cc666 100644
--- a/src/drivers/usb/pci_ehci.c
+++ b/src/drivers/usb/pci_ehci.c
@@ -116,6 +116,7 @@ void pci_ehci_read_resources(struct device *dev)
u8 *pci_ehci_base_regs(pci_devfn_t sdev)
{
- u8 *base = (u8 *)(pci_s_read_config32(sdev, EHCI_BAR_INDEX) & ~0x0f);
+ u32 bar = pci_s_read_config32(sdev, EHCI_BAR_INDEX) & ~0x0f;
+ u8 *base = (u8 *)(uintptr_t)bar;
return base + HC_LENGTH(read32(base));
}