diff options
author | Magnus Damm <damm@igel.co.jp> | 2007-07-24 22:42:56 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2007-07-26 02:37:57 -0400 |
commit | d89ddd1c847637d91625c8cb6b0d064e1717057c (patch) | |
tree | 7f2547f112e3cd70e06a190fc26ab701dbab71b9 /arch/sh/boards/se | |
parent | 32582fa46020cd8940006a8d42dec083d72d6d8b (diff) |
sh: remove support for sh7300 and solution engine 7300
This patch removes old dead code:
- kill off sh7300 cpu support
- get rid of broken solution engine 7300 board support
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/boards/se')
-rw-r--r-- | arch/sh/boards/se/7300/Makefile | 5 | ||||
-rw-r--r-- | arch/sh/boards/se/7300/io.c | 268 | ||||
-rw-r--r-- | arch/sh/boards/se/7300/irq.c | 40 | ||||
-rw-r--r-- | arch/sh/boards/se/7300/setup.c | 74 |
4 files changed, 0 insertions, 387 deletions
diff --git a/arch/sh/boards/se/7300/Makefile b/arch/sh/boards/se/7300/Makefile deleted file mode 100644 index 46247368f14b..000000000000 --- a/arch/sh/boards/se/7300/Makefile +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | # | ||
2 | # Makefile for the 7300 SolutionEngine specific parts of the kernel | ||
3 | # | ||
4 | |||
5 | obj-y := setup.o io.o irq.o | ||
diff --git a/arch/sh/boards/se/7300/io.c b/arch/sh/boards/se/7300/io.c deleted file mode 100644 index 8a03d7a52a7c..000000000000 --- a/arch/sh/boards/se/7300/io.c +++ /dev/null | |||
@@ -1,268 +0,0 @@ | |||
1 | /* | ||
2 | * arch/sh/boards/se/7300/io.c | ||
3 | * | ||
4 | * Copyright (C) 2003 YOSHII Takashi <yoshii-takashi@hitachi-ul.co.jp> | ||
5 | * Based on arch/sh/kernel/io_shmse.c | ||
6 | * | ||
7 | * I/O routine for SH-Mobile3 73180 SolutionEngine. | ||
8 | * | ||
9 | */ | ||
10 | |||
11 | #include <linux/kernel.h> | ||
12 | #include <asm/io.h> | ||
13 | #include <asm/se7300.h> | ||
14 | |||
15 | #define badio(fn, a) panic("bad i/o operation %s for %08lx.", #fn, a) | ||
16 | |||
17 | struct iop { | ||
18 | unsigned long start, end; | ||
19 | unsigned long base; | ||
20 | struct iop *(*check) (struct iop * p, unsigned long port); | ||
21 | unsigned char (*inb) (struct iop * p, unsigned long port); | ||
22 | unsigned short (*inw) (struct iop * p, unsigned long port); | ||
23 | void (*outb) (struct iop * p, unsigned char value, unsigned long port); | ||
24 | void (*outw) (struct iop * p, unsigned short value, unsigned long port); | ||
25 | }; | ||
26 | |||
27 | struct iop * | ||
28 | simple_check(struct iop *p, unsigned long port) | ||
29 | { | ||
30 | if ((p->start <= port) && (port <= p->end)) | ||
31 | return p; | ||
32 | else | ||
33 | badio(check, port); | ||
34 | } | ||
35 | |||
36 | struct iop * | ||
37 | ide_check(struct iop *p, unsigned long port) | ||
38 | { | ||
39 | if (((0x1f0 <= port) && (port <= 0x1f7)) || (port == 0x3f7)) | ||
40 | return p; | ||
41 | return NULL; | ||
42 | } | ||
43 | |||
44 | unsigned char | ||
45 | simple_inb(struct iop *p, unsigned long port) | ||
46 | { | ||
47 | return *(unsigned char *) (p->base + port); | ||
48 | } | ||
49 | |||
50 | unsigned short | ||
51 | simple_inw(struct iop *p, unsigned long port) | ||
52 | { | ||
53 | return *(unsigned short *) (p->base + port); | ||
54 | } | ||
55 | |||
56 | void | ||
57 | simple_outb(struct iop *p, unsigned char value, unsigned long port) | ||
58 | { | ||
59 | *(unsigned char *) (p->base + port) = value; | ||
60 | } | ||
61 | |||
62 | void | ||
63 | simple_outw(struct iop *p, unsigned short value, unsigned long port) | ||
64 | { | ||
65 | *(unsigned short *) (p->base + port) = value; | ||
66 | } | ||
67 | |||
68 | unsigned char | ||
69 | pcc_inb(struct iop *p, unsigned long port) | ||
70 | { | ||
71 | unsigned long addr = p->base + port + 0x40000; | ||
72 | unsigned long v; | ||
73 | |||
74 | if (port & 1) | ||
75 | addr += 0x00400000; | ||
76 | v = *(volatile unsigned char *) addr; | ||
77 | return v; | ||
78 | } | ||
79 | |||
80 | void | ||
81 | pcc_outb(struct iop *p, unsigned char value, unsigned long port) | ||
82 | { | ||
83 | unsigned long addr = p->base + port + 0x40000; | ||
84 | |||
85 | if (port & 1) | ||
86 | addr += 0x00400000; | ||
87 | *(volatile unsigned char *) addr = value; | ||
88 | } | ||
89 | |||
90 | unsigned char | ||
91 | bad_inb(struct iop *p, unsigned long port) | ||
92 | { | ||
93 | badio(inb, port); | ||
94 | } | ||
95 | |||
96 | void | ||
97 | bad_outb(struct iop *p, unsigned char value, unsigned long port) | ||
98 | { | ||
99 | badio(inw, port); | ||
100 | } | ||
101 | |||
102 | #ifdef CONFIG_SMC91X | ||
103 | /* MSTLANEX01 LAN at 0xb400:0000 */ | ||
104 | static struct iop laniop = { | ||
105 | .start = 0x300, | ||
106 | .end = 0x30f, | ||
107 | .base = 0xb4000000, | ||
108 | .check = simple_check, | ||
109 | .inb = simple_inb, | ||
110 | .inw = simple_inw, | ||
111 | .outb = simple_outb, | ||
112 | .outw = simple_outw, | ||
113 | }; | ||
114 | #endif | ||
115 | |||
116 | /* NE2000 pc card NIC */ | ||
117 | static struct iop neiop = { | ||
118 | .start = 0x280, | ||
119 | .end = 0x29f, | ||
120 | .base = 0xb0600000 + 0x80, /* soft 0x280 -> hard 0x300 */ | ||
121 | .check = simple_check, | ||
122 | .inb = pcc_inb, | ||
123 | .inw = simple_inw, | ||
124 | .outb = pcc_outb, | ||
125 | .outw = simple_outw, | ||
126 | }; | ||
127 | |||
128 | #ifdef CONFIG_IDE | ||
129 | /* CF in CF slot */ | ||
130 | static struct iop cfiop = { | ||
131 | .base = 0xb0600000, | ||
132 | .check = ide_check, | ||
133 | .inb = pcc_inb, | ||
134 | .inw = simple_inw, | ||
135 | .outb = pcc_outb, | ||
136 | .outw = simple_outw, | ||
137 | }; | ||
138 | #endif | ||
139 | |||
140 | static __inline__ struct iop * | ||
141 | port2iop(unsigned long port) | ||
142 | { | ||
143 | if (0) ; | ||
144 | #if defined(CONFIG_SMC91X) | ||
145 | else if (laniop.check(&laniop, port)) | ||
146 | return &laniop; | ||
147 | #endif | ||
148 | #if defined(CONFIG_NE2000) | ||
149 | else if (neiop.check(&neiop, port)) | ||
150 | return &neiop; | ||
151 | #endif | ||
152 | #if defined(CONFIG_IDE) | ||
153 | else if (cfiop.check(&cfiop, port)) | ||
154 | return &cfiop; | ||
155 | #endif | ||
156 | else | ||
157 | return &neiop; /* fallback */ | ||
158 | } | ||
159 | |||
160 | static inline void | ||
161 | delay(void) | ||
162 | { | ||
163 | ctrl_inw(0xac000000); | ||
164 | ctrl_inw(0xac000000); | ||
165 | } | ||
166 | |||
167 | unsigned char | ||
168 | sh7300se_inb(unsigned long port) | ||
169 | { | ||
170 | struct iop *p = port2iop(port); | ||
171 | return (p->inb) (p, port); | ||
172 | } | ||
173 | |||
174 | unsigned char | ||
175 | sh7300se_inb_p(unsigned long port) | ||
176 | { | ||
177 | unsigned char v = sh7300se_inb(port); | ||
178 | delay(); | ||
179 | return v; | ||
180 | } | ||
181 | |||
182 | unsigned short | ||
183 | sh7300se_inw(unsigned long port) | ||
184 | { | ||
185 | struct iop *p = port2iop(port); | ||
186 | return (p->inw) (p, port); | ||
187 | } | ||
188 | |||
189 | unsigned int | ||
190 | sh7300se_inl(unsigned long port) | ||
191 | { | ||
192 | badio(inl, port); | ||
193 | } | ||
194 | |||
195 | void | ||
196 | sh7300se_outb(unsigned char value, unsigned long port) | ||
197 | { | ||
198 | struct iop *p = port2iop(port); | ||
199 | (p->outb) (p, value, port); | ||
200 | } | ||
201 | |||
202 | void | ||
203 | sh7300se_outb_p(unsigned char value, unsigned long port) | ||
204 | { | ||
205 | sh7300se_outb(value, port); | ||
206 | delay(); | ||
207 | } | ||
208 | |||
209 | void | ||
210 | sh7300se_outw(unsigned short value, unsigned long port) | ||
211 | { | ||
212 | struct iop *p = port2iop(port); | ||
213 | (p->outw) (p, value, port); | ||
214 | } | ||
215 | |||
216 | void | ||
217 | sh7300se_outl(unsigned int value, unsigned long port) | ||
218 | { | ||
219 | badio(outl, port); | ||
220 | } | ||
221 | |||
222 | void | ||
223 | sh7300se_insb(unsigned long port, void *addr, unsigned long count) | ||
224 | { | ||
225 | unsigned char *a = addr; | ||
226 | struct iop *p = port2iop(port); | ||
227 | while (count--) | ||
228 | *a++ = (p->inb) (p, port); | ||
229 | } | ||
230 | |||
231 | void | ||
232 | sh7300se_insw(unsigned long port, void *addr, unsigned long count) | ||
233 | { | ||
234 | unsigned short *a = addr; | ||
235 | struct iop *p = port2iop(port); | ||
236 | while (count--) | ||
237 | *a++ = (p->inw) (p, port); | ||
238 | } | ||
239 | |||
240 | void | ||
241 | sh7300se_insl(unsigned long port, void *addr, unsigned long count) | ||
242 | { | ||
243 | badio(insl, port); | ||
244 | } | ||
245 | |||
246 | void | ||
247 | sh7300se_outsb(unsigned long port, const void *addr, unsigned long count) | ||
248 | { | ||
249 | unsigned char *a = (unsigned char *) addr; | ||
250 | struct iop *p = port2iop(port); | ||
251 | while (count--) | ||
252 | (p->outb) (p, *a++, port); | ||
253 | } | ||
254 | |||
255 | void | ||
256 | sh7300se_outsw(unsigned long port, const void *addr, unsigned long count) | ||
257 | { | ||
258 | unsigned short *a = (unsigned short *) addr; | ||
259 | struct iop *p = port2iop(port); | ||
260 | while (count--) | ||
261 | (p->outw) (p, *a++, port); | ||
262 | } | ||
263 | |||
264 | void | ||
265 | sh7300se_outsl(unsigned long port, const void *addr, unsigned long count) | ||
266 | { | ||
267 | badio(outsw, port); | ||
268 | } | ||
diff --git a/arch/sh/boards/se/7300/irq.c b/arch/sh/boards/se/7300/irq.c deleted file mode 100644 index 1279d776d60f..000000000000 --- a/arch/sh/boards/se/7300/irq.c +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/sh/boards/se/7300/irq.c | ||
3 | * | ||
4 | * Copyright (C) 2003 Takashi Kusuda <kusuda-takashi@hitachi-ul.co.jp> | ||
5 | * | ||
6 | * SH-Mobile SolutionEngine 7300 Support. | ||
7 | * | ||
8 | */ | ||
9 | |||
10 | #include <linux/init.h> | ||
11 | #include <linux/irq.h> | ||
12 | #include <asm/irq.h> | ||
13 | #include <asm/io.h> | ||
14 | #include <asm/se7300.h> | ||
15 | |||
16 | static struct ipr_data se7300_ipr_map[] = { | ||
17 | /* PC_IRQ[0-3] -> IRQ0 (32) */ | ||
18 | { IRQ0_IRQ, IRQ0_IPR_ADDR, IRQ0_IPR_POS, 0x0f - IRQ0_IRQ }, | ||
19 | /* A_IRQ[0-3] -> IRQ1 (33) */ | ||
20 | { IRQ1_IRQ, IRQ1_IPR_ADDR, IRQ1_IPR_POS, 0x0f - IRQ1_IRQ }, | ||
21 | { SIOF0_IRQ, SIOF0_IPR_ADDR, SIOF0_IPR_POS, SIOF0_PRIORITY }, | ||
22 | { DMTE2_IRQ, DMA1_IPR_ADDR, DMA1_IPR_POS, DMA1_PRIORITY }, | ||
23 | { DMTE3_IRQ, DMA1_IPR_ADDR, DMA1_IPR_POS, DMA1_PRIORITY }, | ||
24 | { VIO_IRQ, VIO_IPR_ADDR, VIO_IPR_POS, VIO_PRIORITY }, | ||
25 | }; | ||
26 | |||
27 | /* | ||
28 | * Initialize IRQ setting | ||
29 | */ | ||
30 | void __init | ||
31 | init_7300se_IRQ(void) | ||
32 | { | ||
33 | ctrl_outw(0x0028, PA_EPLD_MODESET); /* mode set IRQ0,1 active low. */ | ||
34 | ctrl_outw(0xa000, INTC_ICR1); /* IRQ mode; IRQ0,1 enable. */ | ||
35 | ctrl_outw(0x0000, PORT_PFCR); /* use F for IRQ[3:0] and SIU. */ | ||
36 | |||
37 | make_ipr_irq(se7300_ipr_map, ARRAY_SIZE(se7300_ipr_map)); | ||
38 | |||
39 | ctrl_outw(0x2000, PA_MRSHPC + 0x0c); /* mrshpc irq enable */ | ||
40 | } | ||
diff --git a/arch/sh/boards/se/7300/setup.c b/arch/sh/boards/se/7300/setup.c deleted file mode 100644 index eb469f5b6e97..000000000000 --- a/arch/sh/boards/se/7300/setup.c +++ /dev/null | |||
@@ -1,74 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/sh/boards/se/7300/setup.c | ||
3 | * | ||
4 | * Copyright (C) 2003 Takashi Kusuda <kusuda-takashi@hitachi-ul.co.jp> | ||
5 | * | ||
6 | * SH-Mobile SolutionEngine 7300 Support. | ||
7 | * | ||
8 | */ | ||
9 | #include <linux/init.h> | ||
10 | #include <linux/platform_device.h> | ||
11 | #include <asm/machvec.h> | ||
12 | #include <asm/se7300.h> | ||
13 | |||
14 | void init_7300se_IRQ(void); | ||
15 | |||
16 | static unsigned char heartbeat_bit_pos[] = { 8, 9, 10, 11, 12, 13, 14, 15 }; | ||
17 | |||
18 | static struct resource heartbeat_resources[] = { | ||
19 | [0] = { | ||
20 | .start = PA_LED, | ||
21 | .end = PA_LED + ARRAY_SIZE(heartbeat_bit_pos) - 1, | ||
22 | .flags = IORESOURCE_MEM, | ||
23 | }, | ||
24 | }; | ||
25 | |||
26 | static struct platform_device heartbeat_device = { | ||
27 | .name = "heartbeat", | ||
28 | .id = -1, | ||
29 | .dev = { | ||
30 | .platform_data = heartbeat_bit_pos, | ||
31 | }, | ||
32 | .num_resources = ARRAY_SIZE(heartbeat_resources), | ||
33 | .resource = heartbeat_resources, | ||
34 | }; | ||
35 | |||
36 | static struct platform_device *se7300_devices[] __initdata = { | ||
37 | &heartbeat_device, | ||
38 | }; | ||
39 | |||
40 | static int __init se7300_devices_setup(void) | ||
41 | { | ||
42 | return platform_add_devices(se7300_devices, ARRAY_SIZE(se7300_devices)); | ||
43 | } | ||
44 | __initcall(se7300_devices_setup); | ||
45 | |||
46 | /* | ||
47 | * The Machine Vector | ||
48 | */ | ||
49 | static struct sh_machine_vector mv_7300se __initmv = { | ||
50 | .mv_name = "SolutionEngine 7300", | ||
51 | .mv_nr_irqs = 109, | ||
52 | .mv_inb = sh7300se_inb, | ||
53 | .mv_inw = sh7300se_inw, | ||
54 | .mv_inl = sh7300se_inl, | ||
55 | .mv_outb = sh7300se_outb, | ||
56 | .mv_outw = sh7300se_outw, | ||
57 | .mv_outl = sh7300se_outl, | ||
58 | |||
59 | .mv_inb_p = sh7300se_inb_p, | ||
60 | .mv_inw_p = sh7300se_inw, | ||
61 | .mv_inl_p = sh7300se_inl, | ||
62 | .mv_outb_p = sh7300se_outb_p, | ||
63 | .mv_outw_p = sh7300se_outw, | ||
64 | .mv_outl_p = sh7300se_outl, | ||
65 | |||
66 | .mv_insb = sh7300se_insb, | ||
67 | .mv_insw = sh7300se_insw, | ||
68 | .mv_insl = sh7300se_insl, | ||
69 | .mv_outsb = sh7300se_outsb, | ||
70 | .mv_outsw = sh7300se_outsw, | ||
71 | .mv_outsl = sh7300se_outsl, | ||
72 | |||
73 | .mv_init_irq = init_7300se_IRQ, | ||
74 | }; | ||