2 * The PCI Library -- Access to i386 I/O ports on BeOS
4 * Copyright (c) 2009 Francois Revol <revol@free.fr>
6 * Can be freely distributed and used under the terms of the GNU GPL.
9 /* those are private syscalls */
10 extern int read_isa_io(int pci_bus, void *addr, int size);
11 extern int write_isa_io(int pci_bus, void *addr, int size, u32 value);
14 intel_setup_io(struct pci_access *a UNUSED)
20 intel_cleanup_io(struct pci_access *a UNUSED)
27 return (u8)read_isa_io(0, (void *)(u32)port, sizeof(u8));
33 return (u16)read_isa_io(0, (void *)(u32)port, sizeof(u16));
39 return (u32)read_isa_io(0, (void *)(u32)port, sizeof(u32));
43 outb (u8 value, u16 port)
45 write_isa_io(0, (void *)(u32)port, sizeof(value), value);
49 outw (u16 value, u16 port)
51 write_isa_io(0, (void *)(u32)port, sizeof(value), value);
55 outl (u32 value, u16 port)
57 write_isa_io(0, (void *)(u32)port, sizeof(value), value);
60 static inline void intel_io_lock(void)
64 static inline void intel_io_unlock(void)