mirror of
https://github.com/fail0verflow/switch-coreboot.git
synced 2025-05-04 01:39:18 -04:00
UPSTREAM: sb/intel/bd82x6x: Disable unused bridges
Disable unused bridges that are not marked as hot-plugable.
Reduces idle power consumtion by ~200mWatt for each port.
Tested on Lenovo T430.
BUG=none
BRANCH=none
TEST=none
Change-Id: Icb6e892125df29c05269814784fc1f1af96cefa6
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: f4835a85c0
Original-Change-Id: I6ee5e5f33824acdbca0f6ed28e90beab7fe10002
Original-Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Original-Reviewed-on: https://review.coreboot.org/19818
Original-Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Philippe Mathieu-Daud <philippe.mathieu.daude@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/523973
This commit is contained in:
parent
b4f329c78d
commit
abfc59ae4a
1 changed files with 14 additions and 0 deletions
|
@ -269,6 +269,14 @@ static void pch_pcie_enable(device_t dev)
|
|||
pch_pcie_pm_early(dev);
|
||||
}
|
||||
|
||||
static void pch_pcie_disable(device_t dev)
|
||||
{
|
||||
dev->enabled = 0;
|
||||
|
||||
/* Let PCH hide the device */
|
||||
pch_enable(dev);
|
||||
}
|
||||
|
||||
static void pch_pciexp_scan_bridge(device_t dev)
|
||||
{
|
||||
struct southbridge_intel_bd82x6x_config *config = dev->chip_info;
|
||||
|
@ -278,6 +286,11 @@ static void pch_pciexp_scan_bridge(device_t dev)
|
|||
|
||||
if (config->pcie_hotplug_map[PCI_FUNC(dev->path.pci.devfn)]) {
|
||||
intel_acpi_pcie_hotplug_scan_slot(dev->link_list);
|
||||
} else {
|
||||
if (!dev_is_active_bridge(dev)) {
|
||||
dev->ops->disable(dev);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/* Late Power Management init after bridge device enumeration */
|
||||
|
@ -305,6 +318,7 @@ static struct device_operations device_ops = {
|
|||
.set_resources = pci_dev_set_resources,
|
||||
.enable_resources = pci_bus_enable_resources,
|
||||
.init = pci_init,
|
||||
.disable = pch_pcie_disable,
|
||||
.enable = pch_pcie_enable,
|
||||
.scan_bus = pch_pciexp_scan_bridge,
|
||||
.ops_pci = &pci_ops,
|
||||
|
|
Loading…
Add table
Reference in a new issue