aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2007-06-07 22:55:28 -0400
committerPaul Mundt <lethal@linux-sh.org>2007-06-07 22:55:28 -0400
commitb9601c5e59dd25693345558a301e833741bf5874 (patch)
tree992d8114b381354bc5e588766c065cc7728fe5df
parent33d63bd83bf9aa6b662a376a96b825acba721e8f (diff)
sh: Kill off dead SH7604 support.
This was added during 2.5.x, but was never moved along. This can easily be resurrected if someone has one they wish to work with, but it's not worth keeping around in its current form. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
-rw-r--r--arch/sh/Makefile1
-rw-r--r--arch/sh/boards/saturn/Makefile8
-rw-r--r--arch/sh/boards/saturn/io.c26
-rw-r--r--arch/sh/boards/saturn/irq.c118
-rw-r--r--arch/sh/boards/saturn/setup.c30
-rw-r--r--arch/sh/boards/saturn/smp.c68
-rw-r--r--arch/sh/kernel/cpu/sh2/probe.c10
-rw-r--r--arch/sh/kernel/setup.c2
-rw-r--r--arch/sh/mm/Kconfig4
-rw-r--r--arch/sh/tools/mach-types1
-rw-r--r--include/asm-sh/cpu-sh2/cache.h20
-rw-r--r--include/asm-sh/processor.h2
-rw-r--r--include/asm-sh/saturn/io.h19
-rw-r--r--include/asm-sh/saturn/smpc.h34
14 files changed, 5 insertions, 338 deletions
diff --git a/arch/sh/Makefile b/arch/sh/Makefile
index aa76167ceb48..6e1e17467a47 100644
--- a/arch/sh/Makefile
+++ b/arch/sh/Makefile
@@ -97,7 +97,6 @@ machdir-$(CONFIG_SH_7300_SOLUTION_ENGINE) += se/7300
97machdir-$(CONFIG_SH_7343_SOLUTION_ENGINE) += se/7343 97machdir-$(CONFIG_SH_7343_SOLUTION_ENGINE) += se/7343
98machdir-$(CONFIG_SH_73180_SOLUTION_ENGINE) += se/73180 98machdir-$(CONFIG_SH_73180_SOLUTION_ENGINE) += se/73180
99machdir-$(CONFIG_SH_HP6XX) += hp6xx 99machdir-$(CONFIG_SH_HP6XX) += hp6xx
100machdir-$(CONFIG_SH_SATURN) += saturn
101machdir-$(CONFIG_SH_DREAMCAST) += dreamcast 100machdir-$(CONFIG_SH_DREAMCAST) += dreamcast
102machdir-$(CONFIG_SH_MPC1211) += mpc1211 101machdir-$(CONFIG_SH_MPC1211) += mpc1211
103machdir-$(CONFIG_SH_SH03) += sh03 102machdir-$(CONFIG_SH_SH03) += sh03
diff --git a/arch/sh/boards/saturn/Makefile b/arch/sh/boards/saturn/Makefile
deleted file mode 100644
index 75a3042e252e..000000000000
--- a/arch/sh/boards/saturn/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
1#
2# Makefile for the Sega Saturn specific parts of the kernel
3#
4
5obj-y := setup.o io.o irq.o
6
7obj-$(CONFIG_SMP) += smp.o
8
diff --git a/arch/sh/boards/saturn/io.c b/arch/sh/boards/saturn/io.c
deleted file mode 100644
index c6e4f7f2e686..000000000000
--- a/arch/sh/boards/saturn/io.c
+++ /dev/null
@@ -1,26 +0,0 @@
1/*
2 * arch/sh/boards/saturn/io.c
3 *
4 * I/O routines for the Sega Saturn.
5 *
6 * Copyright (C) 2002 Paul Mundt
7 *
8 * Released under the terms of the GNU GPL v2.0.
9 */
10#include <asm/saturn/io.h>
11#include <asm/machvec.h>
12
13unsigned long saturn_isa_port2addr(unsigned long offset)
14{
15 return offset;
16}
17
18void *saturn_ioremap(unsigned long offset, unsigned long size)
19{
20 return (void *)offset;
21}
22
23void saturn_iounmap(void *addr)
24{
25}
26
diff --git a/arch/sh/boards/saturn/irq.c b/arch/sh/boards/saturn/irq.c
deleted file mode 100644
index 15d1d3f0f787..000000000000
--- a/arch/sh/boards/saturn/irq.c
+++ /dev/null
@@ -1,118 +0,0 @@
1/*
2 * arch/sh/boards/saturn/irq.c
3 *
4 * Copyright (C) 2002 Paul Mundt
5 *
6 * Released under the terms of the GNU GPL v2.0.
7 */
8#include <linux/kernel.h>
9#include <linux/init.h>
10#include <linux/interrupt.h>
11#include <asm/irq.h>
12#include <asm/io.h>
13
14/*
15 * Interrupts map out as follows:
16 *
17 * Vector Name Mask
18 *
19 * 64 VBLANKIN 0x0001
20 * 65 VBLANKOUT 0x0002
21 * 66 HBLANKIN 0x0004
22 * 67 TIMER0 0x0008
23 * 68 TIMER1 0x0010
24 * 69 DSPEND 0x0020
25 * 70 SOUNDREQUEST 0x0040
26 * 71 SYSTEMMANAGER 0x0080
27 * 72 PAD 0x0100
28 * 73 LEVEL2DMAEND 0x0200
29 * 74 LEVEL1DMAEND 0x0400
30 * 75 LEVEL0DMAEND 0x0800
31 * 76 DMAILLEGAL 0x1000
32 * 77 SRITEDRAWEND 0x2000
33 * 78 ABUS 0x8000
34 *
35 */
36#define SATURN_IRQ_MIN 64 /* VBLANKIN */
37#define SATURN_IRQ_MAX 78 /* ABUS */
38
39#define SATURN_IRQ_MASK 0xbfff
40
41static inline u32 saturn_irq_mask(unsigned int irq_nr)
42{
43 u32 mask;
44
45 mask = (1 << (irq_nr - SATURN_IRQ_MIN));
46 mask <<= (irq_nr == SATURN_IRQ_MAX);
47 mask &= SATURN_IRQ_MASK;
48
49 return mask;
50}
51
52static inline void mask_saturn_irq(unsigned int irq_nr)
53{
54 u32 mask;
55
56 mask = ctrl_inl(SATURN_IMR);
57 mask |= saturn_irq_mask(irq_nr);
58 ctrl_outl(mask, SATURN_IMR);
59}
60
61static inline void unmask_saturn_irq(unsigned int irq_nr)
62{
63 u32 mask;
64
65 mask = ctrl_inl(SATURN_IMR);
66 mask &= ~saturn_irq_mask(irq_nr);
67 ctrl_outl(mask, SATURN_IMR);
68}
69
70static void disable_saturn_irq(unsigned int irq_nr)
71{
72 mask_saturn_irq(irq_nr);
73}
74
75static void enable_saturn_irq(unsigned int irq_nr)
76{
77 unmask_saturn_irq(irq_nr);
78}
79
80static void mask_and_ack_saturn_irq(unsigned int irq_nr)
81{
82 mask_saturn_irq(irq_nr);
83}
84
85static void end_saturn_irq(unsigned int irq_nr)
86{
87 if (!(irq_desc[irq_nr].status & (IRQ_DISABLED | IRQ_INPROGRESS)))
88 unmask_saturn_irq(irq_nr);
89}
90
91static unsigned int startup_saturn_irq(unsigned int irq_nr)
92{
93 unmask_saturn_irq(irq_nr);
94
95 return 0;
96}
97
98static void shutdown_saturn_irq(unsigned int irq_nr)
99{
100 mask_saturn_irq(irq_nr);
101}
102
103static struct hw_interrupt_type saturn_int = {
104 .typename = "Saturn",
105 .enable = enable_saturn_irq,
106 .disable = disable_saturn_irq,
107 .ack = mask_and_ack_saturn_irq,
108 .end = end_saturn_irq,
109 .startup = startup_saturn_irq,
110 .shutdown = shutdown_saturn_irq,
111};
112
113int saturn_irq_demux(int irq_nr)
114{
115 /* FIXME */
116 return irq_nr;
117}
118
diff --git a/arch/sh/boards/saturn/setup.c b/arch/sh/boards/saturn/setup.c
deleted file mode 100644
index 7df4312fbb1f..000000000000
--- a/arch/sh/boards/saturn/setup.c
+++ /dev/null
@@ -1,30 +0,0 @@
1/*
2 * arch/sh/boards/saturn/setup.c
3 *
4 * Hardware support for the Sega Saturn.
5 *
6 * Copyright (c) 2002 Paul Mundt
7 *
8 * Released under the terms of the GNU GPL v2.0.
9 */
10#include <linux/kernel.h>
11#include <linux/init.h>
12#include <asm/io.h>
13#include <asm/machvec.h>
14#include <asm/mach/io.h>
15
16extern int saturn_irq_demux(int irq_nr);
17
18/*
19 * The Machine Vector
20 */
21static struct sh_machine_vector mv_saturn __initmv = {
22 .mv_name = "Sega Saturn",
23 .mv_nr_irqs = 80, /* Fix this later */
24
25 .mv_isa_port2addr = saturn_isa_port2addr,
26 .mv_irq_demux = saturn_irq_demux,
27
28 .mv_ioremap = saturn_ioremap,
29 .mv_iounmap = saturn_iounmap,
30};
diff --git a/arch/sh/boards/saturn/smp.c b/arch/sh/boards/saturn/smp.c
deleted file mode 100644
index 76460918c9cd..000000000000
--- a/arch/sh/boards/saturn/smp.c
+++ /dev/null
@@ -1,68 +0,0 @@
1/*
2 * arch/sh/boards/saturn/smp.c
3 *
4 * SMP support for the Sega Saturn.
5 *
6 * Copyright (c) 2002 Paul Mundt
7 *
8 * Released under the terms of the GNU GPL v2.0.
9 */
10#include <linux/kernel.h>
11#include <linux/init.h>
12#include <linux/smp.h>
13
14#include <asm/saturn/smpc.h>
15
16extern void start_secondary(void);
17
18void __smp_send_ipi(unsigned int cpu, unsigned int action)
19{
20 /* Nothing here yet .. */
21}
22
23unsigned int __smp_probe_cpus(void)
24{
25 /*
26 * This is just a straightforward master/slave configuration,
27 * and probing isn't really supported..
28 */
29 return 2;
30}
31
32/*
33 * We're only allowed to do byte-access to SMPC registers. In
34 * addition to which, we treat them as write-only, since
35 * reading from them will return undefined data.
36 */
37static inline void smpc_slave_stop(unsigned int cpu)
38{
39 smpc_barrier();
40 ctrl_outb(1, SMPC_STATUS);
41
42 ctrl_outb(SMPC_CMD_SSHOFF, SMPC_COMMAND);
43 smpc_barrier();
44}
45
46static inline void smpc_slave_start(unsigned int cpu)
47{
48 ctrl_outb(1, SMPC_STATUS);
49 ctrl_outb(SMPC_CMD_SSHON, SMPC_COMMAND);
50
51 smpc_barrier();
52}
53
54void __smp_slave_init(unsigned int cpu)
55{
56 register unsigned long vbr;
57 void **entry;
58
59 __asm__ __volatile__ ("stc vbr, %0\n\t" : "=r" (vbr));
60 entry = (void **)(vbr + 0x310 + 0x94);
61
62 smpc_slave_stop(cpu);
63
64 *(void **)entry = (void *)start_secondary;
65
66 smpc_slave_start(cpu);
67}
68
diff --git a/arch/sh/kernel/cpu/sh2/probe.c b/arch/sh/kernel/cpu/sh2/probe.c
index 108e81b682ed..74765ae42929 100644
--- a/arch/sh/kernel/cpu/sh2/probe.c
+++ b/arch/sh/kernel/cpu/sh2/probe.c
@@ -17,15 +17,7 @@
17 17
18int __init detect_cpu_and_cache_system(void) 18int __init detect_cpu_and_cache_system(void)
19{ 19{
20#if defined(CONFIG_CPU_SUBTYPE_SH7604) 20#if defined(CONFIG_CPU_SUBTYPE_SH7619)
21 current_cpu_data.type = CPU_SH7604;
22 current_cpu_data.dcache.ways = 4;
23 current_cpu_data.dcache.way_incr = (1<<10);
24 current_cpu_data.dcache.sets = 64;
25 current_cpu_data.dcache.entry_shift = 4;
26 current_cpu_data.dcache.linesz = L1_CACHE_BYTES;
27 current_cpu_data.dcache.flags = 0;
28#elif defined(CONFIG_CPU_SUBTYPE_SH7619)
29 current_cpu_data.type = CPU_SH7619; 21 current_cpu_data.type = CPU_SH7619;
30 current_cpu_data.dcache.ways = 4; 22 current_cpu_data.dcache.ways = 4;
31 current_cpu_data.dcache.way_incr = (1<<12); 23 current_cpu_data.dcache.way_incr = (1<<12);
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c
index c2c6bfdf4dfe..765f83c1bca4 100644
--- a/arch/sh/kernel/setup.c
+++ b/arch/sh/kernel/setup.c
@@ -271,7 +271,7 @@ void __init setup_arch(char **cmdline_p)
271 271
272static const char *cpu_name[] = { 272static const char *cpu_name[] = {
273 [CPU_SH7206] = "SH7206", [CPU_SH7619] = "SH7619", 273 [CPU_SH7206] = "SH7206", [CPU_SH7619] = "SH7619",
274 [CPU_SH7604] = "SH7604", [CPU_SH7300] = "SH7300", 274 [CPU_SH7300] = "SH7300",
275 [CPU_SH7705] = "SH7705", [CPU_SH7706] = "SH7706", 275 [CPU_SH7705] = "SH7705", [CPU_SH7706] = "SH7706",
276 [CPU_SH7707] = "SH7707", [CPU_SH7708] = "SH7708", 276 [CPU_SH7707] = "SH7707", [CPU_SH7708] = "SH7708",
277 [CPU_SH7709] = "SH7709", [CPU_SH7710] = "SH7710", 277 [CPU_SH7709] = "SH7709", [CPU_SH7710] = "SH7710",
diff --git a/arch/sh/mm/Kconfig b/arch/sh/mm/Kconfig
index 0c24abdd4ea1..b013a05fbc51 100644
--- a/arch/sh/mm/Kconfig
+++ b/arch/sh/mm/Kconfig
@@ -45,10 +45,6 @@ choice
45 45
46# SH-2 Processor Support 46# SH-2 Processor Support
47 47
48config CPU_SUBTYPE_SH7604
49 bool "Support SH7604 processor"
50 select CPU_SH2
51
52config CPU_SUBTYPE_SH7619 48config CPU_SUBTYPE_SH7619
53 bool "Support SH7619 processor" 49 bool "Support SH7619 processor"
54 select CPU_SH2 50 select CPU_SH2
diff --git a/arch/sh/tools/mach-types b/arch/sh/tools/mach-types
index 8ae43f8c085c..4b5e9305092e 100644
--- a/arch/sh/tools/mach-types
+++ b/arch/sh/tools/mach-types
@@ -18,7 +18,6 @@ SE SH_SOLUTION_ENGINE
18HP6XX SH_HP6XX 18HP6XX SH_HP6XX
19HD64461 HD64461 19HD64461 HD64461
20HD64465 HD64465 20HD64465 HD64465
21SATURN SH_SATURN
22DREAMCAST SH_DREAMCAST 21DREAMCAST SH_DREAMCAST
23MPC1211 SH_MPC1211 22MPC1211 SH_MPC1211
24SNAPGEAR SH_SECUREEDGE5410 23SNAPGEAR SH_SECUREEDGE5410
diff --git a/include/asm-sh/cpu-sh2/cache.h b/include/asm-sh/cpu-sh2/cache.h
index 20b9796842dc..f02ba7a672b2 100644
--- a/include/asm-sh/cpu-sh2/cache.h
+++ b/include/asm-sh/cpu-sh2/cache.h
@@ -12,23 +12,7 @@
12 12
13#define L1_CACHE_SHIFT 4 13#define L1_CACHE_SHIFT 4
14 14
15#if defined(CONFIG_CPU_SUBTYPE_SH7604) 15#if defined(CONFIG_CPU_SUBTYPE_SH7619)
16#define CCR 0xfffffe92 /* Address of Cache Control Register */
17
18#define CCR_CACHE_CE 0x01 /* Cache enable */
19#define CCR_CACHE_ID 0x02 /* Instruction Replacement disable */
20#define CCR_CACHE_OD 0x04 /* Data Replacement disable */
21#define CCR_CACHE_TW 0x08 /* Two-way mode */
22#define CCR_CACHE_CP 0x10 /* Cache purge */
23
24#define CACHE_OC_ADDRESS_ARRAY 0x60000000
25
26#define CCR_CACHE_ENABLE CCR_CACHE_CE
27#define CCR_CACHE_INVALIDATE CCR_CACHE_CP
28#define CCR_CACHE_ORA CCR_CACHE_TW
29#define CCR_CACHE_WT 0x00 /* SH-2 is _always_ write-through */
30
31#elif defined(CONFIG_CPU_SUBTYPE_SH7619)
32#define CCR1 0xffffffec 16#define CCR1 0xffffffec
33#define CCR CCR1 17#define CCR CCR1
34 18
@@ -49,5 +33,5 @@
49#define CCR_CACHE_ENABLE CCR_CACHE_CE 33#define CCR_CACHE_ENABLE CCR_CACHE_CE
50#define CCR_CACHE_INVALIDATE CCR_CACHE_CF 34#define CCR_CACHE_INVALIDATE CCR_CACHE_CF
51#endif 35#endif
52#endif /* __ASM_CPU_SH2_CACHE_H */
53 36
37#endif /* __ASM_CPU_SH2_CACHE_H */
diff --git a/include/asm-sh/processor.h b/include/asm-sh/processor.h
index d42f68e724fa..1fc5eed1b22a 100644
--- a/include/asm-sh/processor.h
+++ b/include/asm-sh/processor.h
@@ -36,7 +36,7 @@
36 */ 36 */
37enum cpu_type { 37enum cpu_type {
38 /* SH-2 types */ 38 /* SH-2 types */
39 CPU_SH7604, CPU_SH7619, 39 CPU_SH7619,
40 40
41 /* SH-2A types */ 41 /* SH-2A types */
42 CPU_SH7206, 42 CPU_SH7206,
diff --git a/include/asm-sh/saturn/io.h b/include/asm-sh/saturn/io.h
deleted file mode 100644
index f1b9b5d633f4..000000000000
--- a/include/asm-sh/saturn/io.h
+++ /dev/null
@@ -1,19 +0,0 @@
1/*
2 * include/asm-sh/saturn/io.h
3 *
4 * I/O functions for use on the Sega Saturn.
5 *
6 * Copyright (C) 2002 Paul Mundt
7 *
8 * Released under the terms of the GNU GPL v2.0.
9 */
10#ifndef __ASM_SH_SATURN_IO_H
11#define __ASM_SH_SATURN_IO_H
12
13/* arch/sh/boards/saturn/io.c */
14extern unsigned long saturn_isa_port2addr(unsigned long offset);
15extern void *saturn_ioremap(unsigned long offset, unsigned long size);
16extern void saturn_iounmap(void *addr);
17
18#endif /* __ASM_SH_SATURN_IO_H */
19
diff --git a/include/asm-sh/saturn/smpc.h b/include/asm-sh/saturn/smpc.h
deleted file mode 100644
index 5de5c12d6347..000000000000
--- a/include/asm-sh/saturn/smpc.h
+++ /dev/null
@@ -1,34 +0,0 @@
1/*
2 * include/asm-sh/saturn/smpc.h
3 *
4 * System Manager / Peripheral Control definitions.
5 *
6 * Copyright (C) 2002 Paul Mundt
7 *
8 * Released under the terms of the GNU GPL v2.0.
9 */
10#ifndef __ASM_SH_SATURN_SMPC_H
11#define __ASM_SH_SATURN_SMPC_H
12
13#include <asm/io.h>
14
15#define SMPC_COMMAND 0x2010001f /* SMPC command register */
16#define SMPC_RESULT 0x2010005f /* SMPC result register */
17#define SMPC_STATUS 0x20100063 /* SMPC status register */
18
19#define SMPC_CMD_MSHON 0x0001 /* Master SH On */
20#define SMPC_CMD_SSHON 0x0002 /* Slave SH On */
21#define SMPC_CMD_SSHOFF 0x0003 /* Slave SH Off */
22#define SMPC_CMD_SNDON 0x0004 /* Sound On */
23#define SMPC_CMD_SNDOFF 0x0005 /* Sound Off */
24#define SMPC_CMD_CDON 0x0006 /* CD On */
25#define SMPC_CMD_CDOFF 0x0007 /* CD Off */
26
27static inline void smpc_barrier(void)
28{
29 while ((ctrl_inb(SMPC_STATUS) & 0x0001) == 0x0001)
30 ;
31}
32
33#endif /* __ASM_SH_SATURN_SMPC_H */
34