From 6248b55bfa57db9576a33be128da89f271a51da4 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Mon, 9 May 2011 10:59:22 -0700 Subject: Add in/out functions for 16 and 32-bit quantities. --- protos.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/protos.h b/protos.h index 3e8d179..425cc9d 100644 --- a/protos.h +++ b/protos.h @@ -162,11 +162,31 @@ static inline uint8_t inb(unsigned long port) return *(volatile uint8_t *)(pci_io_base + port); } +static inline uint16_t inw(unsigned long port) +{ + return *(volatile uint16_t *)(pci_io_base + port); +} + +static inline uint32_t inl(unsigned long port) +{ + return *(volatile uint32_t *)(pci_io_base + port); +} + static inline void outb(uint8_t val, unsigned long port) { *(volatile uint8_t *)(pci_io_base + port) = val; } +static inline void outw(uint16_t val, unsigned long port) +{ + *(volatile uint16_t *)(pci_io_base + port) = val; +} + +static inline void outl(uint32_t val, unsigned long port) +{ + *(volatile uint32_t *)(pci_io_base + port) = val; +} + /* * CRB functions */ -- cgit v1.1