diff options
author | Angel Pons <th3fanbus@gmail.com> | 2020-10-28 14:16:06 +0100 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2021-02-10 07:33:35 +0000 |
commit | 6b486e15880aa3717280f23651e18b8e1fd4eb8f (patch) | |
tree | 1e62c653d1f547ea406b0850ea7349864a9bbf4a /src/soc/intel/broadwell/pch/pch.c | |
parent | 4299cb48294af6940a6823696d346fd5ee1bac4e (diff) |
soc/intel/broadwell/pch: Simplify PCI RMW operations
This reduces the differences between Lynx Point and Broadwell.
Change-Id: Ib53d73e3f89c538ba0f052a98c7aabe815a59472
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/46891
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/intel/broadwell/pch/pch.c')
-rw-r--r-- | src/soc/intel/broadwell/pch/pch.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/soc/intel/broadwell/pch/pch.c b/src/soc/intel/broadwell/pch/pch.c index e0c5bb0c4d..d4b88f1a0b 100644 --- a/src/soc/intel/broadwell/pch/pch.c +++ b/src/soc/intel/broadwell/pch/pch.c @@ -168,8 +168,6 @@ void pch_disable_devfn(struct device *dev) static void broadwell_pch_enable_dev(struct device *dev) { - u16 reg16; - if (dev->path.type != DEVICE_PATH_PCI) return; @@ -188,10 +186,8 @@ static void broadwell_pch_enable_dev(struct device *dev) printk(BIOS_DEBUG, "%s: Disabling device\n", dev_path(dev)); /* Ensure memory, io, and bus master are all disabled */ - reg16 = pci_read_config16(dev, PCI_COMMAND); - reg16 &= ~(PCI_COMMAND_MASTER | - PCI_COMMAND_MEMORY | PCI_COMMAND_IO); - pci_write_config16(dev, PCI_COMMAND, reg16); + pci_and_config16(dev, PCI_COMMAND, + ~(PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY | PCI_COMMAND_IO)); /* Disable this device if possible */ pch_disable_devfn(dev); |