2 * linux/arch/arm/lib/io-shark.c
4 * by Alexander.Schulz@stud.uni-karlsruhe.de
7 * linux/arch/arm/lib/io-ebsa.S
8 * Copyright (C) 1995, 1996 Russell King
10 #include <linux/kernel.h>
14 void print_warning(void)
16 printk(KERN_WARNING
"ins?/outs? not implemented on this architecture\n");
19 void insl(unsigned int port
, void *to
, int len
)
24 void insb(unsigned int port
, void *to
, int len
)
29 void outsl(unsigned int port
, const void *from
, int len
)
34 void outsb(unsigned int port
, const void *from
, int len
)
39 /* these should be in assembler again */
42 * Purpose: read a block of data from a hardware register to memory.
43 * Proto : insw(int from_port, void *to, int len_in_words);
44 * Proto : inswb(int from_port, void *to, int len_in_bytes);
45 * Notes : increment to
48 void insw(unsigned int port
, void *to
, int len
)
52 for (i
= 0; i
< len
; i
++)
53 ((unsigned short *) to
)[i
] = inw(port
);
56 void inswb(unsigned int port
, void *to
, int len
)
58 insw(port
, to
, len
>> 2);
62 * Purpose: write a block of data from memory to a hardware register.
63 * Proto : outsw(int to_reg, void *from, int len_in_words);
64 * Proto : outswb(int to_reg, void *from, int len_in_bytes);
65 * Notes : increments from
68 void outsw(unsigned int port
, const void *from
, int len
)
72 for (i
= 0; i
< len
; i
++)
73 outw(((unsigned short *) from
)[i
], port
);
76 void outswb(unsigned int port
, const void *from
, int len
)
78 outsw(port
, from
, len
>> 2);