Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/55606 )
Change subject: mb/lenovo: Use pci_and_config32 ......................................................................
mb/lenovo: Use pci_and_config32
Change-Id: I082d31d59660c48065f9390975817d3ed553da2d Signed-off-by: Peter Lemenkov lemenkov@gmail.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/55606 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Angel Pons th3fanbus@gmail.com --- M src/mainboard/lenovo/t430s/variants/t430s/romstage.c M src/mainboard/lenovo/t440p/romstage.c 2 files changed, 2 insertions(+), 8 deletions(-)
Approvals: build bot (Jenkins): Verified Angel Pons: Looks good to me, approved
diff --git a/src/mainboard/lenovo/t430s/variants/t430s/romstage.c b/src/mainboard/lenovo/t430s/variants/t430s/romstage.c index efcd315..c641486 100644 --- a/src/mainboard/lenovo/t430s/variants/t430s/romstage.c +++ b/src/mainboard/lenovo/t430s/variants/t430s/romstage.c @@ -42,9 +42,6 @@
if (!enable_peg) { // Hide disabled dGPU device - u32 reg32 = pci_read_config32(PCI_DEV(0, 0, 0), DEVEN); - reg32 &= ~DEVEN_PEG10; - - pci_write_config32(PCI_DEV(0, 0, 0), DEVEN, reg32); + pci_and_config32(HOST_BRIDGE, DEVEN, ~DEVEN_PEG10); } } diff --git a/src/mainboard/lenovo/t440p/romstage.c b/src/mainboard/lenovo/t440p/romstage.c index e605453..8a7da15 100644 --- a/src/mainboard/lenovo/t440p/romstage.c +++ b/src/mainboard/lenovo/t440p/romstage.c @@ -31,10 +31,7 @@
if (!enable_peg) { // Hide disabled dGPU device - u32 reg32 = pci_read_config32(PCI_DEV(0, 0, 0), DEVEN); - reg32 &= ~DEVEN_D1F0EN; - - pci_write_config32(PCI_DEV(0, 0, 0), DEVEN, reg32); + pci_and_config32(HOST_BRIDGE, DEVEN, ~DEVEN_D1F0EN); } }