diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 09:24:33 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 09:24:33 +0000 |
commit | 7a19c99f661602b67db95fd1d8aca5fe3a387441 (patch) | |
tree | 215ff04ec522779fa83acf394d296c2356c6b382 /lib/i386-io-beos.h | |
parent | Initial commit. (diff) | |
download | pciutils-upstream.tar.xz pciutils-upstream.zip |
Adding upstream version 1:3.9.0.upstream/1%3.9.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | lib/i386-io-beos.h | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/lib/i386-io-beos.h b/lib/i386-io-beos.h new file mode 100644 index 0000000..15f391b --- /dev/null +++ b/lib/i386-io-beos.h @@ -0,0 +1,66 @@ +/* + * The PCI Library -- Access to i386 I/O ports on BeOS + * + * Copyright (c) 2009 Francois Revol <revol@free.fr> + * + * Can be freely distributed and used under the terms of the GNU GPL. + */ + +/* those are private syscalls */ +extern int read_isa_io(int pci_bus, void *addr, int size); +extern int write_isa_io(int pci_bus, void *addr, int size, u32 value); + +static int +intel_setup_io(struct pci_access *a UNUSED) +{ + return 1; +} + +static inline void +intel_cleanup_io(struct pci_access *a UNUSED) +{ +} + +static inline u8 +inb (u16 port) +{ + return (u8)read_isa_io(0, (void *)(u32)port, sizeof(u8)); +} + +static inline u16 +inw (u16 port) +{ + return (u16)read_isa_io(0, (void *)(u32)port, sizeof(u16)); +} + +static inline u32 +inl (u16 port) +{ + return (u32)read_isa_io(0, (void *)(u32)port, sizeof(u32)); +} + +static inline void +outb (u8 value, u16 port) +{ + write_isa_io(0, (void *)(u32)port, sizeof(value), value); +} + +static inline void +outw (u16 value, u16 port) +{ + write_isa_io(0, (void *)(u32)port, sizeof(value), value); +} + +static inline void +outl (u32 value, u16 port) +{ + write_isa_io(0, (void *)(u32)port, sizeof(value), value); +} + +static inline void intel_io_lock(void) +{ +} + +static inline void intel_io_unlock(void) +{ +} |