diff options
Diffstat (limited to 'arch/sh/kernel')
-rw-r--r-- | arch/sh/kernel/cpu/irq/Makefile | 1 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/irq/ipr.c | 2 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/irq/pint.c | 220 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh3/Makefile | 4 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh3/clock-sh7710.c (renamed from arch/sh/kernel/cpu/sh3/clock-sh7300.c) | 26 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh3/setup-sh7300.c | 43 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh4/probe.c | 6 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh4/sq.c | 18 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh4a/Makefile | 2 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh4a/clock-sh73180.c | 81 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh4a/setup-sh73180.c | 43 | ||||
-rw-r--r-- | arch/sh/kernel/init_task.c | 2 | ||||
-rw-r--r-- | arch/sh/kernel/process.c | 7 | ||||
-rw-r--r-- | arch/sh/kernel/setup.c | 3 | ||||
-rw-r--r-- | arch/sh/kernel/sys_sh.c | 1 | ||||
-rw-r--r-- | arch/sh/kernel/timers/timer-tmu.c | 3 | ||||
-rw-r--r-- | arch/sh/kernel/vsyscall/vsyscall.c | 1 |
17 files changed, 37 insertions, 426 deletions
diff --git a/arch/sh/kernel/cpu/irq/Makefile b/arch/sh/kernel/cpu/irq/Makefile index 9ddb446ac930..60bfc05cf354 100644 --- a/arch/sh/kernel/cpu/irq/Makefile +++ b/arch/sh/kernel/cpu/irq/Makefile | |||
@@ -4,7 +4,6 @@ | |||
4 | obj-y += imask.o | 4 | obj-y += imask.o |
5 | 5 | ||
6 | obj-$(CONFIG_CPU_HAS_IPR_IRQ) += ipr.o | 6 | obj-$(CONFIG_CPU_HAS_IPR_IRQ) += ipr.o |
7 | obj-$(CONFIG_CPU_HAS_PINT_IRQ) += pint.o | ||
8 | obj-$(CONFIG_CPU_HAS_MASKREG_IRQ) += maskreg.o | 7 | obj-$(CONFIG_CPU_HAS_MASKREG_IRQ) += maskreg.o |
9 | obj-$(CONFIG_CPU_HAS_INTC_IRQ) += intc.o | 8 | obj-$(CONFIG_CPU_HAS_INTC_IRQ) += intc.o |
10 | obj-$(CONFIG_CPU_HAS_INTC2_IRQ) += intc2.o | 9 | obj-$(CONFIG_CPU_HAS_INTC2_IRQ) += intc2.o |
diff --git a/arch/sh/kernel/cpu/irq/ipr.c b/arch/sh/kernel/cpu/irq/ipr.c index 98e84f40c713..5da325414880 100644 --- a/arch/sh/kernel/cpu/irq/ipr.c +++ b/arch/sh/kernel/cpu/irq/ipr.c | |||
@@ -8,7 +8,7 @@ | |||
8 | * | 8 | * |
9 | * Supported system: | 9 | * Supported system: |
10 | * On-chip supporting modules (TMU, RTC, etc.). | 10 | * On-chip supporting modules (TMU, RTC, etc.). |
11 | * On-chip supporting modules for SH7709/SH7709A/SH7729/SH7300. | 11 | * On-chip supporting modules for SH7709/SH7709A/SH7729. |
12 | * Hitachi SolutionEngine external I/O: | 12 | * Hitachi SolutionEngine external I/O: |
13 | * MS7709SE01, MS7709ASE01, and MS7750SE01 | 13 | * MS7709SE01, MS7709ASE01, and MS7750SE01 |
14 | * | 14 | * |
diff --git a/arch/sh/kernel/cpu/irq/pint.c b/arch/sh/kernel/cpu/irq/pint.c deleted file mode 100644 index 67602685df1a..000000000000 --- a/arch/sh/kernel/cpu/irq/pint.c +++ /dev/null | |||
@@ -1,220 +0,0 @@ | |||
1 | /* | ||
2 | * arch/sh/kernel/cpu/irq/pint.c - Interrupt handling for PINT-based IRQs. | ||
3 | * | ||
4 | * Copyright (C) 1999 Niibe Yutaka & Takeshi Yaegashi | ||
5 | * Copyright (C) 2000 Kazumoto Kojima | ||
6 | * Copyright (C) 2003 Takashi Kusuda <kusuda-takashi@hitachi-ul.co.jp> | ||
7 | * | ||
8 | * This file is subject to the terms and conditions of the GNU General Public | ||
9 | * License. See the file "COPYING" in the main directory of this archive | ||
10 | * for more details. | ||
11 | */ | ||
12 | |||
13 | #include <linux/init.h> | ||
14 | #include <linux/irq.h> | ||
15 | #include <linux/module.h> | ||
16 | |||
17 | #include <asm/system.h> | ||
18 | #include <asm/io.h> | ||
19 | #include <asm/machvec.h> | ||
20 | |||
21 | #if defined(CONFIG_CPU_SUBTYPE_SH7705) | ||
22 | #define INTC_INTER 0xA4000014UL | ||
23 | #define INTC_IPRD 0xA4000018UL | ||
24 | #define INTC_ICR2 0xA4000012UL | ||
25 | |||
26 | /* PFC */ | ||
27 | #define PORT_PACR 0xA4000100UL | ||
28 | #define PORT_PBCR 0xA4000102UL | ||
29 | #define PORT_PCCR 0xA4000104UL | ||
30 | #define PORT_PDCR 0xA4000106UL | ||
31 | #define PORT_PECR 0xA4000108UL | ||
32 | #define PORT_PFCR 0xA400010AUL | ||
33 | #define PORT_PGCR 0xA400010CUL | ||
34 | #define PORT_PHCR 0xA400010EUL | ||
35 | #define PORT_PJCR 0xA4000110UL | ||
36 | #define PORT_PKCR 0xA4000112UL | ||
37 | #define PORT_PLCR 0xA4000114UL | ||
38 | #define PORT_PMCR 0xA4000118UL | ||
39 | #define PORT_PNCR 0xA400011AUL | ||
40 | #define PORT_PECR2 0xA4050148UL | ||
41 | #define PORT_PFCR2 0xA405014AUL | ||
42 | #define PORT_PNCR2 0xA405015AUL | ||
43 | |||
44 | /* I/O port */ | ||
45 | #define PORT_PADR 0xA4000120UL | ||
46 | #define PORT_PBDR 0xA4000122UL | ||
47 | #define PORT_PCDR 0xA4000124UL | ||
48 | #define PORT_PDDR 0xA4000126UL | ||
49 | #define PORT_PEDR 0xA4000128UL | ||
50 | #define PORT_PFDR 0xA400012AUL | ||
51 | #define PORT_PGDR 0xA400012CUL | ||
52 | #define PORT_PHDR 0xA400012EUL | ||
53 | #define PORT_PJDR 0xA4000130UL | ||
54 | #define PORT_PKDR 0xA4000132UL | ||
55 | #define PORT_PLDR 0xA4000134UL | ||
56 | #define PORT_PMDR 0xA4000138UL | ||
57 | #define PORT_PNDR 0xA400013AUL | ||
58 | |||
59 | #define PINT0_IRQ 40 | ||
60 | #define PINT8_IRQ 41 | ||
61 | #define PINT_IRQ_BASE 86 | ||
62 | |||
63 | #define PINT0_IPR_ADDR INTC_IPRD | ||
64 | #define PINT0_IPR_POS 3 | ||
65 | #define PINT0_PRIORITY 2 | ||
66 | |||
67 | #define PINT8_IPR_ADDR INTC_IPRD | ||
68 | #define PINT8_IPR_POS 2 | ||
69 | #define PINT8_PRIORITY 2 | ||
70 | |||
71 | #endif /* CONFIG_CPU_SUBTYPE_SH7705 */ | ||
72 | |||
73 | static unsigned char pint_map[256]; | ||
74 | static unsigned long portcr_mask; | ||
75 | |||
76 | static void enable_pint_irq(unsigned int irq); | ||
77 | static void disable_pint_irq(unsigned int irq); | ||
78 | |||
79 | /* shutdown is same as "disable" */ | ||
80 | #define shutdown_pint_irq disable_pint_irq | ||
81 | |||
82 | static void mask_and_ack_pint(unsigned int); | ||
83 | static void end_pint_irq(unsigned int irq); | ||
84 | |||
85 | static unsigned int startup_pint_irq(unsigned int irq) | ||
86 | { | ||
87 | enable_pint_irq(irq); | ||
88 | return 0; /* never anything pending */ | ||
89 | } | ||
90 | |||
91 | static struct hw_interrupt_type pint_irq_type = { | ||
92 | .typename = "PINT-IRQ", | ||
93 | .startup = startup_pint_irq, | ||
94 | .shutdown = shutdown_pint_irq, | ||
95 | .enable = enable_pint_irq, | ||
96 | .disable = disable_pint_irq, | ||
97 | .ack = mask_and_ack_pint, | ||
98 | .end = end_pint_irq | ||
99 | }; | ||
100 | |||
101 | static void disable_pint_irq(unsigned int irq) | ||
102 | { | ||
103 | unsigned long val; | ||
104 | |||
105 | val = ctrl_inw(INTC_INTER); | ||
106 | val &= ~(1 << (irq - PINT_IRQ_BASE)); | ||
107 | ctrl_outw(val, INTC_INTER); /* disable PINTn */ | ||
108 | portcr_mask &= ~(3 << (irq - PINT_IRQ_BASE)*2); | ||
109 | } | ||
110 | |||
111 | static void enable_pint_irq(unsigned int irq) | ||
112 | { | ||
113 | unsigned long val; | ||
114 | |||
115 | val = ctrl_inw(INTC_INTER); | ||
116 | val |= 1 << (irq - PINT_IRQ_BASE); | ||
117 | ctrl_outw(val, INTC_INTER); /* enable PINTn */ | ||
118 | portcr_mask |= 3 << (irq - PINT_IRQ_BASE)*2; | ||
119 | } | ||
120 | |||
121 | static void mask_and_ack_pint(unsigned int irq) | ||
122 | { | ||
123 | disable_pint_irq(irq); | ||
124 | } | ||
125 | |||
126 | static void end_pint_irq(unsigned int irq) | ||
127 | { | ||
128 | if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) | ||
129 | enable_pint_irq(irq); | ||
130 | } | ||
131 | |||
132 | void make_pint_irq(unsigned int irq) | ||
133 | { | ||
134 | disable_irq_nosync(irq); | ||
135 | irq_desc[irq].chip = &pint_irq_type; | ||
136 | disable_pint_irq(irq); | ||
137 | } | ||
138 | |||
139 | static struct ipr_data pint_ipr_map[] = { | ||
140 | { PINT0_IRQ, PINT0_IPR_ADDR, PINT0_IPR_POS, PINT0_PRIORITY }, | ||
141 | { PINT8_IRQ, PINT8_IPR_ADDR, PINT8_IPR_POS, PINT8_PRIORITY }, | ||
142 | }; | ||
143 | |||
144 | void __init init_IRQ_pint(void) | ||
145 | { | ||
146 | int i; | ||
147 | |||
148 | make_ipr_irq(pint_ipr_map, ARRAY_SIZE(pint_ipr_map)); | ||
149 | |||
150 | enable_irq(PINT0_IRQ); | ||
151 | enable_irq(PINT8_IRQ); | ||
152 | |||
153 | for(i = 0; i < 16; i++) | ||
154 | make_pint_irq(PINT_IRQ_BASE + i); | ||
155 | |||
156 | for(i = 0; i < 256; i++) { | ||
157 | if (i & 1) | ||
158 | pint_map[i] = 0; | ||
159 | else if (i & 2) | ||
160 | pint_map[i] = 1; | ||
161 | else if (i & 4) | ||
162 | pint_map[i] = 2; | ||
163 | else if (i & 8) | ||
164 | pint_map[i] = 3; | ||
165 | else if (i & 0x10) | ||
166 | pint_map[i] = 4; | ||
167 | else if (i & 0x20) | ||
168 | pint_map[i] = 5; | ||
169 | else if (i & 0x40) | ||
170 | pint_map[i] = 6; | ||
171 | else if (i & 0x80) | ||
172 | pint_map[i] = 7; | ||
173 | } | ||
174 | } | ||
175 | |||
176 | int ipr_irq_demux(int irq) | ||
177 | { | ||
178 | unsigned long creg, dreg, d, sav; | ||
179 | |||
180 | if (irq == PINT0_IRQ) { | ||
181 | #if defined(CONFIG_CPU_SUBTYPE_SH7705) || defined(CONFIG_CPU_SUBTYPE_SH7707) | ||
182 | creg = PORT_PACR; | ||
183 | dreg = PORT_PADR; | ||
184 | #else | ||
185 | creg = PORT_PCCR; | ||
186 | dreg = PORT_PCDR; | ||
187 | #endif | ||
188 | sav = ctrl_inw(creg); | ||
189 | ctrl_outw(sav | portcr_mask, creg); | ||
190 | d = (~ctrl_inb(dreg) ^ ctrl_inw(INTC_ICR2)) & | ||
191 | ctrl_inw(INTC_INTER) & 0xff; | ||
192 | ctrl_outw(sav, creg); | ||
193 | |||
194 | if (d == 0) | ||
195 | return irq; | ||
196 | |||
197 | return PINT_IRQ_BASE + pint_map[d]; | ||
198 | } else if (irq == PINT8_IRQ) { | ||
199 | #if defined(CONFIG_CPU_SUBTYPE_SH7705) || defined(CONFIG_CPU_SUBTYPE_SH7707) | ||
200 | creg = PORT_PBCR; | ||
201 | dreg = PORT_PBDR; | ||
202 | #else | ||
203 | creg = PORT_PFCR; | ||
204 | dreg = PORT_PFDR; | ||
205 | #endif | ||
206 | sav = ctrl_inw(creg); | ||
207 | ctrl_outw(sav | (portcr_mask >> 16), creg); | ||
208 | d = (~ctrl_inb(dreg) ^ (ctrl_inw(INTC_ICR2) >> 8)) & | ||
209 | (ctrl_inw(INTC_INTER) >> 8) & 0xff; | ||
210 | ctrl_outw(sav, creg); | ||
211 | |||
212 | if (d == 0) | ||
213 | return irq; | ||
214 | |||
215 | return PINT_IRQ_BASE + 8 + pint_map[d]; | ||
216 | } | ||
217 | |||
218 | return irq; | ||
219 | } | ||
220 | |||
diff --git a/arch/sh/kernel/cpu/sh3/Makefile b/arch/sh/kernel/cpu/sh3/Makefile index 09faa056cd43..55b750763f66 100644 --- a/arch/sh/kernel/cpu/sh3/Makefile +++ b/arch/sh/kernel/cpu/sh3/Makefile | |||
@@ -10,16 +10,14 @@ obj-$(CONFIG_CPU_SUBTYPE_SH7706) += setup-sh7709.o | |||
10 | obj-$(CONFIG_CPU_SUBTYPE_SH7707) += setup-sh7709.o | 10 | obj-$(CONFIG_CPU_SUBTYPE_SH7707) += setup-sh7709.o |
11 | obj-$(CONFIG_CPU_SUBTYPE_SH7708) += setup-sh7708.o | 11 | obj-$(CONFIG_CPU_SUBTYPE_SH7708) += setup-sh7708.o |
12 | obj-$(CONFIG_CPU_SUBTYPE_SH7709) += setup-sh7709.o | 12 | obj-$(CONFIG_CPU_SUBTYPE_SH7709) += setup-sh7709.o |
13 | obj-$(CONFIG_CPU_SUBTYPE_SH7300) += setup-sh7300.o | ||
14 | obj-$(CONFIG_CPU_SUBTYPE_SH7710) += setup-sh7710.o | 13 | obj-$(CONFIG_CPU_SUBTYPE_SH7710) += setup-sh7710.o |
15 | obj-$(CONFIG_CPU_SUBTYPE_SH7712) += setup-sh7710.o | 14 | obj-$(CONFIG_CPU_SUBTYPE_SH7712) += setup-sh7710.o |
16 | 15 | ||
17 | # Primary on-chip clocks (common) | 16 | # Primary on-chip clocks (common) |
18 | clock-$(CONFIG_CPU_SH3) := clock-sh3.o | 17 | clock-$(CONFIG_CPU_SH3) := clock-sh3.o |
19 | clock-$(CONFIG_CPU_SUBTYPE_SH7300) := clock-sh7300.o | ||
20 | clock-$(CONFIG_CPU_SUBTYPE_SH7705) := clock-sh7705.o | 18 | clock-$(CONFIG_CPU_SUBTYPE_SH7705) := clock-sh7705.o |
21 | clock-$(CONFIG_CPU_SUBTYPE_SH7706) := clock-sh7706.o | 19 | clock-$(CONFIG_CPU_SUBTYPE_SH7706) := clock-sh7706.o |
22 | clock-$(CONFIG_CPU_SUBTYPE_SH7709) := clock-sh7709.o | 20 | clock-$(CONFIG_CPU_SUBTYPE_SH7709) := clock-sh7709.o |
23 | clock-$(CONFIG_CPU_SUBTYPE_SH7710) := clock-sh7300.o | 21 | clock-$(CONFIG_CPU_SUBTYPE_SH7710) := clock-sh7710.o |
24 | 22 | ||
25 | obj-y += $(clock-y) | 23 | obj-y += $(clock-y) |
diff --git a/arch/sh/kernel/cpu/sh3/clock-sh7300.c b/arch/sh/kernel/cpu/sh3/clock-sh7710.c index e804174b9625..4744c50ec449 100644 --- a/arch/sh/kernel/cpu/sh3/clock-sh7300.c +++ b/arch/sh/kernel/cpu/sh3/clock-sh7710.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * arch/sh/kernel/cpu/sh3/clock-sh7300.c | 2 | * arch/sh/kernel/cpu/sh3/clock-sh7710.c |
3 | * | 3 | * |
4 | * SH7300 support for the clock framework | 4 | * SH7710 support for the clock framework |
5 | * | 5 | * |
6 | * Copyright (C) 2005 Paul Mundt | 6 | * Copyright (C) 2005 Paul Mundt |
7 | * | 7 | * |
@@ -29,7 +29,7 @@ static void master_clk_init(struct clk *clk) | |||
29 | clk->rate *= md_table[ctrl_inw(FRQCR) & 0x0007]; | 29 | clk->rate *= md_table[ctrl_inw(FRQCR) & 0x0007]; |
30 | } | 30 | } |
31 | 31 | ||
32 | static struct clk_ops sh7300_master_clk_ops = { | 32 | static struct clk_ops sh7710_master_clk_ops = { |
33 | .init = master_clk_init, | 33 | .init = master_clk_init, |
34 | }; | 34 | }; |
35 | 35 | ||
@@ -39,7 +39,7 @@ static void module_clk_recalc(struct clk *clk) | |||
39 | clk->rate = clk->parent->rate / md_table[idx]; | 39 | clk->rate = clk->parent->rate / md_table[idx]; |
40 | } | 40 | } |
41 | 41 | ||
42 | static struct clk_ops sh7300_module_clk_ops = { | 42 | static struct clk_ops sh7710_module_clk_ops = { |
43 | .recalc = module_clk_recalc, | 43 | .recalc = module_clk_recalc, |
44 | }; | 44 | }; |
45 | 45 | ||
@@ -49,7 +49,7 @@ static void bus_clk_recalc(struct clk *clk) | |||
49 | clk->rate = clk->parent->rate / md_table[idx]; | 49 | clk->rate = clk->parent->rate / md_table[idx]; |
50 | } | 50 | } |
51 | 51 | ||
52 | static struct clk_ops sh7300_bus_clk_ops = { | 52 | static struct clk_ops sh7710_bus_clk_ops = { |
53 | .recalc = bus_clk_recalc, | 53 | .recalc = bus_clk_recalc, |
54 | }; | 54 | }; |
55 | 55 | ||
@@ -59,20 +59,20 @@ static void cpu_clk_recalc(struct clk *clk) | |||
59 | clk->rate = clk->parent->rate / md_table[idx]; | 59 | clk->rate = clk->parent->rate / md_table[idx]; |
60 | } | 60 | } |
61 | 61 | ||
62 | static struct clk_ops sh7300_cpu_clk_ops = { | 62 | static struct clk_ops sh7710_cpu_clk_ops = { |
63 | .recalc = cpu_clk_recalc, | 63 | .recalc = cpu_clk_recalc, |
64 | }; | 64 | }; |
65 | 65 | ||
66 | static struct clk_ops *sh7300_clk_ops[] = { | 66 | static struct clk_ops *sh7710_clk_ops[] = { |
67 | &sh7300_master_clk_ops, | 67 | &sh7710_master_clk_ops, |
68 | &sh7300_module_clk_ops, | 68 | &sh7710_module_clk_ops, |
69 | &sh7300_bus_clk_ops, | 69 | &sh7710_bus_clk_ops, |
70 | &sh7300_cpu_clk_ops, | 70 | &sh7710_cpu_clk_ops, |
71 | }; | 71 | }; |
72 | 72 | ||
73 | void __init arch_init_clk_ops(struct clk_ops **ops, int idx) | 73 | void __init arch_init_clk_ops(struct clk_ops **ops, int idx) |
74 | { | 74 | { |
75 | if (idx < ARRAY_SIZE(sh7300_clk_ops)) | 75 | if (idx < ARRAY_SIZE(sh7710_clk_ops)) |
76 | *ops = sh7300_clk_ops[idx]; | 76 | *ops = sh7710_clk_ops[idx]; |
77 | } | 77 | } |
78 | 78 | ||
diff --git a/arch/sh/kernel/cpu/sh3/setup-sh7300.c b/arch/sh/kernel/cpu/sh3/setup-sh7300.c deleted file mode 100644 index ab4d204bfba5..000000000000 --- a/arch/sh/kernel/cpu/sh3/setup-sh7300.c +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | /* | ||
2 | * SH7300 Setup | ||
3 | * | ||
4 | * Copyright (C) 2006 Paul Mundt | ||
5 | * | ||
6 | * This file is subject to the terms and conditions of the GNU General Public | ||
7 | * License. See the file "COPYING" in the main directory of this archive | ||
8 | * for more details. | ||
9 | */ | ||
10 | #include <linux/platform_device.h> | ||
11 | #include <linux/init.h> | ||
12 | #include <linux/serial.h> | ||
13 | #include <asm/sci.h> | ||
14 | |||
15 | static struct plat_sci_port sci_platform_data[] = { | ||
16 | { | ||
17 | .mapbase = 0xa4430000, | ||
18 | .flags = UPF_BOOT_AUTOCONF, | ||
19 | .type = PORT_SCI, | ||
20 | .irqs = { 80, 80, 80, 80 }, | ||
21 | }, { | ||
22 | .flags = 0, | ||
23 | } | ||
24 | }; | ||
25 | |||
26 | static struct platform_device sci_device = { | ||
27 | .name = "sh-sci", | ||
28 | .id = -1, | ||
29 | .dev = { | ||
30 | .platform_data = sci_platform_data, | ||
31 | }, | ||
32 | }; | ||
33 | |||
34 | static struct platform_device *sh7300_devices[] __initdata = { | ||
35 | &sci_device, | ||
36 | }; | ||
37 | |||
38 | static int __init sh7300_devices_setup(void) | ||
39 | { | ||
40 | return platform_add_devices(sh7300_devices, | ||
41 | ARRAY_SIZE(sh7300_devices)); | ||
42 | } | ||
43 | __initcall(sh7300_devices_setup); | ||
diff --git a/arch/sh/kernel/cpu/sh4/probe.c b/arch/sh/kernel/cpu/sh4/probe.c index 66c3f75647b2..98d28fb1ce16 100644 --- a/arch/sh/kernel/cpu/sh4/probe.c +++ b/arch/sh/kernel/cpu/sh4/probe.c | |||
@@ -90,12 +90,6 @@ int __init detect_cpu_and_cache_system(void) | |||
90 | current_cpu_data.type = CPU_SH7751; | 90 | current_cpu_data.type = CPU_SH7751; |
91 | current_cpu_data.flags |= CPU_HAS_FPU; | 91 | current_cpu_data.flags |= CPU_HAS_FPU; |
92 | break; | 92 | break; |
93 | case 0x2000: | ||
94 | current_cpu_data.type = CPU_SH73180; | ||
95 | current_cpu_data.icache.ways = 4; | ||
96 | current_cpu_data.dcache.ways = 4; | ||
97 | current_cpu_data.flags |= CPU_HAS_LLSC; | ||
98 | break; | ||
99 | case 0x2001: | 93 | case 0x2001: |
100 | case 0x2004: | 94 | case 0x2004: |
101 | current_cpu_data.type = CPU_SH7770; | 95 | current_cpu_data.type = CPU_SH7770; |
diff --git a/arch/sh/kernel/cpu/sh4/sq.c b/arch/sh/kernel/cpu/sh4/sq.c index b98d6c3e6f36..c21512c6044e 100644 --- a/arch/sh/kernel/cpu/sh4/sq.c +++ b/arch/sh/kernel/cpu/sh4/sq.c | |||
@@ -208,7 +208,6 @@ EXPORT_SYMBOL(sq_remap); | |||
208 | void sq_unmap(unsigned long vaddr) | 208 | void sq_unmap(unsigned long vaddr) |
209 | { | 209 | { |
210 | struct sq_mapping **p, *map; | 210 | struct sq_mapping **p, *map; |
211 | struct vm_struct *vma; | ||
212 | int page; | 211 | int page; |
213 | 212 | ||
214 | for (p = &sq_mapping_list; (map = *p); p = &map->next) | 213 | for (p = &sq_mapping_list; (map = *p); p = &map->next) |
@@ -225,11 +224,18 @@ void sq_unmap(unsigned long vaddr) | |||
225 | bitmap_release_region(sq_bitmap, page, get_order(map->size)); | 224 | bitmap_release_region(sq_bitmap, page, get_order(map->size)); |
226 | 225 | ||
227 | #ifdef CONFIG_MMU | 226 | #ifdef CONFIG_MMU |
228 | vma = remove_vm_area((void *)(map->sq_addr & PAGE_MASK)); | 227 | { |
229 | if (!vma) { | 228 | /* |
230 | printk(KERN_ERR "%s: bad address 0x%08lx\n", | 229 | * Tear down the VMA in the MMU case. |
231 | __FUNCTION__, map->sq_addr); | 230 | */ |
232 | return; | 231 | struct vm_struct *vma; |
232 | |||
233 | vma = remove_vm_area((void *)(map->sq_addr & PAGE_MASK)); | ||
234 | if (!vma) { | ||
235 | printk(KERN_ERR "%s: bad address 0x%08lx\n", | ||
236 | __FUNCTION__, map->sq_addr); | ||
237 | return; | ||
238 | } | ||
233 | } | 239 | } |
234 | #endif | 240 | #endif |
235 | 241 | ||
diff --git a/arch/sh/kernel/cpu/sh4a/Makefile b/arch/sh/kernel/cpu/sh4a/Makefile index 400623286487..e6a1fb5f8484 100644 --- a/arch/sh/kernel/cpu/sh4a/Makefile +++ b/arch/sh/kernel/cpu/sh4a/Makefile | |||
@@ -6,13 +6,11 @@ | |||
6 | obj-$(CONFIG_CPU_SUBTYPE_SH7770) += setup-sh7770.o | 6 | obj-$(CONFIG_CPU_SUBTYPE_SH7770) += setup-sh7770.o |
7 | obj-$(CONFIG_CPU_SUBTYPE_SH7780) += setup-sh7780.o | 7 | obj-$(CONFIG_CPU_SUBTYPE_SH7780) += setup-sh7780.o |
8 | obj-$(CONFIG_CPU_SUBTYPE_SH7785) += setup-sh7785.o | 8 | obj-$(CONFIG_CPU_SUBTYPE_SH7785) += setup-sh7785.o |
9 | obj-$(CONFIG_CPU_SUBTYPE_SH73180) += setup-sh73180.o | ||
10 | obj-$(CONFIG_CPU_SUBTYPE_SH7343) += setup-sh7343.o | 9 | obj-$(CONFIG_CPU_SUBTYPE_SH7343) += setup-sh7343.o |
11 | obj-$(CONFIG_CPU_SUBTYPE_SH7722) += setup-sh7722.o | 10 | obj-$(CONFIG_CPU_SUBTYPE_SH7722) += setup-sh7722.o |
12 | obj-$(CONFIG_CPU_SUBTYPE_SHX3) += setup-shx3.o | 11 | obj-$(CONFIG_CPU_SUBTYPE_SHX3) += setup-shx3.o |
13 | 12 | ||
14 | # Primary on-chip clocks (common) | 13 | # Primary on-chip clocks (common) |
15 | clock-$(CONFIG_CPU_SUBTYPE_SH73180) := clock-sh73180.o | ||
16 | clock-$(CONFIG_CPU_SUBTYPE_SH7770) := clock-sh7770.o | 14 | clock-$(CONFIG_CPU_SUBTYPE_SH7770) := clock-sh7770.o |
17 | clock-$(CONFIG_CPU_SUBTYPE_SH7780) := clock-sh7780.o | 15 | clock-$(CONFIG_CPU_SUBTYPE_SH7780) := clock-sh7780.o |
18 | clock-$(CONFIG_CPU_SUBTYPE_SH7785) := clock-sh7785.o | 16 | clock-$(CONFIG_CPU_SUBTYPE_SH7785) := clock-sh7785.o |
diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh73180.c b/arch/sh/kernel/cpu/sh4a/clock-sh73180.c deleted file mode 100644 index 6d5ba373a75e..000000000000 --- a/arch/sh/kernel/cpu/sh4a/clock-sh73180.c +++ /dev/null | |||
@@ -1,81 +0,0 @@ | |||
1 | /* | ||
2 | * arch/sh/kernel/cpu/sh4a/clock-sh73180.c | ||
3 | * | ||
4 | * SH73180 support for the clock framework | ||
5 | * | ||
6 | * Copyright (C) 2005 Paul Mundt | ||
7 | * | ||
8 | * FRQCR parsing hacked out of arch/sh/kernel/time.c | ||
9 | * | ||
10 | * Copyright (C) 1999 Tetsuya Okada & Niibe Yutaka | ||
11 | * Copyright (C) 2000 Philipp Rumpf <prumpf@tux.org> | ||
12 | * Copyright (C) 2002, 2003, 2004 Paul Mundt | ||
13 | * Copyright (C) 2002 M. R. Brown <mrbrown@linux-sh.org> | ||
14 | * | ||
15 | * This file is subject to the terms and conditions of the GNU General Public | ||
16 | * License. See the file "COPYING" in the main directory of this archive | ||
17 | * for more details. | ||
18 | */ | ||
19 | #include <linux/init.h> | ||
20 | #include <linux/kernel.h> | ||
21 | #include <asm/clock.h> | ||
22 | #include <asm/freq.h> | ||
23 | #include <asm/io.h> | ||
24 | |||
25 | /* | ||
26 | * SH73180 uses a common set of divisors, so this is quite simple.. | ||
27 | */ | ||
28 | static int divisors[] = { 1, 2, 3, 4, 6, 8, 12, 16 }; | ||
29 | |||
30 | static void master_clk_init(struct clk *clk) | ||
31 | { | ||
32 | clk->rate *= divisors[ctrl_inl(FRQCR) & 0x0007]; | ||
33 | } | ||
34 | |||
35 | static struct clk_ops sh73180_master_clk_ops = { | ||
36 | .init = master_clk_init, | ||
37 | }; | ||
38 | |||
39 | static void module_clk_recalc(struct clk *clk) | ||
40 | { | ||
41 | int idx = (ctrl_inl(FRQCR) & 0x0007); | ||
42 | clk->rate = clk->parent->rate / divisors[idx]; | ||
43 | } | ||
44 | |||
45 | static struct clk_ops sh73180_module_clk_ops = { | ||
46 | .recalc = module_clk_recalc, | ||
47 | }; | ||
48 | |||
49 | static void bus_clk_recalc(struct clk *clk) | ||
50 | { | ||
51 | int idx = (ctrl_inl(FRQCR) >> 12) & 0x0007; | ||
52 | clk->rate = clk->parent->rate / divisors[idx]; | ||
53 | } | ||
54 | |||
55 | static struct clk_ops sh73180_bus_clk_ops = { | ||
56 | .recalc = bus_clk_recalc, | ||
57 | }; | ||
58 | |||
59 | static void cpu_clk_recalc(struct clk *clk) | ||
60 | { | ||
61 | int idx = (ctrl_inl(FRQCR) >> 20) & 0x0007; | ||
62 | clk->rate = clk->parent->rate / divisors[idx]; | ||
63 | } | ||
64 | |||
65 | static struct clk_ops sh73180_cpu_clk_ops = { | ||
66 | .recalc = cpu_clk_recalc, | ||
67 | }; | ||
68 | |||
69 | static struct clk_ops *sh73180_clk_ops[] = { | ||
70 | &sh73180_master_clk_ops, | ||
71 | &sh73180_module_clk_ops, | ||
72 | &sh73180_bus_clk_ops, | ||
73 | &sh73180_cpu_clk_ops, | ||
74 | }; | ||
75 | |||
76 | void __init arch_init_clk_ops(struct clk_ops **ops, int idx) | ||
77 | { | ||
78 | if (idx < ARRAY_SIZE(sh73180_clk_ops)) | ||
79 | *ops = sh73180_clk_ops[idx]; | ||
80 | } | ||
81 | |||
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh73180.c b/arch/sh/kernel/cpu/sh4a/setup-sh73180.c deleted file mode 100644 index cc9ea1e2e5df..000000000000 --- a/arch/sh/kernel/cpu/sh4a/setup-sh73180.c +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | /* | ||
2 | * SH73180 Setup | ||
3 | * | ||
4 | * Copyright (C) 2006 Paul Mundt | ||
5 | * | ||
6 | * This file is subject to the terms and conditions of the GNU General Public | ||
7 | * License. See the file "COPYING" in the main directory of this archive | ||
8 | * for more details. | ||
9 | */ | ||
10 | #include <linux/platform_device.h> | ||
11 | #include <linux/init.h> | ||
12 | #include <linux/serial.h> | ||
13 | #include <asm/sci.h> | ||
14 | |||
15 | static struct plat_sci_port sci_platform_data[] = { | ||
16 | { | ||
17 | .mapbase = 0xffe80000, | ||
18 | .flags = UPF_BOOT_AUTOCONF, | ||
19 | .type = PORT_SCIF, | ||
20 | .irqs = { 80, 81, 83, 82 }, | ||
21 | }, { | ||
22 | .flags = 0, | ||
23 | } | ||
24 | }; | ||
25 | |||
26 | static struct platform_device sci_device = { | ||
27 | .name = "sh-sci", | ||
28 | .id = -1, | ||
29 | .dev = { | ||
30 | .platform_data = sci_platform_data, | ||
31 | }, | ||
32 | }; | ||
33 | |||
34 | static struct platform_device *sh73180_devices[] __initdata = { | ||
35 | &sci_device, | ||
36 | }; | ||
37 | |||
38 | static int __init sh73180_devices_setup(void) | ||
39 | { | ||
40 | return platform_add_devices(sh73180_devices, | ||
41 | ARRAY_SIZE(sh73180_devices)); | ||
42 | } | ||
43 | __initcall(sh73180_devices_setup); | ||
diff --git a/arch/sh/kernel/init_task.c b/arch/sh/kernel/init_task.c index 44053ea92936..4b449c4a6bad 100644 --- a/arch/sh/kernel/init_task.c +++ b/arch/sh/kernel/init_task.c | |||
@@ -3,7 +3,7 @@ | |||
3 | #include <linux/sched.h> | 3 | #include <linux/sched.h> |
4 | #include <linux/init_task.h> | 4 | #include <linux/init_task.h> |
5 | #include <linux/mqueue.h> | 5 | #include <linux/mqueue.h> |
6 | 6 | #include <linux/fs.h> | |
7 | #include <asm/uaccess.h> | 7 | #include <asm/uaccess.h> |
8 | #include <asm/pgtable.h> | 8 | #include <asm/pgtable.h> |
9 | 9 | ||
diff --git a/arch/sh/kernel/process.c b/arch/sh/kernel/process.c index 6334a4c54c7c..15ae322dbd74 100644 --- a/arch/sh/kernel/process.c +++ b/arch/sh/kernel/process.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/kdebug.h> | 18 | #include <linux/kdebug.h> |
19 | #include <linux/tick.h> | 19 | #include <linux/tick.h> |
20 | #include <linux/reboot.h> | 20 | #include <linux/reboot.h> |
21 | #include <linux/fs.h> | ||
21 | #include <asm/uaccess.h> | 22 | #include <asm/uaccess.h> |
22 | #include <asm/mmu_context.h> | 23 | #include <asm/mmu_context.h> |
23 | #include <asm/pgalloc.h> | 24 | #include <asm/pgalloc.h> |
@@ -474,7 +475,6 @@ out: | |||
474 | 475 | ||
475 | unsigned long get_wchan(struct task_struct *p) | 476 | unsigned long get_wchan(struct task_struct *p) |
476 | { | 477 | { |
477 | unsigned long schedule_frame; | ||
478 | unsigned long pc; | 478 | unsigned long pc; |
479 | 479 | ||
480 | if (!p || p == current || p->state == TASK_RUNNING) | 480 | if (!p || p == current || p->state == TASK_RUNNING) |
@@ -484,10 +484,13 @@ unsigned long get_wchan(struct task_struct *p) | |||
484 | * The same comment as on the Alpha applies here, too ... | 484 | * The same comment as on the Alpha applies here, too ... |
485 | */ | 485 | */ |
486 | pc = thread_saved_pc(p); | 486 | pc = thread_saved_pc(p); |
487 | |||
488 | #ifdef CONFIG_FRAME_POINTER | ||
487 | if (in_sched_functions(pc)) { | 489 | if (in_sched_functions(pc)) { |
488 | schedule_frame = (unsigned long)p->thread.sp; | 490 | unsigned long schedule_frame = (unsigned long)p->thread.sp; |
489 | return ((unsigned long *)schedule_frame)[21]; | 491 | return ((unsigned long *)schedule_frame)[21]; |
490 | } | 492 | } |
493 | #endif | ||
491 | 494 | ||
492 | return pc; | 495 | return pc; |
493 | } | 496 | } |
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c index c14a3e95d0b1..2cf7dec0d690 100644 --- a/arch/sh/kernel/setup.c +++ b/arch/sh/kernel/setup.c | |||
@@ -276,7 +276,6 @@ void __init setup_arch(char **cmdline_p) | |||
276 | 276 | ||
277 | static const char *cpu_name[] = { | 277 | static const char *cpu_name[] = { |
278 | [CPU_SH7206] = "SH7206", [CPU_SH7619] = "SH7619", | 278 | [CPU_SH7206] = "SH7206", [CPU_SH7619] = "SH7619", |
279 | [CPU_SH7300] = "SH7300", | ||
280 | [CPU_SH7705] = "SH7705", [CPU_SH7706] = "SH7706", | 279 | [CPU_SH7705] = "SH7705", [CPU_SH7706] = "SH7706", |
281 | [CPU_SH7707] = "SH7707", [CPU_SH7708] = "SH7708", | 280 | [CPU_SH7707] = "SH7707", [CPU_SH7708] = "SH7708", |
282 | [CPU_SH7709] = "SH7709", [CPU_SH7710] = "SH7710", | 281 | [CPU_SH7709] = "SH7709", [CPU_SH7710] = "SH7710", |
@@ -284,7 +283,7 @@ static const char *cpu_name[] = { | |||
284 | [CPU_SH7729] = "SH7729", [CPU_SH7750] = "SH7750", | 283 | [CPU_SH7729] = "SH7729", [CPU_SH7750] = "SH7750", |
285 | [CPU_SH7750S] = "SH7750S", [CPU_SH7750R] = "SH7750R", | 284 | [CPU_SH7750S] = "SH7750S", [CPU_SH7750R] = "SH7750R", |
286 | [CPU_SH7751] = "SH7751", [CPU_SH7751R] = "SH7751R", | 285 | [CPU_SH7751] = "SH7751", [CPU_SH7751R] = "SH7751R", |
287 | [CPU_SH7760] = "SH7760", [CPU_SH73180] = "SH73180", | 286 | [CPU_SH7760] = "SH7760", |
288 | [CPU_ST40RA] = "ST40RA", [CPU_ST40GX1] = "ST40GX1", | 287 | [CPU_ST40RA] = "ST40RA", [CPU_ST40GX1] = "ST40GX1", |
289 | [CPU_SH4_202] = "SH4-202", [CPU_SH4_501] = "SH4-501", | 288 | [CPU_SH4_202] = "SH4-202", [CPU_SH4_501] = "SH4-501", |
290 | [CPU_SH7770] = "SH7770", [CPU_SH7780] = "SH7780", | 289 | [CPU_SH7770] = "SH7770", [CPU_SH7780] = "SH7780", |
diff --git a/arch/sh/kernel/sys_sh.c b/arch/sh/kernel/sys_sh.c index 76b1bc7f7029..024ce5dedd8c 100644 --- a/arch/sh/kernel/sys_sh.c +++ b/arch/sh/kernel/sys_sh.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/file.h> | 21 | #include <linux/file.h> |
22 | #include <linux/utsname.h> | 22 | #include <linux/utsname.h> |
23 | #include <linux/module.h> | 23 | #include <linux/module.h> |
24 | #include <linux/fs.h> | ||
24 | #include <asm/cacheflush.h> | 25 | #include <asm/cacheflush.h> |
25 | #include <asm/uaccess.h> | 26 | #include <asm/uaccess.h> |
26 | #include <asm/ipc.h> | 27 | #include <asm/ipc.h> |
diff --git a/arch/sh/kernel/timers/timer-tmu.c b/arch/sh/kernel/timers/timer-tmu.c index 7aca37d79766..8a545d54e2d3 100644 --- a/arch/sh/kernel/timers/timer-tmu.c +++ b/arch/sh/kernel/timers/timer-tmu.c | |||
@@ -173,8 +173,7 @@ static int tmu_timer_init(void) | |||
173 | 173 | ||
174 | tmu_timer_stop(); | 174 | tmu_timer_stop(); |
175 | 175 | ||
176 | #if !defined(CONFIG_CPU_SUBTYPE_SH7300) && \ | 176 | #if !defined(CONFIG_CPU_SUBTYPE_SH7760) && \ |
177 | !defined(CONFIG_CPU_SUBTYPE_SH7760) && \ | ||
178 | !defined(CONFIG_CPU_SUBTYPE_SH7785) && \ | 177 | !defined(CONFIG_CPU_SUBTYPE_SH7785) && \ |
179 | !defined(CONFIG_CPU_SUBTYPE_SHX3) | 178 | !defined(CONFIG_CPU_SUBTYPE_SHX3) |
180 | ctrl_outb(TMU_TOCR_INIT, TMU_TOCR); | 179 | ctrl_outb(TMU_TOCR_INIT, TMU_TOCR); |
diff --git a/arch/sh/kernel/vsyscall/vsyscall.c b/arch/sh/kernel/vsyscall/vsyscall.c index 2aa9438361bc..95f4de0800ec 100644 --- a/arch/sh/kernel/vsyscall/vsyscall.c +++ b/arch/sh/kernel/vsyscall/vsyscall.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/module.h> | 18 | #include <linux/module.h> |
19 | #include <linux/elf.h> | 19 | #include <linux/elf.h> |
20 | #include <linux/sched.h> | 20 | #include <linux/sched.h> |
21 | #include <linux/err.h> | ||
21 | 22 | ||
22 | /* | 23 | /* |
23 | * Should the kernel map a VDSO page into processes and pass its | 24 | * Should the kernel map a VDSO page into processes and pass its |