aboutsummaryrefslogtreecommitdiff
path: root/src/northbridge/intel/sandybridge/gma.c
diff options
context:
space:
mode:
authorAngel Pons <th3fanbus@gmail.com>2020-06-07 19:23:03 +0200
committerFelix Held <felix-coreboot@felixheld.de>2020-06-09 00:32:28 +0000
commit9733f6a33687547a9a38589468a2b7b2b927461f (patch)
treec13a4ee4536f88ac3b21cdd6ef1cce3d36cdfb90 /src/northbridge/intel/sandybridge/gma.c
parent8ad0a4c0b88718a0b0ba4ba934ff526fe6875702 (diff)
nb/intel/sandybridge: Use PCI bitwise ops
Tested with BUILD_TIMELESS=1, Asus P8Z77-V LX2 does not change. Change-Id: If7f3f06cd3524790b0ec96121ed0353c89eac595 Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/42150 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Diffstat (limited to 'src/northbridge/intel/sandybridge/gma.c')
-rw-r--r--src/northbridge/intel/sandybridge/gma.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/northbridge/intel/sandybridge/gma.c b/src/northbridge/intel/sandybridge/gma.c
index aa66f4ae84..83a0279b09 100644
--- a/src/northbridge/intel/sandybridge/gma.c
+++ b/src/northbridge/intel/sandybridge/gma.c
@@ -636,12 +636,8 @@ static const char *gma_acpi_name(const struct device *dev)
/* Called by PCI set_vga_bridge function */
static void gma_func0_disable(struct device *dev)
{
- u16 reg16;
- struct device *dev_host = pcidev_on_root(0, 0);
-
- reg16 = pci_read_config16(dev_host, GGC);
- reg16 |= (1 << 1); /* Disable VGA decode */
- pci_write_config16(dev_host, GGC, reg16);
+ /* Disable VGA decode */
+ pci_or_config16(pcidev_on_root(0, 0), GGC, 1 << 1);
dev->enabled = 0;
}