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 v2+
8 * SPDX-License-Identifier: GPL-2.0-or-later
11 /* those are private syscalls */
12 extern int read_isa_io(int pci_bus, void *addr, int size);
13 extern int write_isa_io(int pci_bus, void *addr, int size, u32 value);
16 intel_setup_io(struct pci_access *a UNUSED)
22 intel_cleanup_io(struct pci_access *a UNUSED)
29 return (u8)read_isa_io(0, (void *)(u32)port, sizeof(u8));
35 return (u16)read_isa_io(0, (void *)(u32)port, sizeof(u16));
41 return (u32)read_isa_io(0, (void *)(u32)port, sizeof(u32));
45 outb (u8 value, u16 port)
47 write_isa_io(0, (void *)(u32)port, sizeof(value), value);
51 outw (u16 value, u16 port)
53 write_isa_io(0, (void *)(u32)port, sizeof(value), value);
57 outl (u32 value, u16 port)
59 write_isa_io(0, (void *)(u32)port, sizeof(value), value);
62 static inline void intel_io_lock(void)
66 static inline void intel_io_unlock(void)