summaryrefslogtreecommitdiffstats
path: root/src/include/ipxe/linux/linux_pci.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/ipxe/linux/linux_pci.h')
-rw-r--r--src/include/ipxe/linux/linux_pci.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/include/ipxe/linux/linux_pci.h b/src/include/ipxe/linux/linux_pci.h
index 22ae7f1bc..de42f766b 100644
--- a/src/include/ipxe/linux/linux_pci.h
+++ b/src/include/ipxe/linux/linux_pci.h
@@ -23,6 +23,17 @@ extern int linux_pci_write ( struct pci_device *pci, unsigned long where,
unsigned long value, size_t len );
/**
+ * Determine number of PCI buses within system
+ *
+ * @ret num_bus Number of buses
+ */
+static inline __always_inline int
+PCIAPI_INLINE ( linux, pci_num_bus ) ( void ) {
+ /* Assume all buses may exist */
+ return 0x100;
+}
+
+/**
* Read byte from PCI configuration space
*
* @v pci PCI device
@@ -127,4 +138,17 @@ PCIAPI_INLINE ( linux, pci_write_config_dword ) ( struct pci_device *pci,
return linux_pci_write ( pci, where, value, sizeof ( value ) );
}
+/**
+ * Map PCI bus address as an I/O address
+ *
+ * @v bus_addr PCI bus address
+ * @v len Length of region
+ * @ret io_addr I/O address, or NULL on error
+ */
+static inline __always_inline void *
+PCIAPI_INLINE ( linux, pci_ioremap ) ( struct pci_device *pci __unused,
+ unsigned long bus_addr, size_t len ) {
+ return ioremap ( bus_addr, len );
+}
+
#endif /* _IPXE_LINUX_PCI_H */