mirror of
https://github.com/fail0verflow/switch-coreboot.git
synced 2025-05-04 01:39:18 -04:00
UPSTREAM: nb/intel/sandybridge: Hide additional nb devices
Hide device 4 and device 7 if disabled.
Allows devicetree settings to take effect.
Tested on Lenovo T430.
BUG=none
BRANCH=none
TEST=none
Change-Id: I4f94c1f37cc85c293e2e5d8f41545d67ae11a9de
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Commit-Id: ecd4be8114
Original-Change-Id: I64a19e2bbdb1640e1d732f6e4486f73cbb0bda81
Original-Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Original-Reviewed-on: https://review.coreboot.org/19689
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: https://chromium-review.googlesource.com/509514
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
This commit is contained in:
parent
c7de8a8526
commit
a22c8811ce
2 changed files with 12 additions and 0 deletions
|
@ -357,11 +357,21 @@ static void disable_peg(void)
|
|||
printk(BIOS_DEBUG, "Disabling IGD.\n");
|
||||
reg &= ~DEVEN_IGD;
|
||||
}
|
||||
dev = dev_find_slot(0, PCI_DEVFN(4, 0));
|
||||
if (!dev || !dev->enabled) {
|
||||
printk(BIOS_DEBUG, "Disabling Device 4.\n");
|
||||
reg &= ~DEVEN_D4EN;
|
||||
}
|
||||
dev = dev_find_slot(0, PCI_DEVFN(6, 0));
|
||||
if (!dev || !dev->enabled) {
|
||||
printk(BIOS_DEBUG, "Disabling PEG60.\n");
|
||||
reg &= ~DEVEN_PEG60;
|
||||
}
|
||||
dev = dev_find_slot(0, PCI_DEVFN(7, 0));
|
||||
if (!dev || !dev->enabled) {
|
||||
printk(BIOS_DEBUG, "Disabling Device 7.\n");
|
||||
reg &= ~DEVEN_D7EN;
|
||||
}
|
||||
|
||||
dev = dev_find_slot(0, PCI_DEVFN(0, 0));
|
||||
pci_write_config32(dev, DEVEN, reg);
|
||||
|
|
|
@ -75,7 +75,9 @@
|
|||
#define GGC 0x50 /* GMCH Graphics Control */
|
||||
|
||||
#define DEVEN 0x54 /* Device Enable */
|
||||
#define DEVEN_D7EN (1 << 14)
|
||||
#define DEVEN_PEG60 (1 << 13)
|
||||
#define DEVEN_D4EN (1 << 7)
|
||||
#define DEVEN_IGD (1 << 4)
|
||||
#define DEVEN_PEG10 (1 << 3)
|
||||
#define DEVEN_PEG11 (1 << 2)
|
||||
|
|
Loading…
Add table
Reference in a new issue