summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--payloads/libpayload/drivers/usb/ehci.c5
-rw-r--r--payloads/libpayload/drivers/usb/ohci.c3
-rw-r--r--payloads/libpayload/drivers/usb/xhci.c6
3 files changed, 5 insertions, 9 deletions
diff --git a/payloads/libpayload/drivers/usb/ehci.c b/payloads/libpayload/drivers/usb/ehci.c
index 03d0aef8d6..82802a7f0d 100644
--- a/payloads/libpayload/drivers/usb/ehci.c
+++ b/payloads/libpayload/drivers/usb/ehci.c
@@ -751,14 +751,13 @@ ehci_init (unsigned long physical_bar)
controller->create_intr_queue = ehci_create_intr_queue;
controller->destroy_intr_queue = ehci_destroy_intr_queue;
controller->poll_intr_queue = ehci_poll_intr_queue;
- controller->reg_base = (u32)physical_bar;
for (i = 0; i < 128; i++) {
controller->devices[i] = 0;
}
init_device_entry (controller, 0);
- EHCI_INST(controller)->capabilities = phys_to_virt(controller->reg_base);
- EHCI_INST(controller)->operation = (hc_op_t *)(phys_to_virt(controller->reg_base) + EHCI_INST(controller)->capabilities->caplength);
+ EHCI_INST(controller)->capabilities = phys_to_virt(physical_bar);
+ EHCI_INST(controller)->operation = (hc_op_t *)(phys_to_virt(physical_bar) + EHCI_INST(controller)->capabilities->caplength);
/* Set the high address word (aka segment) if controller is 64-bit */
if (EHCI_INST(controller)->capabilities->hccparams & 1)
diff --git a/payloads/libpayload/drivers/usb/ohci.c b/payloads/libpayload/drivers/usb/ohci.c
index 84547e6b85..9f15dd0930 100644
--- a/payloads/libpayload/drivers/usb/ohci.c
+++ b/payloads/libpayload/drivers/usb/ohci.c
@@ -201,8 +201,7 @@ ohci_init (unsigned long physical_bar)
init_device_entry (controller, 0);
OHCI_INST (controller)->roothub = controller->devices[0];
- controller->reg_base = (u32)physical_bar;
- OHCI_INST (controller)->opreg = (opreg_t*)phys_to_virt(controller->reg_base);
+ OHCI_INST (controller)->opreg = (opreg_t*)phys_to_virt(physical_bar);
usb_debug("OHCI Version %x.%x\n", (OHCI_INST (controller)->opreg->HcRevision >> 4) & 0xf, OHCI_INST (controller)->opreg->HcRevision & 0xf);
if ((OHCI_INST (controller)->opreg->HcControl & HostControllerFunctionalStateMask) == USBReset) {
diff --git a/payloads/libpayload/drivers/usb/xhci.c b/payloads/libpayload/drivers/usb/xhci.c
index 69ddab791a..0bd54c7d74 100644
--- a/payloads/libpayload/drivers/usb/xhci.c
+++ b/payloads/libpayload/drivers/usb/xhci.c
@@ -193,13 +193,11 @@ xhci_init (unsigned long physical_bar)
goto _free_xhci;
}
- controller->reg_base = (u32)physical_bar;
-
- xhci->capreg = phys_to_virt(controller->reg_base);
+ xhci->capreg = phys_to_virt(physical_bar);
xhci->opreg = ((void *)xhci->capreg) + xhci->capreg->caplength;
xhci->hcrreg = ((void *)xhci->capreg) + xhci->capreg->rtsoff;
xhci->dbreg = ((void *)xhci->capreg) + xhci->capreg->dboff;
- xhci_debug("regbase: 0x%"PRIx32"\n", controller->reg_base);
+ xhci_debug("regbase: 0x%"PRIx32"\n", physical_bar);
xhci_debug("caplen: 0x%"PRIx32"\n", xhci->capreg->caplength);
xhci_debug("rtsoff: 0x%"PRIx32"\n", xhci->capreg->rtsoff);
xhci_debug("dboff: 0x%"PRIx32"\n", xhci->capreg->dboff);