libpayload: xhci: Fix CAPREG address calculation
I rushed CB:40895 in to fix a bug only to introduce another. xhci_init() no longer crashes, but it doesn't correctly initialize the XHCI controller either, and unfortunately the error messages are all hidden behind USB_DEBUG. This patch fixes the incorrect address calculation to what it was before CB:39838. Signed-off-by: Julius Werner <jwerner@chromium.org> Change-Id: I14293e2135108db30ba6fd2efea0573fe266fa37 Reviewed-on: https://review.coreboot.org/c/coreboot/+/40956 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
This commit is contained in:
parent
806ea463db
commit
50c1f27069
|
@ -185,7 +185,7 @@ xhci_init (unsigned long physical_bar)
|
||||||
goto _free_xhci;
|
goto _free_xhci;
|
||||||
}
|
}
|
||||||
|
|
||||||
xhci->capreg = phys_to_virt(physical_bar) + sizeof(xhci->capreg);
|
xhci->capreg = phys_to_virt(physical_bar);
|
||||||
xhci->opreg = phys_to_virt(physical_bar) + CAP_GET(CAPLEN, xhci->capreg);
|
xhci->opreg = phys_to_virt(physical_bar) + CAP_GET(CAPLEN, xhci->capreg);
|
||||||
xhci->hcrreg = phys_to_virt(physical_bar) + xhci->capreg->rtsoff;
|
xhci->hcrreg = phys_to_virt(physical_bar) + xhci->capreg->rtsoff;
|
||||||
xhci->dbreg = phys_to_virt(physical_bar) + xhci->capreg->dboff;
|
xhci->dbreg = phys_to_virt(physical_bar) + xhci->capreg->dboff;
|
||||||
|
|
Loading…
Reference in New Issue