diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /arch/arm/lib/io-shark.c |
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
Diffstat (limited to 'arch/arm/lib/io-shark.c')
-rw-r--r-- | arch/arm/lib/io-shark.c | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/arch/arm/lib/io-shark.c b/arch/arm/lib/io-shark.c new file mode 100644 index 000000000000..108d4573e970 --- /dev/null +++ b/arch/arm/lib/io-shark.c | |||
@@ -0,0 +1,83 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/lib/io-shark.c | ||
3 | * | ||
4 | * by Alexander Schulz | ||
5 | * | ||
6 | * derived from: | ||
7 | * linux/arch/arm/lib/io-ebsa.S | ||
8 | * Copyright (C) 1995, 1996 Russell King | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | #include <linux/kernel.h> | ||
15 | |||
16 | #include <asm/io.h> | ||
17 | |||
18 | void print_warning(void) | ||
19 | { | ||
20 | printk(KERN_WARNING "ins?/outs? not implemented on this architecture\n"); | ||
21 | } | ||
22 | |||
23 | void insl(unsigned int port, void *to, int len) | ||
24 | { | ||
25 | print_warning(); | ||
26 | } | ||
27 | |||
28 | void insb(unsigned int port, void *to, int len) | ||
29 | { | ||
30 | print_warning(); | ||
31 | } | ||
32 | |||
33 | void outsl(unsigned int port, const void *from, int len) | ||
34 | { | ||
35 | print_warning(); | ||
36 | } | ||
37 | |||
38 | void outsb(unsigned int port, const void *from, int len) | ||
39 | { | ||
40 | print_warning(); | ||
41 | } | ||
42 | |||
43 | /* these should be in assembler again */ | ||
44 | |||
45 | /* | ||
46 | * Purpose: read a block of data from a hardware register to memory. | ||
47 | * Proto : insw(int from_port, void *to, int len_in_words); | ||
48 | * Proto : inswb(int from_port, void *to, int len_in_bytes); | ||
49 | * Notes : increment to | ||
50 | */ | ||
51 | |||
52 | void insw(unsigned int port, void *to, int len) | ||
53 | { | ||
54 | int i; | ||
55 | |||
56 | for (i = 0; i < len; i++) | ||
57 | ((unsigned short *) to)[i] = inw(port); | ||
58 | } | ||
59 | |||
60 | void inswb(unsigned int port, void *to, int len) | ||
61 | { | ||
62 | insw(port, to, len >> 2); | ||
63 | } | ||
64 | |||
65 | /* | ||
66 | * Purpose: write a block of data from memory to a hardware register. | ||
67 | * Proto : outsw(int to_reg, void *from, int len_in_words); | ||
68 | * Proto : outswb(int to_reg, void *from, int len_in_bytes); | ||
69 | * Notes : increments from | ||
70 | */ | ||
71 | |||
72 | void outsw(unsigned int port, const void *from, int len) | ||
73 | { | ||
74 | int i; | ||
75 | |||
76 | for (i = 0; i < len; i++) | ||
77 | outw(((unsigned short *) from)[i], port); | ||
78 | } | ||
79 | |||
80 | void outswb(unsigned int port, const void *from, int len) | ||
81 | { | ||
82 | outsw(port, from, len >> 2); | ||
83 | } | ||