diff options
author | Vladimir Serbinenko <phcoder@gmail.com> | 2014-10-28 23:43:20 +0100 |
---|---|---|
committer | Vladimir Serbinenko <phcoder@gmail.com> | 2014-11-19 21:09:51 +0100 |
commit | 36fa5b80843d836518eb89f46747e80ed6b5d96f (patch) | |
tree | a36f498a48aaa8764df768ff3616ff476f62a07b /src/southbridge/intel/bd82x6x/pcie.c | |
parent | 10dd0e3171bc631fd5d83d4f42aa376edd3c6d55 (diff) | |
download | coreboot-36fa5b80843d836518eb89f46747e80ed6b5d96f.tar.xz |
i82801ix,bd82x6x,ibexpeak: rewrite expresscard hotplug
This implementation is more compact, unified and works with windows as well.
Tested under windows and under Debian GNU/Linux.
Change-Id: I585dec12e17e22d829baa3f2dc7aecc174f9d3b5
Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Reviewed-on: http://review.coreboot.org/7296
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-by: Nicolas Reinecke <nr@das-labor.org>
Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/southbridge/intel/bd82x6x/pcie.c')
-rw-r--r-- | src/southbridge/intel/bd82x6x/pcie.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/southbridge/intel/bd82x6x/pcie.c b/src/southbridge/intel/bd82x6x/pcie.c index fadb43ff2b..4769dd53d0 100644 --- a/src/southbridge/intel/bd82x6x/pcie.c +++ b/src/southbridge/intel/bd82x6x/pcie.c @@ -23,6 +23,7 @@ #include <device/pci.h> #include <device/pciexp.h> #include <device/pci_ids.h> +#include <southbridge/intel/common/pciehp.h> #include "pch.h" static void pch_pcie_pm_early(struct device *dev) @@ -218,6 +219,7 @@ static void pci_init(struct device *dev) { u16 reg16; u32 reg32; + struct southbridge_intel_bd82x6x_config *config = dev->chip_info; printk(BIOS_DEBUG, "Initializing PCH PCIe bridge.\n"); @@ -255,6 +257,14 @@ static void pci_init(struct device *dev) reg16 = pci_read_config16(dev, 0x1e); //reg16 |= 0xf900; pci_write_config16(dev, 0x1e, reg16); + + /* Enable expresscard hotplug events. */ + if (config->pcie_hotplug_map[PCI_FUNC(dev->path.pci.devfn)]) { + pci_write_config32(dev, 0xd8, + pci_read_config32(dev, 0xd8) + | (1 << 30)); + pci_write_config16(dev, 0x42, 0x142); + } } static void pch_pcie_enable(device_t dev) @@ -266,10 +276,15 @@ static void pch_pcie_enable(device_t dev) static unsigned int pch_pciexp_scan_bridge(device_t dev, unsigned int max) { unsigned int ret; + struct southbridge_intel_bd82x6x_config *config = dev->chip_info; /* Normal PCIe Scan */ ret = pciexp_scan_bridge(dev, max); + if (config->pcie_hotplug_map[PCI_FUNC(dev->path.pci.devfn)]) { + intel_acpi_pcie_hotplug_scan_slot(dev->link_list); + } + /* Late Power Management init after bridge device enumeration */ pch_pcie_pm_late(dev); |