/* * \brief Implementation of linux/io.h * \author Norman Feske * \date 2015-09-09 */ /* * Copyright (C) 2015 Genode Labs GmbH * * This file is part of the Genode OS framework, which is distributed * under the terms of the GNU General Public License version 2. */ #include #include void *ioremap(resource_size_t phys_addr, unsigned long size) { return Lx::ioremap(phys_addr, size, Genode::UNCACHED); } void *ioremap_wc(resource_size_t phys_addr, unsigned long size) { return Lx::ioremap(phys_addr, size, Genode::WRITE_COMBINED); } /********************** ** asm-generic/io.h ** **********************/ void outb(u8 value, u32 port) { Lx::pci_dev_registry()->io_write (port, value); } void outw(u16 value, u32 port) { Lx::pci_dev_registry()->io_write(port, value); } void outl(u32 value, u32 port) { Lx::pci_dev_registry()->io_write(port, value); } u8 inb(u32 port) { return Lx::pci_dev_registry()->io_read (port); } u16 inw(u32 port) { return Lx::pci_dev_registry()->io_read(port); } u32 inl(u32 port) { return Lx::pci_dev_registry()->io_read(port); }