diff options
author | Richard Henderson <rth@twiddle.net> | 2011-05-09 10:59:22 -0700 |
---|---|---|
committer | Richard Henderson <rth@twiddle.net> | 2011-05-09 10:59:22 -0700 |
commit | 6248b55bfa57db9576a33be128da89f271a51da4 (patch) | |
tree | 0d233aab4d849cc96641723749b39ff8c440ec56 | |
parent | 1a4a2299f36eb26c482319bc66f4cee7cb144af1 (diff) | |
download | qemu-palcode-6248b55bfa57db9576a33be128da89f271a51da4.tar.gz |
Add in/out functions for 16 and 32-bit quantities.
-rw-r--r-- | protos.h | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -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 */ |