aboutsummaryrefslogtreecommitdiff
path: root/src/northbridge/intel/x4x/gma.c
diff options
context:
space:
mode:
authorAngel Pons <th3fanbus@gmail.com>2020-06-08 01:39:25 +0200
committerFelix Held <felix-coreboot@felixheld.de>2020-06-09 17:52:29 +0000
commit4a9569a1230935e20adfca0762be50dcae97487e (patch)
tree746508e6db96b9021e80ebc538b924d4c9f72898 /src/northbridge/intel/x4x/gma.c
parent26886076f40ef92bf2785a9d8363fc4294793644 (diff)
nb/intel/x4x: Use PCI bitwise ops
Tested with BUILD_TIMELESS=1, Intel DG43GT does not change. Change-Id: I1bb7a7fd808cbbb45efbbfb9581c6a948323a48f Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/42155 Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/northbridge/intel/x4x/gma.c')
-rw-r--r--src/northbridge/intel/x4x/gma.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/northbridge/intel/x4x/gma.c b/src/northbridge/intel/x4x/gma.c
index d2d2bb067d..68d382ef20 100644
--- a/src/northbridge/intel/x4x/gma.c
+++ b/src/northbridge/intel/x4x/gma.c
@@ -48,11 +48,9 @@ static void gma_func0_init(struct device *dev)
static void gma_func0_disable(struct device *dev)
{
struct device *dev_host = pcidev_on_root(0, 0);
- u16 ggc;
- ggc = pci_read_config16(dev_host, D0F0_GGC);
- ggc |= (1 << 1); /* VGA cycles to discrete GPU */
- pci_write_config16(dev_host, D0F0_GGC, ggc);
+ /* VGA cycles to discrete GPU */
+ pci_or_config16(dev_host, D0F0_GGC, 1 << 1);
}
static void gma_generate_ssdt(const struct device *device)