device/pciexp_device.c: Remove CPP guarding
Let the linker do its job. This fixes building with !CONFIG_PCIEXP_HOTPLUG on some platforms. Change-Id: I46560722dcb5f1d902709e40b714ef092515b164 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/51417 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Nico Huber <nico.h@gmx.de>
This commit is contained in:
parent
095bdecab3
commit
24837e75cb
|
@ -882,14 +882,15 @@ static struct device_operations *get_pci_bridge_ops(struct device *dev)
|
||||||
case PCI_EXP_TYPE_DOWNSTREAM:
|
case PCI_EXP_TYPE_DOWNSTREAM:
|
||||||
printk(BIOS_DEBUG, "%s subordinate bus PCI Express\n",
|
printk(BIOS_DEBUG, "%s subordinate bus PCI Express\n",
|
||||||
dev_path(dev));
|
dev_path(dev));
|
||||||
#if CONFIG(PCIEXP_HOTPLUG)
|
if (CONFIG(PCIEXP_HOTPLUG)) {
|
||||||
u16 sltcap;
|
u16 sltcap;
|
||||||
sltcap = pci_read_config16(dev, pciexpos + PCI_EXP_SLTCAP);
|
sltcap = pci_read_config16(dev, pciexpos + PCI_EXP_SLTCAP);
|
||||||
if (sltcap & PCI_EXP_SLTCAP_HPC) {
|
if (sltcap & PCI_EXP_SLTCAP_HPC) {
|
||||||
printk(BIOS_DEBUG, "%s hot-plug capable\n", dev_path(dev));
|
printk(BIOS_DEBUG, "%s hot-plug capable\n",
|
||||||
return &default_pciexp_hotplug_ops_bus;
|
dev_path(dev));
|
||||||
|
return &default_pciexp_hotplug_ops_bus;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif /* CONFIG(PCIEXP_HOTPLUG) */
|
|
||||||
return &default_pciexp_ops_bus;
|
return &default_pciexp_ops_bus;
|
||||||
case PCI_EXP_TYPE_PCI_BRIDGE:
|
case PCI_EXP_TYPE_PCI_BRIDGE:
|
||||||
printk(BIOS_DEBUG, "%s subordinate PCI\n",
|
printk(BIOS_DEBUG, "%s subordinate PCI\n",
|
||||||
|
|
|
@ -510,8 +510,6 @@ struct device_operations default_pciexp_ops_bus = {
|
||||||
.ops_pci = &pciexp_bus_ops_pci,
|
.ops_pci = &pciexp_bus_ops_pci,
|
||||||
};
|
};
|
||||||
|
|
||||||
#if CONFIG(PCIEXP_HOTPLUG)
|
|
||||||
|
|
||||||
static void pciexp_hotplug_dummy_read_resources(struct device *dev)
|
static void pciexp_hotplug_dummy_read_resources(struct device *dev)
|
||||||
{
|
{
|
||||||
struct resource *resource;
|
struct resource *resource;
|
||||||
|
@ -571,4 +569,3 @@ struct device_operations default_pciexp_hotplug_ops_bus = {
|
||||||
.reset_bus = pci_bus_reset,
|
.reset_bus = pci_bus_reset,
|
||||||
.ops_pci = &pciexp_bus_ops_pci,
|
.ops_pci = &pciexp_bus_ops_pci,
|
||||||
};
|
};
|
||||||
#endif /* CONFIG(PCIEXP_HOTPLUG) */
|
|
||||||
|
|
|
@ -26,11 +26,9 @@ void pciexp_scan_bridge(struct device *dev);
|
||||||
|
|
||||||
extern struct device_operations default_pciexp_ops_bus;
|
extern struct device_operations default_pciexp_ops_bus;
|
||||||
|
|
||||||
#if CONFIG(PCIEXP_HOTPLUG)
|
|
||||||
void pciexp_hotplug_scan_bridge(struct device *dev);
|
void pciexp_hotplug_scan_bridge(struct device *dev);
|
||||||
|
|
||||||
extern struct device_operations default_pciexp_hotplug_ops_bus;
|
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);
|
unsigned int pciexp_find_extended_cap(struct device *dev, unsigned int cap);
|
||||||
#endif /* DEVICE_PCIEXP_H */
|
#endif /* DEVICE_PCIEXP_H */
|
||||||
|
|
Loading…
Reference in New Issue