aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/boards/se
diff options
context:
space:
mode:
authorMagnus Damm <damm@igel.co.jp>2007-07-24 21:49:21 -0400
committerPaul Mundt <lethal@linux-sh.org>2007-07-24 21:49:21 -0400
commit870e8a24380cf1854dc1bb5fa5abebb44d82674b (patch)
tree67f5e33c93eefb862eb2be092044ca5b12c59193 /arch/sh/boards/se
parent347b9bdddbc38cfd46c27b3345e7facf651ecb92 (diff)
sh: remove support for sh73180 and solution engine 73180
This patch removes old dead code: - kill off sh73180 cpu support - get rid of broken solution engine 73180 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/73180/Makefile5
-rw-r--r--arch/sh/boards/se/73180/io.c268
-rw-r--r--arch/sh/boards/se/73180/irq.c136
-rw-r--r--arch/sh/boards/se/73180/setup.c75
4 files changed, 0 insertions, 484 deletions
diff --git a/arch/sh/boards/se/73180/Makefile b/arch/sh/boards/se/73180/Makefile
deleted file mode 100644
index e7c09967c529..000000000000
--- a/arch/sh/boards/se/73180/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
1#
2# Makefile for the 73180 SolutionEngine specific parts of the kernel
3#
4
5obj-y := setup.o io.o irq.o
diff --git a/arch/sh/boards/se/73180/io.c b/arch/sh/boards/se/73180/io.c
deleted file mode 100644
index 72715575458b..000000000000
--- a/arch/sh/boards/se/73180/io.c
+++ /dev/null
@@ -1,268 +0,0 @@
1/*
2 * arch/sh/boards/se/73180/io.c
3 *
4 * Copyright (C) 2003 YOSHII Takashi <yoshii-takashi@hitachi-ul.co.jp>
5 * Based on arch/sh/boards/se/7300/io.c
6 *
7 * I/O routine for SH-Mobile3 73180 SolutionEngine.
8 *
9 */
10
11#include <linux/kernel.h>
12#include <asm/mach/se73180.h>
13#include <asm/io.h>
14
15#define badio(fn, a) panic("bad i/o operation %s for %08lx.", #fn, a)
16
17struct 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
27struct iop *
28simple_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
36struct iop *
37ide_check(struct iop *p, unsigned long port)
38{
39 if (((0x1f0 <= port) && (port <= 0x1f7)) || (port == 0x3f7))
40 return p;
41 return NULL;
42}
43
44unsigned char
45simple_inb(struct iop *p, unsigned long port)
46{
47 return *(unsigned char *) (p->base + port);
48}
49
50unsigned short
51simple_inw(struct iop *p, unsigned long port)
52{
53 return *(unsigned short *) (p->base + port);
54}
55
56void
57simple_outb(struct iop *p, unsigned char value, unsigned long port)
58{
59 *(unsigned char *) (p->base + port) = value;
60}
61
62void
63simple_outw(struct iop *p, unsigned short value, unsigned long port)
64{
65 *(unsigned short *) (p->base + port) = value;
66}
67
68unsigned char
69pcc_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
80void
81pcc_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
90unsigned char
91bad_inb(struct iop *p, unsigned long port)
92{
93 badio(inb, port);
94}
95
96void
97bad_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 */
104static 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 */
117static 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 */
130static 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
140static __inline__ struct iop *
141port2iop(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
160static inline void
161delay(void)
162{
163 ctrl_inw(0xac000000);
164 ctrl_inw(0xac000000);
165}
166
167unsigned char
168sh73180se_inb(unsigned long port)
169{
170 struct iop *p = port2iop(port);
171 return (p->inb) (p, port);
172}
173
174unsigned char
175sh73180se_inb_p(unsigned long port)
176{
177 unsigned char v = sh73180se_inb(port);
178 delay();
179 return v;
180}
181
182unsigned short
183sh73180se_inw(unsigned long port)
184{
185 struct iop *p = port2iop(port);
186 return (p->inw) (p, port);
187}
188
189unsigned int
190sh73180se_inl(unsigned long port)
191{
192 badio(inl, port);
193}
194
195void
196sh73180se_outb(unsigned char value, unsigned long port)
197{
198 struct iop *p = port2iop(port);
199 (p->outb) (p, value, port);
200}
201
202void
203sh73180se_outb_p(unsigned char value, unsigned long port)
204{
205 sh73180se_outb(value, port);
206 delay();
207}
208
209void
210sh73180se_outw(unsigned short value, unsigned long port)
211{
212 struct iop *p = port2iop(port);
213 (p->outw) (p, value, port);
214}
215
216void
217sh73180se_outl(unsigned int value, unsigned long port)
218{
219 badio(outl, port);
220}
221
222void
223sh73180se_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
231void
232sh73180se_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
240void
241sh73180se_insl(unsigned long port, void *addr, unsigned long count)
242{
243 badio(insl, port);
244}
245
246void
247sh73180se_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
255void
256sh73180se_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
264void
265sh73180se_outsl(unsigned long port, const void *addr, unsigned long count)
266{
267 badio(outsw, port);
268}
diff --git a/arch/sh/boards/se/73180/irq.c b/arch/sh/boards/se/73180/irq.c
deleted file mode 100644
index e7200c56bb45..000000000000
--- a/arch/sh/boards/se/73180/irq.c
+++ /dev/null
@@ -1,136 +0,0 @@
1/*
2 * arch/sh/boards/se/73180/irq.c
3 *
4 * Copyright (C) 2003 Takashi Kusuda <kusuda-takashi@hitachi-ul.co.jp>
5 * Based on arch/sh/boards/se/7300/irq.c
6 *
7 * Modified for SH-Mobile SolutionEngine 73180 Support
8 * by YOSHII Takashi <yoshii-takashi@hitachi-ul.co.jp>
9 *
10 */
11
12#include <linux/init.h>
13#include <linux/irq.h>
14#include <asm/irq.h>
15#include <asm/io.h>
16#include <asm/mach/se73180.h>
17
18static int
19irq2intreq(int irq)
20{
21 if (irq == 10)
22 return 5;
23 return 7 - (irq - 32);
24}
25
26static void
27disable_intreq_irq(unsigned int irq)
28{
29 ctrl_outb(1 << (7 - irq2intreq(irq)), INTMSK0);
30}
31
32static void
33enable_intreq_irq(unsigned int irq)
34{
35 ctrl_outb(1 << (7 - irq2intreq(irq)), INTMSKCLR0);
36}
37
38static void
39mask_and_ack_intreq_irq(unsigned int irq)
40{
41 disable_intreq_irq(irq);
42}
43
44static unsigned int
45startup_intreq_irq(unsigned int irq)
46{
47 enable_intreq_irq(irq);
48 return 0;
49}
50
51static void
52shutdown_intreq_irq(unsigned int irq)
53{
54 disable_intreq_irq(irq);
55}
56
57static void
58end_intreq_irq(unsigned int irq)
59{
60 if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS)))
61 enable_intreq_irq(irq);
62}
63
64static struct hw_interrupt_type intreq_irq_type = {
65 .typename = "intreq",
66 .startup = startup_intreq_irq,
67 .shutdown = shutdown_intreq_irq,
68 .enable = enable_intreq_irq,
69 .disable = disable_intreq_irq,
70 .ack = mask_and_ack_intreq_irq,
71 .end = end_intreq_irq
72};
73
74void
75make_intreq_irq(unsigned int irq)
76{
77 disable_irq_nosync(irq);
78 irq_desc[irq].chip = &intreq_irq_type;
79 disable_intreq_irq(irq);
80}
81
82int
83shmse_irq_demux(int irq)
84{
85 if (irq == IRQ5_IRQ)
86 return 10;
87 return irq;
88}
89
90static struct ipr_data se73180_siof0_ipr_map[] = {
91 { SIOF0_IRQ, SIOF0_IPR_ADDR, SIOF0_IPR_POS, SIOF0_PRIORITY },
92};
93static struct ipr_data se73180_vpu_ipr_map[] = {
94 { VPU_IRQ, VPU_IPR_ADDR, VPU_IPR_POS, 8 },
95};
96static struct ipr_data se73180_other_ipr_map[] = {
97 { DMTE2_IRQ, DMA1_IPR_ADDR, DMA1_IPR_POS, DMA1_PRIORITY },
98 { DMTE3_IRQ, DMA1_IPR_ADDR, DMA1_IPR_POS, DMA1_PRIORITY },
99 { DMTE4_IRQ, DMA2_IPR_ADDR, DMA2_IPR_POS, DMA2_PRIORITY },
100 { IIC0_ALI_IRQ, IIC0_IPR_ADDR, IIC0_IPR_POS, IIC0_PRIORITY },
101 { IIC0_TACKI_IRQ, IIC0_IPR_ADDR, IIC0_IPR_POS, IIC0_PRIORITY },
102 { IIC0_WAITI_IRQ, IIC0_IPR_ADDR, IIC0_IPR_POS, IIC0_PRIORITY },
103 { IIC0_DTEI_IRQ, IIC0_IPR_ADDR, IIC0_IPR_POS, IIC0_PRIORITY },
104 { SIOF0_IRQ, SIOF0_IPR_ADDR, SIOF0_IPR_POS, SIOF0_PRIORITY },
105 { SIU_IRQ, SIU_IPR_ADDR, SIU_IPR_POS, SIU_PRIORITY },
106
107 /* VIO interrupt */
108 { CEU_IRQ, VIO_IPR_ADDR, VIO_IPR_POS, VIO_PRIORITY },
109 { BEU_IRQ, VIO_IPR_ADDR, VIO_IPR_POS, VIO_PRIORITY },
110 { VEU_IRQ, VIO_IPR_ADDR, VIO_IPR_POS, VIO_PRIORITY },
111
112 { LCDC_IRQ, LCDC_IPR_ADDR, LCDC_IPR_POS, LCDC_PRIORITY },
113};
114
115/*
116 * Initialize IRQ setting
117 */
118void __init
119init_73180se_IRQ(void)
120{
121 make_ipr_irq(se73180_siof0_ipr_map, ARRAY_SIZE(se73180_siof0_ipr_map));
122
123 ctrl_outw(0x2000, 0xb03fffec); /* mrshpc irq enable */
124 ctrl_outw(0x2000, 0xb07fffec); /* mrshpc irq enable */
125 ctrl_outl(3 << ((7 - 5) * 4), INTC_INTPRI0); /* irq5 pri=3 */
126 ctrl_outw(2 << ((7 - 5) * 2), INTC_ICR1); /* low-level irq */
127 make_intreq_irq(10);
128
129 make_ipr_irq(se73180_vpu_ipr_map, ARRAY_SIZE(se73180_vpu_ipr_map));
130
131 ctrl_outb(0x0f, INTC_IMCR5); /* enable SCIF IRQ */
132
133 make_ipr_irq(se73180_other_ipr_map, ARRAY_SIZE(se73180_other_ipr_map));
134
135 ctrl_outw(0x2000, PA_MRSHPC + 0x0c); /* mrshpc irq enable */
136}
diff --git a/arch/sh/boards/se/73180/setup.c b/arch/sh/boards/se/73180/setup.c
deleted file mode 100644
index 1deee8556642..000000000000
--- a/arch/sh/boards/se/73180/setup.c
+++ /dev/null
@@ -1,75 +0,0 @@
1/*
2 * arch/sh/boards/se/73180/setup.c
3 *
4 * Copyright (C) 2003 Takashi Kusuda <kusuda-takashi@hitachi-ul.co.jp>
5 * Based on arch/sh/setup_shmse.c
6 *
7 * Modified for 73180 SolutionEngine
8 * by YOSHII Takashi <yoshii-takashi@hitachi-ul.co.jp>
9 *
10 */
11
12#include <linux/init.h>
13#include <linux/platform_device.h>
14#include <asm/machvec.h>
15#include <asm/se73180.h>
16#include <asm/irq.h>
17
18void init_73180se_IRQ(void);
19
20static struct resource heartbeat_resources[] = {
21 [0] = {
22 .start = PA_LED,
23 .end = PA_LED + 8 - 1,
24 .flags = IORESOURCE_MEM,
25 },
26};
27
28static struct platform_device heartbeat_device = {
29 .name = "heartbeat",
30 .id = -1,
31 .num_resources = ARRAY_SIZE(heartbeat_resources),
32 .resource = heartbeat_resources,
33};
34
35static struct platform_device *se73180_devices[] __initdata = {
36 &heartbeat_device,
37};
38
39static int __init se73180_devices_setup(void)
40{
41 return platform_add_devices(se73180_devices,
42 ARRAY_SIZE(se73180_devices));
43}
44__initcall(se73180_devices_setup);
45
46/*
47 * The Machine Vector
48 */
49static struct sh_machine_vector mv_73180se __initmv = {
50 .mv_name = "SolutionEngine 73180",
51 .mv_nr_irqs = 108,
52 .mv_inb = sh73180se_inb,
53 .mv_inw = sh73180se_inw,
54 .mv_inl = sh73180se_inl,
55 .mv_outb = sh73180se_outb,
56 .mv_outw = sh73180se_outw,
57 .mv_outl = sh73180se_outl,
58
59 .mv_inb_p = sh73180se_inb_p,
60 .mv_inw_p = sh73180se_inw,
61 .mv_inl_p = sh73180se_inl,
62 .mv_outb_p = sh73180se_outb_p,
63 .mv_outw_p = sh73180se_outw,
64 .mv_outl_p = sh73180se_outl,
65
66 .mv_insb = sh73180se_insb,
67 .mv_insw = sh73180se_insw,
68 .mv_insl = sh73180se_insl,
69 .mv_outsb = sh73180se_outsb,
70 .mv_outsw = sh73180se_outsw,
71 .mv_outsl = sh73180se_outsl,
72
73 .mv_init_irq = init_73180se_IRQ,
74 .mv_irq_demux = shmse_irq_demux,
75};