From 8346a44dd10ae24f309324df621d6be0c2acd1df Mon Sep 17 00:00:00 2001 From: Raul E Rangel Date: Mon, 6 Aug 2018 16:12:37 -0600 Subject: [PATCH] libpayload/drivers/usb/xhci: Replace raw values with constants BUG=none TEST=compiled on grunt and made sure USB still works in depthcharge Change-Id: I972f4604bb5ff3838cb15f323c5a579ad890ecf5 Signed-off-by: Raul E Rangel Reviewed-on: https://review.coreboot.org/27883 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Reviewed-by: Martin Roth --- payloads/libpayload/drivers/usb/xhci.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/payloads/libpayload/drivers/usb/xhci.c b/payloads/libpayload/drivers/usb/xhci.c index 8972ffaf1d..3f1064a405 100644 --- a/payloads/libpayload/drivers/usb/xhci.c +++ b/payloads/libpayload/drivers/usb/xhci.c @@ -304,10 +304,10 @@ xhci_pci_init (pcidev_t addr) u32 reg_addr; hci_t *controller; - reg_addr = pci_read_config32 (addr, 0x10) & ~0xf; - if (pci_read_config32 (addr, 0x14) > 0) { + reg_addr = pci_read_config32(addr, PCI_BASE_ADDRESS_0) & + PCI_BASE_ADDRESS_MEM_MASK; + if (pci_read_config32(addr, PCI_BASE_ADDRESS_1) > 0) fatal("We don't do 64bit addressing.\n"); - } controller = xhci_init((unsigned long)reg_addr); if (controller) {