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)
28 return (u8)read_isa_io(0, (void *)(u32)port, sizeof(u8));
34 return (u16)read_isa_io(0, (void *)(u32)port, sizeof(u16));
40 return (u32)read_isa_io(0, (void *)(u32)port, sizeof(u32));
44 outb (u8 value, u16 port)
46 write_isa_io(0, (void *)(u32)port, sizeof(value), value);
50 outw (u16 value, u16 port)
52 write_isa_io(0, (void *)(u32)port, sizeof(value), value);
56 outl (u32 value, u16 port)
58 write_isa_io(0, (void *)(u32)port, sizeof(value), value);