summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/device/pci_device.c15
-rw-r--r--src/device/pciexp_device.c3
-rw-r--r--src/include/device/pciexp.h2
3 files changed, 8 insertions, 12 deletions
diff --git a/src/device/pci_device.c b/src/device/pci_device.c
index 161715fadd..d18b2f110b 100644
--- a/src/device/pci_device.c
+++ b/src/device/pci_device.c
@@ -882,14 +882,15 @@ static struct device_operations *get_pci_bridge_ops(struct device *dev)
case PCI_EXP_TYPE_DOWNSTREAM:
printk(BIOS_DEBUG, "%s subordinate bus PCI Express\n",
dev_path(dev));
-#if CONFIG(PCIEXP_HOTPLUG)
- u16 sltcap;
- sltcap = pci_read_config16(dev, pciexpos + PCI_EXP_SLTCAP);
- if (sltcap & PCI_EXP_SLTCAP_HPC) {
- printk(BIOS_DEBUG, "%s hot-plug capable\n", dev_path(dev));
- return &default_pciexp_hotplug_ops_bus;
+ if (CONFIG(PCIEXP_HOTPLUG)) {
+ u16 sltcap;
+ sltcap = pci_read_config16(dev, pciexpos + PCI_EXP_SLTCAP);
+ if (sltcap & PCI_EXP_SLTCAP_HPC) {
+ printk(BIOS_DEBUG, "%s hot-plug capable\n",
+ dev_path(dev));
+ return &default_pciexp_hotplug_ops_bus;
+ }
}
-#endif /* CONFIG(PCIEXP_HOTPLUG) */
return &default_pciexp_ops_bus;
case PCI_EXP_TYPE_PCI_BRIDGE:
printk(BIOS_DEBUG, "%s subordinate PCI\n",
diff --git a/src/device/pciexp_device.c b/src/device/pciexp_device.c
index 0b7c649d93..70f65144b6 100644
--- a/src/device/pciexp_device.c
+++ b/src/device/pciexp_device.c
@@ -510,8 +510,6 @@ struct device_operations default_pciexp_ops_bus = {
.ops_pci = &pciexp_bus_ops_pci,
};
-#if CONFIG(PCIEXP_HOTPLUG)
-
static void pciexp_hotplug_dummy_read_resources(struct device *dev)
{
struct resource *resource;
@@ -571,4 +569,3 @@ struct device_operations default_pciexp_hotplug_ops_bus = {
.reset_bus = pci_bus_reset,
.ops_pci = &pciexp_bus_ops_pci,
};
-#endif /* CONFIG(PCIEXP_HOTPLUG) */
diff --git a/src/include/device/pciexp.h b/src/include/device/pciexp.h
index 44914063f6..014fcb18b1 100644
--- a/src/include/device/pciexp.h
+++ b/src/include/device/pciexp.h
@@ -26,11 +26,9 @@ void pciexp_scan_bridge(struct device *dev);
extern struct device_operations default_pciexp_ops_bus;
-#if CONFIG(PCIEXP_HOTPLUG)
void pciexp_hotplug_scan_bridge(struct device *dev);
extern struct device_operations default_pciexp_hotplug_ops_bus;
-#endif /* CONFIG(PCIEXP_HOTPLUG) */
unsigned int pciexp_find_extended_cap(struct device *dev, unsigned int cap);
#endif /* DEVICE_PCIEXP_H */