6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version.
13 * Chris Zankel <chris@zankel.net>
18 #include <asm/byteorder.h>
20 void outsb(unsigned long addr, const void *src, unsigned long count) {
23 writeb(*(const char *)src, addr);
29 void outsw(unsigned long addr, const void *src, unsigned long count) {
32 writew(*(const short *)src, addr);
38 void outsl(unsigned long addr, const void *src, unsigned long count) {
41 writel(*(const long *)src, addr);
47 void insb(unsigned long addr, void *dst, unsigned long count) {
50 *(unsigned char *)dst = readb(addr);
56 void insw(unsigned long addr, void *dst, unsigned long count) {
59 *(unsigned short *)dst = readw(addr);
65 void insl(unsigned long addr, void *dst, unsigned long count) {
69 * XXX I am sure we are in for an unaligned trap here.
71 *(unsigned long *)dst = readl(addr);