[coreboot-gerrit] New patch to review for coreboot: 1ebe659 libpayload: Remove redundant phys_to_virt() from xHCI driver

Nico Huber (nico.h@gmx.de) gerrit at coreboot.org
Thu Jul 10 10:21:57 CEST 2014


Nico Huber (nico.h at gmx.de) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/6243

-gerrit

commit 1ebe659f4d2b8159ceee3ef737a88a629eb3ed17
Author: Nico Huber <nico.huber at secunet.com>
Date:   Fri Jul 4 18:17:39 2014 +0200

    libpayload: Remove redundant phys_to_virt() from xHCI driver
    
    Remove a redundant phys_to_virt() that sneaked in the initialization of
    PCI xHCI controllers. The use of casts from void* to u32 (and vice versa)
    prompts for things going wrong here. That will be addressed in a later
    commit.
    
    Change-Id: Ibc71ed6ee7016529c0e3a51559aaec07aaaba315
    Signed-off-by: Nico Huber <nico.huber at secunet.com>
---
 payloads/libpayload/drivers/usb/xhci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/payloads/libpayload/drivers/usb/xhci.c b/payloads/libpayload/drivers/usb/xhci.c
index 6106342..d9ac0a4 100644
--- a/payloads/libpayload/drivers/usb/xhci.c
+++ b/payloads/libpayload/drivers/usb/xhci.c
@@ -305,7 +305,7 @@ xhci_pci_init (pcidev_t addr)
 	u32 reg_addr;
 	hci_t *controller;
 
-	reg_addr = (u32)phys_to_virt(pci_read_config32 (addr, 0x10) & ~0xf);
+	reg_addr = pci_read_config32 (addr, 0x10) & ~0xf;
 	if (pci_read_config32 (addr, 0x14) > 0) {
 		fatal("We don't do 64bit addressing.\n");
 	}



More information about the coreboot-gerrit mailing list