pci_mmio_cfg: Move guard around pci_s_* functions to x86

There is no platform in our tree that requires the PCI MMIO ops but
doesn't want the pci_s_* definitions. The only case where we include
the `pci_mmio_cfg.h` header but don't want the pci_s_* functions to
use MMIO is on older x86 platforms, so move the guard there.

Change-Id: Iaeed6ab43ad61b7c0e14572b12bf4ec06b6a26af
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/58331
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Shelley Chen <shchen@google.com>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
This commit is contained in:
Nico Huber 2021-10-14 18:27:22 +02:00 committed by Nico Huber
parent 91c077f6e2
commit afe1898607
2 changed files with 4 additions and 2 deletions

View File

@ -4,6 +4,8 @@
#define ARCH_I386_PCI_OPS_H
#include <arch/pci_io_cfg.h>
#if CONFIG(MMCONF_SUPPORT)
#include <device/pci_mmio_cfg.h>
#endif
#endif /* ARCH_I386_PCI_OPS_H */

View File

@ -105,6 +105,8 @@ uint32_t *pci_mmio_config32_addr(pci_devfn_t dev, uint16_t reg)
#error "CONFIG_MMCONF_LENGTH does not correspond with CONFIG_MMCONF_BUS_NUMBER!"
#endif
#endif
/* Avoid name collisions as different stages have different signature
* for these functions. The _s_ stands for simple, fundamental IO or
* MMIO variant.
@ -146,6 +148,4 @@ void pci_s_write_config32(pci_devfn_t dev, uint16_t reg, uint32_t value)
pci_mmio_write_config32(dev, reg, value);
}
#endif
#endif /* _PCI_MMIO_CFG_H */