diff options
-rw-r--r-- | include/pci.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/pci.h b/include/pci.h index e6b445c..c12a784 100644 --- a/include/pci.h +++ b/include/pci.h @@ -9,31 +9,31 @@ static inline void pci_config_writel(uint16_t bdf, uint32_t addr, uint32_t val) outl(0xcfc, val); } -void pci_config_writew(uint16_t bdf, uint32_t addr, uint16_t val) +static inline void pci_config_writew(uint16_t bdf, uint32_t addr, uint16_t val) { outl(0xcf8, 0x80000000 | (bdf << 8) | (addr & 0xfc)); outw(0xcfc | (addr & 2), val); } -void pci_config_writeb(uint16_t bdf, uint32_t addr, uint8_t val) +static inline void pci_config_writeb(uint16_t bdf, uint32_t addr, uint8_t val) { outl(0xcf8, 0x80000000 | (bdf << 8) | (addr & 0xfc)); outb(0xcfc | (addr & 3), val); } -uint32_t pci_config_readl(uint16_t bdf, uint32_t addr) +static inline uint32_t pci_config_readl(uint16_t bdf, uint32_t addr) { outl(0xcf8, 0x80000000 | (bdf << 8) | (addr & 0xfc)); return inl(0xcfc); } -uint16_t pci_config_readw(uint16_t bdf, uint32_t addr) +static inline uint16_t pci_config_readw(uint16_t bdf, uint32_t addr) { outl(0xcf8, 0x80000000 | (bdf << 8) | (addr & 0xfc)); return inw(0xcfc | (addr & 2)); } -uint8_t pci_config_readb(uint16_t bdf, uint32_t addr) +static inline uint8_t pci_config_readb(uint16_t bdf, uint32_t addr) { outl(0xcf8, 0x80000000 | (bdf << 8) | (addr & 0xfc)); return inb(0xcfc | (addr & 3)); |