diff options
| author | Michael Brown | 2020-09-24 17:58:14 +0200 |
|---|---|---|
| committer | Michael Brown | 2020-09-24 22:45:56 +0200 |
| commit | 371af4eef2dfa1facf6645a5704d8a55ff45c965 (patch) | |
| tree | 9026c2cde9011a04cc1c8b5857cbeaa5f9c6b79f /src/include/ipxe/linux | |
| parent | [efi] Provide a single implementation of efipci_root_close() (diff) | |
| download | ipxe-371af4eef2dfa1facf6645a5704d8a55ff45c965.tar.gz ipxe-371af4eef2dfa1facf6645a5704d8a55ff45c965.tar.xz ipxe-371af4eef2dfa1facf6645a5704d8a55ff45c965.zip | |
[pci] Define pci_ioremap() for mapping PCI bus addresses
Define pci_ioremap() as a wrapper around ioremap() that could allow
for a non-zero address translation offset.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe/linux')
| -rw-r--r-- | src/include/ipxe/linux/linux_pci.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/include/ipxe/linux/linux_pci.h b/src/include/ipxe/linux/linux_pci.h index 22ae7f1bc..76ed8f252 100644 --- a/src/include/ipxe/linux/linux_pci.h +++ b/src/include/ipxe/linux/linux_pci.h @@ -127,4 +127,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 */ |
