From 6f66f414a0907f79abf492cd9eca839c0849c7f6 Mon Sep 17 00:00:00 2001 From: Kyösti Mälkki Date: Thu, 1 Dec 2016 22:08:18 +0200 Subject: PCI ops: MMCONF_SUPPORT_DEFAULT is required MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Doing PCI config operations via MMIO window by default is a requirement, if supported by the platform. This means chipset or CPU code must enable MMCONF operations early in bootblock already, or before platform-specific romstage entry. Platforms are allowed to have NO_MMCONF_SUPPORT only in the case it is actually not implemented in the silicon. Change-Id: Id4d9029dec2fe195f09373320de800fcdf88c15d Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/17693 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin --- src/device/Kconfig | 23 +++++++++++++++++------ src/device/pci_ops.c | 7 +++---- 2 files changed, 20 insertions(+), 10 deletions(-) (limited to 'src/device') diff --git a/src/device/Kconfig b/src/device/Kconfig index fb0aaba2ca..622f3d5837 100644 --- a/src/device/Kconfig +++ b/src/device/Kconfig @@ -217,31 +217,42 @@ config PCI bool default n +if PCI + +config NO_MMCONF_SUPPORT + bool + default !MMCONF_SUPPORT_DEFAULT + +config MMCONF_SUPPORT + bool + default MMCONF_SUPPORT_DEFAULT + +config MMCONF_SUPPORT_DEFAULT + bool + default n + config HYPERTRANSPORT_PLUGIN_SUPPORT bool - depends on PCI default n config PCIX_PLUGIN_SUPPORT bool - depends on PCI default y config CARDBUS_PLUGIN_SUPPORT bool - depends on PCI default y config AZALIA_PLUGIN_SUPPORT bool - depends on PCI default n config PCIEXP_PLUGIN_SUPPORT bool - depends on PCI default y +endif # PCI + if PCIEXP_PLUGIN_SUPPORT config PCIEXP_COMMON_CLOCK @@ -268,7 +279,7 @@ config PCIEXP_CLK_PM config PCIEXP_L1_SUB_STATE prompt "Enable PCIe ASPM L1 SubState" bool - depends on (MMCONF_SUPPORT_DEFAULT || PCI_IO_CFG_EXT) + depends on (MMCONF_SUPPORT || PCI_IO_CFG_EXT) default n help Detect and enable ASPM on PCIe links. diff --git a/src/device/pci_ops.c b/src/device/pci_ops.c index 2f896d2bcc..b6fc32d6cf 100644 --- a/src/device/pci_ops.c +++ b/src/device/pci_ops.c @@ -22,11 +22,10 @@ const struct pci_bus_operations *pci_bus_default_ops(device_t dev) { -#if CONFIG_MMCONF_SUPPORT_DEFAULT + if (IS_ENABLED(CONFIG_NO_MMCONF_SUPPORT)) + return &pci_cf8_conf1; + return &pci_ops_mmconf; -#else - return &pci_cf8_conf1; -#endif } static const struct pci_bus_operations *pci_bus_ops(struct bus *bus, struct device *dev) -- cgit v1.2.3