diff options
author | Nico Huber <nico.huber@secunet.com> | 2014-07-10 12:56:34 +0200 |
---|---|---|
committer | Patrick Georgi <patrick@georgi-clan.de> | 2014-07-10 20:55:42 +0200 |
commit | 5b9e6f175f7778b16ac988e2de4e271751ecc019 (patch) | |
tree | ff288aab4247df7e9fd8cb0ef82cba2e699d7179 /payloads/libpayload/drivers/usb/xhci.c | |
parent | f4316f8c101b956af624b0c046c418b4489f6558 (diff) | |
download | coreboot-5b9e6f175f7778b16ac988e2de4e271751ecc019.tar.xz |
libpayload: Drop obsolete setting of reg_base in [oex]hci
Setting of `controller->reg_base` is of no use here, as it is never read
(in another function) later. Looks like this pattern originated from uhci.c
where it makes sense.
By removing the indirection through `reg_base` we also fix a possible
truncation to u32.
Change-Id: I5c99c5bf1f5b1d6c04bd84d87fd3e275fd7d0411
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: http://review.coreboot.org/6251
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Diffstat (limited to 'payloads/libpayload/drivers/usb/xhci.c')
-rw-r--r-- | payloads/libpayload/drivers/usb/xhci.c | 6 |
1 files changed, 2 insertions, 4 deletions
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); |