diff options
author | Paul Burton <paul.burton@imgtec.com> | 2016-10-05 18:18:12 +0100 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2016-10-06 18:00:05 +0200 |
commit | c5611df968047fb0b38156497b4242730ef66108 (patch) | |
tree | 0f69ce4163194a0152e2673e3c71c47eabfffa0b /arch/mips/lib/iomap-pci.c | |
parent | f8091a88978b68df8ee6095eed0de2177eac3c69 (diff) | |
download | linux-c5611df968047fb0b38156497b4242730ef66108.tar.gz linux-c5611df968047fb0b38156497b4242730ef66108.tar.bz2 linux-c5611df968047fb0b38156497b4242730ef66108.zip |
MIPS: PCI: Introduce CONFIG_PCI_DRIVERS_LEGACY
Introduce 2 Kconfig symbols, CONFIG_PCI_DRIVERS_GENERIC &
CONFIG_PCI_DRIVERS_LEGACY, which indicate whether the system should be
built to for PCI drivers using the MIPS-specific struct pci_controller
API (hereafter "legacy" drivers) or more generic drivers using only
functionality provided by the PCI core (hereafter "generic" drivers).
The Kconfig entries are created such that platforms have to select
CONFIG_PCI_DRIVERS_GENERIC if they wish to use it - that is, the default
is CONFIG_PCI_DRIVERS_LEGACY so that existing platforms need no
modification.
The functions declared in pci.h are rearranged with those provided only
by pci-legacy.c being guarded by an #ifdef CONFIG_PCI_DRIVERS_LEGACY to
ensure they are only used in configurations where they are implemented.
Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/14345/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/lib/iomap-pci.c')
-rw-r--r-- | arch/mips/lib/iomap-pci.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/mips/lib/iomap-pci.c b/arch/mips/lib/iomap-pci.c index a629077fd7b9..8ed3f25a9047 100644 --- a/arch/mips/lib/iomap-pci.c +++ b/arch/mips/lib/iomap-pci.c @@ -10,6 +10,8 @@ #include <linux/export.h> #include <asm/io.h> +#ifdef CONFIG_PCI_DRIVERS_LEGACY + void __iomem *__pci_ioport_map(struct pci_dev *dev, unsigned long port, unsigned int nr) { @@ -40,6 +42,8 @@ void __iomem *__pci_ioport_map(struct pci_dev *dev, return (void __iomem *) (ctrl->io_map_base + port); } +#endif /* CONFIG_PCI_DRIVERS_LEGACY */ + void pci_iounmap(struct pci_dev *dev, void __iomem * addr) { iounmap(addr); |