summaryrefslogtreecommitdiff
path: root/src/soc/intel/broadwell/smihandler.c
diff options
context:
space:
mode:
authorElyes HAOUAS <ehaouas@noos.fr>2020-04-29 10:42:34 +0200
committerPatrick Georgi <pgeorgi@google.com>2020-05-01 16:35:06 +0000
commitb887adf7a56f2877c41e808002f30841a6679eb6 (patch)
tree21610d86c82b79f9c72e89b4be09fac4035d2505 /src/soc/intel/broadwell/smihandler.c
parent3e42ee05d86c1de3ed23dddf08fd8e6451bdea92 (diff)
downloadcoreboot-b887adf7a56f2877c41e808002f30841a6679eb6.tar.xz
soc/intel/broadwell: Fix 16-bit read/write PCI_COMMAND register
Change-Id: I0fd1a758d8838b3eea5640b41eee6a6893360aa3 Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/40850 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src/soc/intel/broadwell/smihandler.c')
-rw-r--r--src/soc/intel/broadwell/smihandler.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/soc/intel/broadwell/smihandler.c b/src/soc/intel/broadwell/smihandler.c
index bce157d102..1d92c127cd 100644
--- a/src/soc/intel/broadwell/smihandler.c
+++ b/src/soc/intel/broadwell/smihandler.c
@@ -69,7 +69,7 @@ static void busmaster_disable_on_bus(int bus)
for (slot = 0; slot < 0x20; slot++) {
for (func = 0; func < 8; func++) {
- u32 reg32;
+ u16 reg16;
pci_devfn_t dev = PCI_DEV(bus, slot, func);
val = pci_read_config32(dev, PCI_VENDOR_ID);
@@ -79,9 +79,9 @@ static void busmaster_disable_on_bus(int bus)
continue;
/* Disable Bus Mastering for this one device */
- reg32 = pci_read_config32(dev, PCI_COMMAND);
- reg32 &= ~PCI_COMMAND_MASTER;
- pci_write_config32(dev, PCI_COMMAND, reg32);
+ reg16 = pci_read_config16(dev, PCI_COMMAND);
+ reg16 &= ~PCI_COMMAND_MASTER;
+ pci_write_config16(dev, PCI_COMMAND, reg16);
/* If this is a bridge, then follow it. */
hdr = pci_read_config8(dev, PCI_HEADER_TYPE);