diff options
author | Elyes HAOUAS <ehaouas@noos.fr> | 2020-04-27 05:34:05 +0200 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2020-05-01 06:26:38 +0000 |
commit | 52e56e84796d8b4def9341f2302b355f059added (patch) | |
tree | 63262786517f583ec4292753900b7551cd32b7e2 /payloads/libpayload/drivers/usb/usbinit.c | |
parent | 804a34022cbd020e1b1f461ee3a45a68f14684f0 (diff) | |
download | coreboot-52e56e84796d8b4def9341f2302b355f059added.tar.xz |
libpayload: Fix 16-bit read/write to PCI_COMMAND register
Change-Id: I34facbe0cbbdc91066799b586d96abca1599c509
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/40743
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'payloads/libpayload/drivers/usb/usbinit.c')
-rw-r--r-- | payloads/libpayload/drivers/usb/usbinit.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/payloads/libpayload/drivers/usb/usbinit.c b/payloads/libpayload/drivers/usb/usbinit.c index 0ac27e4456..49634c6c06 100644 --- a/payloads/libpayload/drivers/usb/usbinit.c +++ b/payloads/libpayload/drivers/usb/usbinit.c @@ -62,11 +62,11 @@ static int usb_controller_initialize(int bus, int dev, int func) /* enable busmaster */ if (devclass == 0xc03) { - u32 pci_command; + u16 pci_command; - pci_command = pci_read_config32(pci_device, PCI_COMMAND); + pci_command = pci_read_config16(pci_device, PCI_COMMAND); pci_command |= PCI_COMMAND_MASTER; - pci_write_config32(pci_device, PCI_COMMAND, pci_command); + pci_write_config16(pci_device, PCI_COMMAND, pci_command); usb_debug("%02x:%02x.%x %04x:%04x.%d ", bus, dev, func, pciid >> 16, pciid & 0xFFFF, func); |