/* * VAS_EBOOT -- GRand Unified Bootloader * Copyright (C) 2009 Free Software Foundation, Inc. * * VAS_EBOOT is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * VAS_EBOOT is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with VAS_EBOOT. If not, see . */ #ifndef VAS_EBOOT_IO_H #define VAS_EBOOT_IO_H 1 #include typedef VasEBoot_addr_t VasEBoot_port_t; static __inline unsigned char VasEBoot_inb (VasEBoot_port_t port) { return *(volatile VasEBoot_uint8_t *) port; } static __inline unsigned short int VasEBoot_inw (VasEBoot_port_t port) { return *(volatile VasEBoot_uint16_t *) port; } static __inline unsigned int VasEBoot_inl (VasEBoot_port_t port) { return *(volatile VasEBoot_uint32_t *) port; } static __inline void VasEBoot_outb (unsigned char value, VasEBoot_port_t port) { *(volatile VasEBoot_uint8_t *) port = value; } static __inline void VasEBoot_outw (unsigned short int value, VasEBoot_port_t port) { *(volatile VasEBoot_uint16_t *) port = value; } static __inline void VasEBoot_outl (unsigned int value, VasEBoot_port_t port) { *(volatile VasEBoot_uint32_t *) port = value; } #endif /* _SYS_IO_H */