nb/intel/i945: Use PCI bitwise ops

Tested with BUILD_TIMELESS=1, Getac P470 does not change.

Change-Id: I181f69372829cf712fd72887b5f2c7134bfcf15a
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/42190
Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Angel Pons
2020-06-08 12:09:03 +02:00
committed by Patrick Georgi
parent c803f65206
commit e3c68d2e1b
3 changed files with 39 additions and 119 deletions

View File

@@ -701,9 +701,7 @@ static void gma_func0_disable(struct device *dev)
pci_write_config16(dev, GCFC, 0xa00);
pci_write_config16(dev_host, GGC, (1 << 1));
unsigned int reg32 = pci_read_config32(dev_host, DEVEN);
reg32 &= ~(DEVEN_D2F0 | DEVEN_D2F1);
pci_write_config32(dev_host, DEVEN, reg32);
pci_and_config32(dev_host, DEVEN, ~(DEVEN_D2F0 | DEVEN_D2F1));
dev->enabled = 0;
}
@@ -730,13 +728,8 @@ static void gma_generate_ssdt(const struct device *device)
static void gma_func0_read_resources(struct device *dev)
{
u8 reg8;
/* Set Untrusted Aperture Size to 256mb */
reg8 = pci_read_config8(dev, MSAC);
reg8 &= ~0x3;
reg8 |= 0x2;
pci_write_config8(dev, MSAC, reg8);
/* Set Untrusted Aperture Size to 256MB */
pci_update_config8(dev, MSAC, ~0x3, 0x2);
pci_dev_read_resources(dev);
}