[PATCH v2 1/4] asm-generic: add pci required defines and functions

From: Ley Foon Tan
Date: Wed Oct 14 2015 - 02:32:03 EST


Add the generic #define and functions that required by the PCI framework.
Architecture pci.h can overwrite with their implementation if needed.

Signed-off-by: Ley Foon Tan <lftan@xxxxxxxxxx>
---
include/asm-generic/pci.h | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)

diff --git a/include/asm-generic/pci.h b/include/asm-generic/pci.h
index f24bc51..2771b32 100644
--- a/include/asm-generic/pci.h
+++ b/include/asm-generic/pci.h
@@ -21,4 +21,38 @@ static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
#define PCI_DMA_BUS_IS_PHYS (1)
#endif

+#ifdef CONFIG_PCI
+
+#ifndef PCIBIOS_MIN_IO
+#define PCIBIOS_MIN_IO (0UL)
+#endif
+
+#ifndef PCIBIOS_MIN_MEM
+#define PCIBIOS_MIN_MEM (0UL)
+#endif
+
+#ifndef pcibios_assign_all_busses
+#define pcibios_assign_all_busses() (pci_has_flag(PCI_REASSIGN_ALL_BUS))
+#endif
+
+#ifndef pci_proc_domain
+#define pci_proc_domain pci_proc_domain
+static inline int pci_proc_domain(struct pci_bus *bus)
+{
+#ifdef CONFIG_PCI_DOMAINS_GENERIC
+ return pci_domain_nr(bus);
+#else
+ return 1;
+#endif
+}
+#endif
+
+extern int isa_dma_bridge_buggy;
+
+#else
+
+#define isa_dma_bridge_buggy (0)
+
+#endif /* CONFIG_PCI */
+
#endif /* _ASM_GENERIC_PCI_H */
--
1.8.2.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/