diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/sh/boards/mach-se/7206/Makefile | 2 | ||||
-rw-r--r-- | arch/sh/boards/mach-se/7206/io.c | 104 | ||||
-rw-r--r-- | arch/sh/boards/mach-se/7206/setup.c | 15 |
3 files changed, 1 insertions, 120 deletions
diff --git a/arch/sh/boards/mach-se/7206/Makefile b/arch/sh/boards/mach-se/7206/Makefile index 63e7ed699f39..5c9eaa0535b9 100644 --- a/arch/sh/boards/mach-se/7206/Makefile +++ b/arch/sh/boards/mach-se/7206/Makefile | |||
@@ -2,4 +2,4 @@ | |||
2 | # Makefile for the 7206 SolutionEngine specific parts of the kernel | 2 | # Makefile for the 7206 SolutionEngine specific parts of the kernel |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y := setup.o io.o irq.o | 5 | obj-y := setup.o irq.o |
diff --git a/arch/sh/boards/mach-se/7206/io.c b/arch/sh/boards/mach-se/7206/io.c deleted file mode 100644 index adadc77532ee..000000000000 --- a/arch/sh/boards/mach-se/7206/io.c +++ /dev/null | |||
@@ -1,104 +0,0 @@ | |||
1 | /* $Id: io.c,v 1.5 2004/02/22 23:08:43 kkojima Exp $ | ||
2 | * | ||
3 | * linux/arch/sh/boards/se/7206/io.c | ||
4 | * | ||
5 | * Copyright (C) 2006 Yoshinori Sato | ||
6 | * | ||
7 | * I/O routine for Hitachi 7206 SolutionEngine. | ||
8 | * | ||
9 | */ | ||
10 | |||
11 | #include <linux/kernel.h> | ||
12 | #include <linux/types.h> | ||
13 | #include <asm/io.h> | ||
14 | #include <mach-se/mach/se7206.h> | ||
15 | |||
16 | |||
17 | static inline void delay(void) | ||
18 | { | ||
19 | __raw_readw(0x20000000); /* P2 ROM Area */ | ||
20 | } | ||
21 | |||
22 | /* MS7750 requires special versions of in*, out* routines, since | ||
23 | PC-like io ports are located at upper half byte of 16-bit word which | ||
24 | can be accessed only with 16-bit wide. */ | ||
25 | |||
26 | static inline volatile __u16 * | ||
27 | port2adr(unsigned int port) | ||
28 | { | ||
29 | if (port >= 0x2000 && port < 0x2020) | ||
30 | return (volatile __u16 *) (PA_MRSHPC + (port - 0x2000)); | ||
31 | else if (port >= 0x300 && port < 0x310) | ||
32 | return (volatile __u16 *) (PA_SMSC + (port - 0x300)); | ||
33 | |||
34 | return (volatile __u16 *)port; | ||
35 | } | ||
36 | |||
37 | unsigned char se7206_inb(unsigned long port) | ||
38 | { | ||
39 | return (*port2adr(port)) & 0xff; | ||
40 | } | ||
41 | |||
42 | unsigned char se7206_inb_p(unsigned long port) | ||
43 | { | ||
44 | unsigned long v; | ||
45 | |||
46 | v = (*port2adr(port)) & 0xff; | ||
47 | delay(); | ||
48 | return v; | ||
49 | } | ||
50 | |||
51 | unsigned short se7206_inw(unsigned long port) | ||
52 | { | ||
53 | return *port2adr(port); | ||
54 | } | ||
55 | |||
56 | void se7206_outb(unsigned char value, unsigned long port) | ||
57 | { | ||
58 | *(port2adr(port)) = value; | ||
59 | } | ||
60 | |||
61 | void se7206_outb_p(unsigned char value, unsigned long port) | ||
62 | { | ||
63 | *(port2adr(port)) = value; | ||
64 | delay(); | ||
65 | } | ||
66 | |||
67 | void se7206_outw(unsigned short value, unsigned long port) | ||
68 | { | ||
69 | *port2adr(port) = value; | ||
70 | } | ||
71 | |||
72 | void se7206_insb(unsigned long port, void *addr, unsigned long count) | ||
73 | { | ||
74 | volatile __u16 *p = port2adr(port); | ||
75 | __u8 *ap = addr; | ||
76 | |||
77 | while (count--) | ||
78 | *ap++ = *p; | ||
79 | } | ||
80 | |||
81 | void se7206_insw(unsigned long port, void *addr, unsigned long count) | ||
82 | { | ||
83 | volatile __u16 *p = port2adr(port); | ||
84 | __u16 *ap = addr; | ||
85 | while (count--) | ||
86 | *ap++ = *p; | ||
87 | } | ||
88 | |||
89 | void se7206_outsb(unsigned long port, const void *addr, unsigned long count) | ||
90 | { | ||
91 | volatile __u16 *p = port2adr(port); | ||
92 | const __u8 *ap = addr; | ||
93 | |||
94 | while (count--) | ||
95 | *p = *ap++; | ||
96 | } | ||
97 | |||
98 | void se7206_outsw(unsigned long port, const void *addr, unsigned long count) | ||
99 | { | ||
100 | volatile __u16 *p = port2adr(port); | ||
101 | const __u16 *ap = addr; | ||
102 | while (count--) | ||
103 | *p = *ap++; | ||
104 | } | ||
diff --git a/arch/sh/boards/mach-se/7206/setup.c b/arch/sh/boards/mach-se/7206/setup.c index 8f5c65d43d1d..7f4871c71a01 100644 --- a/arch/sh/boards/mach-se/7206/setup.c +++ b/arch/sh/boards/mach-se/7206/setup.c | |||
@@ -86,20 +86,5 @@ __initcall(se7206_devices_setup); | |||
86 | static struct sh_machine_vector mv_se __initmv = { | 86 | static struct sh_machine_vector mv_se __initmv = { |
87 | .mv_name = "SolutionEngine", | 87 | .mv_name = "SolutionEngine", |
88 | .mv_nr_irqs = 256, | 88 | .mv_nr_irqs = 256, |
89 | .mv_inb = se7206_inb, | ||
90 | .mv_inw = se7206_inw, | ||
91 | .mv_outb = se7206_outb, | ||
92 | .mv_outw = se7206_outw, | ||
93 | |||
94 | .mv_inb_p = se7206_inb_p, | ||
95 | .mv_inw_p = se7206_inw, | ||
96 | .mv_outb_p = se7206_outb_p, | ||
97 | .mv_outw_p = se7206_outw, | ||
98 | |||
99 | .mv_insb = se7206_insb, | ||
100 | .mv_insw = se7206_insw, | ||
101 | .mv_outsb = se7206_outsb, | ||
102 | .mv_outsw = se7206_outsw, | ||
103 | |||
104 | .mv_init_irq = init_se7206_IRQ, | 89 | .mv_init_irq = init_se7206_IRQ, |
105 | }; | 90 | }; |