diff options
Diffstat (limited to 'arch/sh/kernel')
-rw-r--r-- | arch/sh/kernel/cpu/irq/ipr.c | 2 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh3/Makefile | 5 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh3/clock-sh7706.c | 84 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh3/ex.S | 54 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh3/probe.c | 6 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh3/setup-sh7710.c | 43 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh4/Makefile | 1 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh4/ex.S | 12 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh4/probe.c | 17 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh4/setup-sh7343.c | 43 | ||||
-rw-r--r-- | arch/sh/kernel/process.c | 2 | ||||
-rw-r--r-- | arch/sh/kernel/setup.c | 31 | ||||
-rw-r--r-- | arch/sh/kernel/sh_ksyms.c | 3 |
13 files changed, 267 insertions, 36 deletions
diff --git a/arch/sh/kernel/cpu/irq/ipr.c b/arch/sh/kernel/cpu/irq/ipr.c index 0f545941fb4f..d2b715a04c7e 100644 --- a/arch/sh/kernel/cpu/irq/ipr.c +++ b/arch/sh/kernel/cpu/irq/ipr.c | |||
@@ -89,6 +89,7 @@ static void mask_and_ack_ipr(unsigned int irq) | |||
89 | disable_ipr_irq(irq); | 89 | disable_ipr_irq(irq); |
90 | 90 | ||
91 | #if defined(CONFIG_CPU_SUBTYPE_SH7707) || defined(CONFIG_CPU_SUBTYPE_SH7709) || \ | 91 | #if defined(CONFIG_CPU_SUBTYPE_SH7707) || defined(CONFIG_CPU_SUBTYPE_SH7709) || \ |
92 | defined(CONFIG_CPU_SUBTYPE_SH7706) || \ | ||
92 | defined(CONFIG_CPU_SUBTYPE_SH7300) || defined(CONFIG_CPU_SUBTYPE_SH7705) | 93 | defined(CONFIG_CPU_SUBTYPE_SH7300) || defined(CONFIG_CPU_SUBTYPE_SH7705) |
93 | /* This is needed when we use edge triggered setting */ | 94 | /* This is needed when we use edge triggered setting */ |
94 | /* XXX: Is it really needed? */ | 95 | /* XXX: Is it really needed? */ |
@@ -162,6 +163,7 @@ void __init init_IRQ(void) | |||
162 | #endif | 163 | #endif |
163 | 164 | ||
164 | #if defined(CONFIG_CPU_SUBTYPE_SH7707) || defined(CONFIG_CPU_SUBTYPE_SH7709) || \ | 165 | #if defined(CONFIG_CPU_SUBTYPE_SH7707) || defined(CONFIG_CPU_SUBTYPE_SH7709) || \ |
166 | defined(CONFIG_CPU_SUBTYPE_SH7706) || \ | ||
165 | defined(CONFIG_CPU_SUBTYPE_SH7300) || defined(CONFIG_CPU_SUBTYPE_SH7705) | 167 | defined(CONFIG_CPU_SUBTYPE_SH7300) || defined(CONFIG_CPU_SUBTYPE_SH7705) |
166 | /* | 168 | /* |
167 | * Initialize the Interrupt Controller (INTC) | 169 | * Initialize the Interrupt Controller (INTC) |
diff --git a/arch/sh/kernel/cpu/sh3/Makefile b/arch/sh/kernel/cpu/sh3/Makefile index 1b292ae16f07..58d3815695ff 100644 --- a/arch/sh/kernel/cpu/sh3/Makefile +++ b/arch/sh/kernel/cpu/sh3/Makefile | |||
@@ -6,16 +6,19 @@ obj-y := ex.o probe.o | |||
6 | 6 | ||
7 | # CPU subtype setup | 7 | # CPU subtype setup |
8 | obj-$(CONFIG_CPU_SUBTYPE_SH7705) += setup-sh7705.o | 8 | obj-$(CONFIG_CPU_SUBTYPE_SH7705) += setup-sh7705.o |
9 | obj-$(CONFIG_CPU_SUBTYPE_SH7706) += setup-sh7709.o | ||
9 | obj-$(CONFIG_CPU_SUBTYPE_SH7707) += setup-sh7709.o | 10 | obj-$(CONFIG_CPU_SUBTYPE_SH7707) += setup-sh7709.o |
10 | obj-$(CONFIG_CPU_SUBTYPE_SH7708) += setup-sh7708.o | 11 | obj-$(CONFIG_CPU_SUBTYPE_SH7708) += setup-sh7708.o |
11 | obj-$(CONFIG_CPU_SUBTYPE_SH7709) += setup-sh7709.o | 12 | obj-$(CONFIG_CPU_SUBTYPE_SH7709) += setup-sh7709.o |
12 | obj-$(CONFIG_CPU_SUBTYPE_SH7300) += setup-sh7300.o | 13 | obj-$(CONFIG_CPU_SUBTYPE_SH7300) += setup-sh7300.o |
14 | obj-$(CONFIG_CPU_SUBTYPE_SH7710) += setup-sh7710.o | ||
13 | 15 | ||
14 | # Primary on-chip clocks (common) | 16 | # Primary on-chip clocks (common) |
15 | clock-$(CONFIG_CPU_SH3) := clock-sh3.o | 17 | clock-$(CONFIG_CPU_SH3) := clock-sh3.o |
16 | clock-$(CONFIG_CPU_SUBTYPE_SH7300) := clock-sh7300.o | 18 | clock-$(CONFIG_CPU_SUBTYPE_SH7300) := clock-sh7300.o |
17 | clock-$(CONFIG_CPU_SUBTYPE_SH7705) := clock-sh7705.o | 19 | clock-$(CONFIG_CPU_SUBTYPE_SH7705) := clock-sh7705.o |
20 | clock-$(CONFIG_CPU_SUBTYPE_SH7706) := clock-sh7706.o | ||
18 | clock-$(CONFIG_CPU_SUBTYPE_SH7709) := clock-sh7709.o | 21 | clock-$(CONFIG_CPU_SUBTYPE_SH7709) := clock-sh7709.o |
22 | clock-$(CONFIG_CPU_SUBTYPE_SH7710) := clock-sh7300.o | ||
19 | 23 | ||
20 | obj-y += $(clock-y) | 24 | obj-y += $(clock-y) |
21 | |||
diff --git a/arch/sh/kernel/cpu/sh3/clock-sh7706.c b/arch/sh/kernel/cpu/sh3/clock-sh7706.c new file mode 100644 index 000000000000..0cf96f9833bc --- /dev/null +++ b/arch/sh/kernel/cpu/sh3/clock-sh7706.c | |||
@@ -0,0 +1,84 @@ | |||
1 | /* | ||
2 | * arch/sh/kernel/cpu/sh3/clock-sh7706.c | ||
3 | * | ||
4 | * SH7706 support for the clock framework | ||
5 | * | ||
6 | * Copyright (C) 2006 Takashi YOSHII | ||
7 | * | ||
8 | * Based on arch/sh/kernel/cpu/sh3/clock-sh7709.c | ||
9 | * Copyright (C) 2005 Andriy Skulysh | ||
10 | * | ||
11 | * This file is subject to the terms and conditions of the GNU General Public | ||
12 | * License. See the file "COPYING" in the main directory of this archive | ||
13 | * for more details. | ||
14 | */ | ||
15 | #include <linux/init.h> | ||
16 | #include <linux/kernel.h> | ||
17 | #include <asm/clock.h> | ||
18 | #include <asm/freq.h> | ||
19 | #include <asm/io.h> | ||
20 | |||
21 | static int stc_multipliers[] = { 1, 2, 4, 1, 3, 6, 1, 1 }; | ||
22 | static int ifc_divisors[] = { 1, 2, 4, 1, 3, 1, 1, 1 }; | ||
23 | static int pfc_divisors[] = { 1, 2, 4, 1, 3, 6, 1, 1 }; | ||
24 | |||
25 | static void master_clk_init(struct clk *clk) | ||
26 | { | ||
27 | int frqcr = ctrl_inw(FRQCR); | ||
28 | int idx = ((frqcr & 0x2000) >> 11) | (frqcr & 0x0003); | ||
29 | |||
30 | clk->rate *= pfc_divisors[idx]; | ||
31 | } | ||
32 | |||
33 | static struct clk_ops sh7706_master_clk_ops = { | ||
34 | .init = master_clk_init, | ||
35 | }; | ||
36 | |||
37 | static void module_clk_recalc(struct clk *clk) | ||
38 | { | ||
39 | int frqcr = ctrl_inw(FRQCR); | ||
40 | int idx = ((frqcr & 0x2000) >> 11) | (frqcr & 0x0003); | ||
41 | |||
42 | clk->rate = clk->parent->rate / pfc_divisors[idx]; | ||
43 | } | ||
44 | |||
45 | static struct clk_ops sh7706_module_clk_ops = { | ||
46 | .recalc = module_clk_recalc, | ||
47 | }; | ||
48 | |||
49 | static void bus_clk_recalc(struct clk *clk) | ||
50 | { | ||
51 | int frqcr = ctrl_inw(FRQCR); | ||
52 | int idx = ((frqcr & 0x8000) >> 13) | ((frqcr & 0x0030) >> 4); | ||
53 | |||
54 | clk->rate = clk->parent->rate / stc_multipliers[idx]; | ||
55 | } | ||
56 | |||
57 | static struct clk_ops sh7706_bus_clk_ops = { | ||
58 | .recalc = bus_clk_recalc, | ||
59 | }; | ||
60 | |||
61 | static void cpu_clk_recalc(struct clk *clk) | ||
62 | { | ||
63 | int frqcr = ctrl_inw(FRQCR); | ||
64 | int idx = ((frqcr & 0x4000) >> 12) | ((frqcr & 0x000c) >> 2); | ||
65 | |||
66 | clk->rate = clk->parent->rate / ifc_divisors[idx]; | ||
67 | } | ||
68 | |||
69 | static struct clk_ops sh7706_cpu_clk_ops = { | ||
70 | .recalc = cpu_clk_recalc, | ||
71 | }; | ||
72 | |||
73 | static struct clk_ops *sh7706_clk_ops[] = { | ||
74 | &sh7706_master_clk_ops, | ||
75 | &sh7706_module_clk_ops, | ||
76 | &sh7706_bus_clk_ops, | ||
77 | &sh7706_cpu_clk_ops, | ||
78 | }; | ||
79 | |||
80 | void __init arch_init_clk_ops(struct clk_ops **ops, int idx) | ||
81 | { | ||
82 | if (idx < ARRAY_SIZE(sh7706_clk_ops)) | ||
83 | *ops = sh7706_clk_ops[idx]; | ||
84 | } | ||
diff --git a/arch/sh/kernel/cpu/sh3/ex.S b/arch/sh/kernel/cpu/sh3/ex.S index cc04e9e239ff..44daf44833f9 100644 --- a/arch/sh/kernel/cpu/sh3/ex.S +++ b/arch/sh/kernel/cpu/sh3/ex.S | |||
@@ -84,8 +84,12 @@ ENTRY(interrupt_table) | |||
84 | .long do_IRQ ! rovi | 84 | .long do_IRQ ! rovi |
85 | .long do_IRQ | 85 | .long do_IRQ |
86 | .long do_IRQ /* 5E0 */ | 86 | .long do_IRQ /* 5E0 */ |
87 | #if defined(CONFIG_CPU_SUBTYPE_SH7707) || defined(CONFIG_CPU_SUBTYPE_SH7709) || \ | 87 | #if defined(CONFIG_CPU_SUBTYPE_SH7707) || \ |
88 | defined(CONFIG_CPU_SUBTYPE_SH7300) || defined(CONFIG_CPU_SUBTYPE_SH7705) | 88 | defined(CONFIG_CPU_SUBTYPE_SH7709) || \ |
89 | defined(CONFIG_CPU_SUBTYPE_SH7706) || \ | ||
90 | defined(CONFIG_CPU_SUBTYPE_SH7300) || \ | ||
91 | defined(CONFIG_CPU_SUBTYPE_SH7705) || \ | ||
92 | defined(CONFIG_CPU_SUBTYPE_SH7710) | ||
89 | .long do_IRQ ! 32 IRQ irq0 /* 600 */ | 93 | .long do_IRQ ! 32 IRQ irq0 /* 600 */ |
90 | .long do_IRQ ! 33 irq1 | 94 | .long do_IRQ ! 33 irq1 |
91 | .long do_IRQ ! 34 irq2 | 95 | .long do_IRQ ! 34 irq2 |
@@ -147,6 +151,51 @@ ENTRY(interrupt_table) | |||
147 | .long do_IRQ ! 62 PCC pcc0i | 151 | .long do_IRQ ! 62 PCC pcc0i |
148 | .long do_IRQ ! 63 pcc1i /* 9E0 */ | 152 | .long do_IRQ ! 63 pcc1i /* 9E0 */ |
149 | #endif | 153 | #endif |
154 | #if defined(CONFIG_CPU_SUBTYPE_SH7710) | ||
155 | .long exception_none ! 61 /* 9A0 */ | ||
156 | .long exception_none ! 62 | ||
157 | .long exception_none ! 63 | ||
158 | .long exception_none ! 64 /* A00 */ | ||
159 | .long exception_none ! 65 | ||
160 | .long exception_none ! 66 | ||
161 | .long exception_none ! 67 | ||
162 | .long exception_none ! 68 | ||
163 | .long exception_none ! 69 | ||
164 | .long exception_none ! 70 | ||
165 | .long exception_none ! 71 | ||
166 | .long exception_none ! 72 /* B00 */ | ||
167 | .long exception_none ! 73 | ||
168 | .long exception_none ! 74 | ||
169 | .long exception_none ! 75 | ||
170 | .long do_IRQ ! 76 DMAC2 dei4 /* B80 */ | ||
171 | .long do_IRQ ! 77 DMAC2 dei5 | ||
172 | .long exception_none ! 78 | ||
173 | .long do_IRQ ! 79 IPSEC ipseci /* BE0 */ | ||
174 | .long do_IRQ ! 80 EDMAC eint0 /* C00 */ | ||
175 | .long do_IRQ ! 81 EDMAC eint1 | ||
176 | .long do_IRQ ! 82 EDMAC eint2 | ||
177 | .long exception_none ! 83 /* C60 */ | ||
178 | .long exception_none ! 84 | ||
179 | .long exception_none ! 85 | ||
180 | .long exception_none ! 86 | ||
181 | .long exception_none ! 87 | ||
182 | .long exception_none ! 88 /* D00 */ | ||
183 | .long exception_none ! 89 | ||
184 | .long exception_none ! 90 | ||
185 | .long exception_none ! 91 | ||
186 | .long exception_none ! 92 | ||
187 | .long exception_none ! 93 | ||
188 | .long exception_none ! 94 | ||
189 | .long exception_none ! 95 | ||
190 | .long do_IRQ ! 96 SIOF eri0 /* E00 */ | ||
191 | .long do_IRQ ! 97 txi0 | ||
192 | .long do_IRQ ! 98 rxi0 | ||
193 | .long do_IRQ ! 99 cci0 | ||
194 | .long do_IRQ ! 100 eri1 /* E80 */ | ||
195 | .long do_IRQ ! 101 txi1 | ||
196 | .long do_IRQ ! 102 rxi2 | ||
197 | .long do_IRQ ! 103 cci3 | ||
198 | #endif | ||
150 | #if defined(CONFIG_CPU_SUBTYPE_SH7300) | 199 | #if defined(CONFIG_CPU_SUBTYPE_SH7300) |
151 | .long do_IRQ ! 64 | 200 | .long do_IRQ ! 64 |
152 | .long do_IRQ ! 65 | 201 | .long do_IRQ ! 65 |
@@ -195,4 +244,3 @@ ENTRY(interrupt_table) | |||
195 | .long do_IRQ ! 108 | 244 | .long do_IRQ ! 108 |
196 | #endif | 245 | #endif |
197 | #endif | 246 | #endif |
198 | |||
diff --git a/arch/sh/kernel/cpu/sh3/probe.c b/arch/sh/kernel/cpu/sh3/probe.c index 5cdc88638601..e67098836290 100644 --- a/arch/sh/kernel/cpu/sh3/probe.c +++ b/arch/sh/kernel/cpu/sh3/probe.c | |||
@@ -72,6 +72,12 @@ int __init detect_cpu_and_cache_system(void) | |||
72 | cpu_data->dcache.sets = 256; | 72 | cpu_data->dcache.sets = 256; |
73 | cpu_data->type = CPU_SH7729; | 73 | cpu_data->type = CPU_SH7729; |
74 | 74 | ||
75 | #if defined(CONFIG_CPU_SUBTYPE_SH7706) | ||
76 | cpu_data->type = CPU_SH7706; | ||
77 | #endif | ||
78 | #if defined(CONFIG_CPU_SUBTYPE_SH7710) | ||
79 | cpu_data->type = CPU_SH7710; | ||
80 | #endif | ||
75 | #if defined(CONFIG_CPU_SUBTYPE_SH7705) | 81 | #if defined(CONFIG_CPU_SUBTYPE_SH7705) |
76 | cpu_data->type = CPU_SH7705; | 82 | cpu_data->type = CPU_SH7705; |
77 | 83 | ||
diff --git a/arch/sh/kernel/cpu/sh3/setup-sh7710.c b/arch/sh/kernel/cpu/sh3/setup-sh7710.c new file mode 100644 index 000000000000..895f99ee6a95 --- /dev/null +++ b/arch/sh/kernel/cpu/sh3/setup-sh7710.c | |||
@@ -0,0 +1,43 @@ | |||
1 | /* | ||
2 | * SH7710 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 = 0xa4400000, | ||
18 | .flags = UPF_BOOT_AUTOCONF, | ||
19 | .type = PORT_SCIF, | ||
20 | .irqs = { 52, 53, 55, 54 }, | ||
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 *sh7710_devices[] __initdata = { | ||
35 | &sci_device, | ||
36 | }; | ||
37 | |||
38 | static int __init sh7710_devices_setup(void) | ||
39 | { | ||
40 | return platform_add_devices(sh7710_devices, | ||
41 | ARRAY_SIZE(sh7710_devices)); | ||
42 | } | ||
43 | __initcall(sh7710_devices_setup); | ||
diff --git a/arch/sh/kernel/cpu/sh4/Makefile b/arch/sh/kernel/cpu/sh4/Makefile index 48946d54a2cd..8dbf3895ece7 100644 --- a/arch/sh/kernel/cpu/sh4/Makefile +++ b/arch/sh/kernel/cpu/sh4/Makefile | |||
@@ -14,6 +14,7 @@ obj-$(CONFIG_CPU_SUBTYPE_SH7760) += setup-sh7760.o | |||
14 | obj-$(CONFIG_CPU_SUBTYPE_SH7770) += setup-sh7770.o | 14 | obj-$(CONFIG_CPU_SUBTYPE_SH7770) += setup-sh7770.o |
15 | obj-$(CONFIG_CPU_SUBTYPE_SH7780) += setup-sh7780.o | 15 | obj-$(CONFIG_CPU_SUBTYPE_SH7780) += setup-sh7780.o |
16 | obj-$(CONFIG_CPU_SUBTYPE_SH73180) += setup-sh73180.o | 16 | obj-$(CONFIG_CPU_SUBTYPE_SH73180) += setup-sh73180.o |
17 | obj-$(CONFIG_CPU_SUBTYPE_SH7343) += setup-sh7343.o | ||
17 | obj-$(CONFIG_CPU_SUBTYPE_SH4_202) += setup-sh4-202.o | 18 | obj-$(CONFIG_CPU_SUBTYPE_SH4_202) += setup-sh4-202.o |
18 | 19 | ||
19 | # Primary on-chip clocks (common) | 20 | # Primary on-chip clocks (common) |
diff --git a/arch/sh/kernel/cpu/sh4/ex.S b/arch/sh/kernel/cpu/sh4/ex.S index af5ecbddea55..7146893a6cca 100644 --- a/arch/sh/kernel/cpu/sh4/ex.S +++ b/arch/sh/kernel/cpu/sh4/ex.S | |||
@@ -123,6 +123,13 @@ ENTRY(interrupt_table) | |||
123 | .long do_IRQ ! 45 dmte5 | 123 | .long do_IRQ ! 45 dmte5 |
124 | .long do_IRQ ! 46 dmte6 | 124 | .long do_IRQ ! 46 dmte6 |
125 | .long do_IRQ ! 47 dmte7 /* 7E0 */ | 125 | .long do_IRQ ! 47 dmte7 /* 7E0 */ |
126 | #elif defined(CONFIG_CPU_SUBTYPE_SH7343) | ||
127 | .long do_IRQ ! 44 IIC1 ali /* 780 */ | ||
128 | .long do_IRQ ! 45 tacki | ||
129 | .long do_IRQ ! 46 waiti | ||
130 | .long do_IRQ ! 47 dtei /* 7E0 */ | ||
131 | .long do_IRQ ! 48 DMAC dei0 /* 800 */ | ||
132 | .long do_IRQ ! 49 dei1 /* 820 */ | ||
126 | #else | 133 | #else |
127 | .long exception_error ! 44 /* 780 */ | 134 | .long exception_error ! 44 /* 780 */ |
128 | .long exception_error ! 45 | 135 | .long exception_error ! 45 |
@@ -132,7 +139,8 @@ ENTRY(interrupt_table) | |||
132 | #if defined(CONFIG_SH_FPU) | 139 | #if defined(CONFIG_SH_FPU) |
133 | .long do_fpu_state_restore ! 48 /* 800 */ | 140 | .long do_fpu_state_restore ! 48 /* 800 */ |
134 | .long do_fpu_state_restore ! 49 /* 820 */ | 141 | .long do_fpu_state_restore ! 49 /* 820 */ |
135 | #else | 142 | #elif !defined(CONFIG_CPU_SUBTYPE_SH7343) && \ |
143 | !defined(CONFIG_CPU_SUBTYPE_SH73180) | ||
136 | .long exception_error | 144 | .long exception_error |
137 | .long exception_error | 145 | .long exception_error |
138 | #endif | 146 | #endif |
@@ -225,7 +233,7 @@ ENTRY(interrupt_table) | |||
225 | .long exception_error | 233 | .long exception_error |
226 | .long do_IRQ ! ADC adi | 234 | .long do_IRQ ! ADC adi |
227 | .long do_IRQ ! CMT cmti /* FA0 */ | 235 | .long do_IRQ ! CMT cmti /* FA0 */ |
228 | #elif defined(CONFIG_CPU_SUBTYPE_SH73180) | 236 | #elif defined(CONFIG_CPU_SUBTYPE_SH73180) || defined(CONFIG_CPU_SUBTYPE_SH7343) |
229 | .long do_IRQ ! 50 0x840 | 237 | .long do_IRQ ! 50 0x840 |
230 | .long do_IRQ ! 51 0x860 | 238 | .long do_IRQ ! 51 0x860 |
231 | .long do_IRQ ! 52 0x880 | 239 | .long do_IRQ ! 52 0x880 |
diff --git a/arch/sh/kernel/cpu/sh4/probe.c b/arch/sh/kernel/cpu/sh4/probe.c index 2a7707a81d8f..6e8a2b5268e8 100644 --- a/arch/sh/kernel/cpu/sh4/probe.c +++ b/arch/sh/kernel/cpu/sh4/probe.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * CPU Subtype Probing for SH-4. | 4 | * CPU Subtype Probing for SH-4. |
5 | * | 5 | * |
6 | * Copyright (C) 2001 - 2005 Paul Mundt | 6 | * Copyright (C) 2001 - 2006 Paul Mundt |
7 | * Copyright (C) 2003 Richard Curnow | 7 | * Copyright (C) 2003 Richard Curnow |
8 | * | 8 | * |
9 | * This file is subject to the terms and conditions of the GNU General Public | 9 | * This file is subject to the terms and conditions of the GNU General Public |
@@ -76,12 +76,6 @@ int __init detect_cpu_and_cache_system(void) | |||
76 | cpu_data->type = CPU_SH73180; | 76 | cpu_data->type = CPU_SH73180; |
77 | cpu_data->icache.ways = 4; | 77 | cpu_data->icache.ways = 4; |
78 | cpu_data->dcache.ways = 4; | 78 | cpu_data->dcache.ways = 4; |
79 | |||
80 | /* | ||
81 | * XXX: Double check this, none of the SH-4A/SH-4AL processors | ||
82 | * should have this, as it's essentially a legacy thing. | ||
83 | */ | ||
84 | cpu_data->flags |= CPU_HAS_PTEA; | ||
85 | break; | 79 | break; |
86 | case 0x2001: | 80 | case 0x2001: |
87 | case 0x2004: | 81 | case 0x2004: |
@@ -89,8 +83,7 @@ int __init detect_cpu_and_cache_system(void) | |||
89 | cpu_data->icache.ways = 4; | 83 | cpu_data->icache.ways = 4; |
90 | cpu_data->dcache.ways = 4; | 84 | cpu_data->dcache.ways = 4; |
91 | 85 | ||
92 | /* Same note as above applies here for PTEA */ | 86 | cpu_data->flags |= CPU_HAS_FPU; |
93 | cpu_data->flags |= CPU_HAS_FPU | CPU_HAS_PTEA; | ||
94 | break; | 87 | break; |
95 | case 0x2006: | 88 | case 0x2006: |
96 | case 0x200A: | 89 | case 0x200A: |
@@ -104,6 +97,12 @@ int __init detect_cpu_and_cache_system(void) | |||
104 | 97 | ||
105 | cpu_data->flags |= CPU_HAS_FPU | CPU_HAS_PERF_COUNTER; | 98 | cpu_data->flags |= CPU_HAS_FPU | CPU_HAS_PERF_COUNTER; |
106 | break; | 99 | break; |
100 | case 0x3000: | ||
101 | case 0x3003: | ||
102 | cpu_data->type = CPU_SH7343; | ||
103 | cpu_data->icache.ways = 4; | ||
104 | cpu_data->dcache.ways = 4; | ||
105 | break; | ||
107 | case 0x8000: | 106 | case 0x8000: |
108 | cpu_data->type = CPU_ST40RA; | 107 | cpu_data->type = CPU_ST40RA; |
109 | cpu_data->flags |= CPU_HAS_FPU | CPU_HAS_PTEA; | 108 | cpu_data->flags |= CPU_HAS_FPU | CPU_HAS_PTEA; |
diff --git a/arch/sh/kernel/cpu/sh4/setup-sh7343.c b/arch/sh/kernel/cpu/sh4/setup-sh7343.c new file mode 100644 index 000000000000..91d61cf91ba1 --- /dev/null +++ b/arch/sh/kernel/cpu/sh4/setup-sh7343.c | |||
@@ -0,0 +1,43 @@ | |||
1 | /* | ||
2 | * SH7343 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 = 0xffe00000, | ||
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 *sh7343_devices[] __initdata = { | ||
35 | &sci_device, | ||
36 | }; | ||
37 | |||
38 | static int __init sh7343_devices_setup(void) | ||
39 | { | ||
40 | return platform_add_devices(sh7343_devices, | ||
41 | ARRAY_SIZE(sh7343_devices)); | ||
42 | } | ||
43 | __initcall(sh7343_devices_setup); | ||
diff --git a/arch/sh/kernel/process.c b/arch/sh/kernel/process.c index c4aa687ba26a..2167746e88f1 100644 --- a/arch/sh/kernel/process.c +++ b/arch/sh/kernel/process.c | |||
@@ -310,7 +310,7 @@ ubc_set_tracing(int asid, unsigned long pc) | |||
310 | 310 | ||
311 | ctrl_outl(0, UBC_BAMRA); | 311 | ctrl_outl(0, UBC_BAMRA); |
312 | 312 | ||
313 | if (cpu_data->type == CPU_SH7729) { | 313 | if (cpu_data->type == CPU_SH7729 || cpu_data->type == CPU_SH7710) { |
314 | ctrl_outw(BBR_INST | BBR_READ | BBR_CPU, UBC_BBRA); | 314 | ctrl_outw(BBR_INST | BBR_READ | BBR_CPU, UBC_BBRA); |
315 | ctrl_outl(BRCR_PCBA | BRCR_PCTE, UBC_BRCR); | 315 | ctrl_outl(BRCR_PCBA | BRCR_PCTE, UBC_BRCR); |
316 | } else { | 316 | } else { |
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c index 4afdec071700..86ef17fe48b5 100644 --- a/arch/sh/kernel/setup.c +++ b/arch/sh/kernel/setup.c | |||
@@ -424,25 +424,18 @@ static int __init topology_init(void) | |||
424 | subsys_initcall(topology_init); | 424 | subsys_initcall(topology_init); |
425 | 425 | ||
426 | static const char *cpu_name[] = { | 426 | static const char *cpu_name[] = { |
427 | [CPU_SH7604] = "SH7604", | 427 | [CPU_SH7604] = "SH7604", [CPU_SH7300] = "SH7300", |
428 | [CPU_SH7705] = "SH7705", | 428 | [CPU_SH7705] = "SH7705", [CPU_SH7706] = "SH7706", |
429 | [CPU_SH7708] = "SH7708", | 429 | [CPU_SH7707] = "SH7707", [CPU_SH7708] = "SH7708", |
430 | [CPU_SH7729] = "SH7729", | 430 | [CPU_SH7709] = "SH7709", [CPU_SH7710] = "SH7710", |
431 | [CPU_SH7300] = "SH7300", | 431 | [CPU_SH7729] = "SH7729", [CPU_SH7750] = "SH7750", |
432 | [CPU_SH7750] = "SH7750", | 432 | [CPU_SH7750S] = "SH7750S", [CPU_SH7750R] = "SH7750R", |
433 | [CPU_SH7750S] = "SH7750S", | 433 | [CPU_SH7751] = "SH7751", [CPU_SH7751R] = "SH7751R", |
434 | [CPU_SH7750R] = "SH7750R", | 434 | [CPU_SH7760] = "SH7760", [CPU_SH73180] = "SH73180", |
435 | [CPU_SH7751] = "SH7751", | 435 | [CPU_ST40RA] = "ST40RA", [CPU_ST40GX1] = "ST40GX1", |
436 | [CPU_SH7751R] = "SH7751R", | 436 | [CPU_SH4_202] = "SH4-202", [CPU_SH4_501] = "SH4-501", |
437 | [CPU_SH7760] = "SH7760", | 437 | [CPU_SH7770] = "SH7770", [CPU_SH7780] = "SH7780", |
438 | [CPU_SH73180] = "SH73180", | 438 | [CPU_SH7781] = "SH7781", [CPU_SH7343] = "SH7343", |
439 | [CPU_ST40RA] = "ST40RA", | ||
440 | [CPU_ST40GX1] = "ST40GX1", | ||
441 | [CPU_SH4_202] = "SH4-202", | ||
442 | [CPU_SH4_501] = "SH4-501", | ||
443 | [CPU_SH7770] = "SH7770", | ||
444 | [CPU_SH7780] = "SH7780", | ||
445 | [CPU_SH7781] = "SH7781", | ||
446 | [CPU_SH_NONE] = "Unknown" | 439 | [CPU_SH_NONE] = "Unknown" |
447 | }; | 440 | }; |
448 | 441 | ||
diff --git a/arch/sh/kernel/sh_ksyms.c b/arch/sh/kernel/sh_ksyms.c index bf59d73415d7..d3cbfa2ad4a7 100644 --- a/arch/sh/kernel/sh_ksyms.c +++ b/arch/sh/kernel/sh_ksyms.c | |||
@@ -89,7 +89,8 @@ EXPORT_SYMBOL(flush_dcache_page); | |||
89 | EXPORT_SYMBOL(__flush_purge_region); | 89 | EXPORT_SYMBOL(__flush_purge_region); |
90 | #endif | 90 | #endif |
91 | 91 | ||
92 | #ifdef CONFIG_MMU | 92 | #if defined(CONFIG_MMU) && (defined(CONFIG_CPU_SH4) || \ |
93 | defined(CONFIG_SH7705_CACHE_32KB)) | ||
93 | EXPORT_SYMBOL(clear_user_page); | 94 | EXPORT_SYMBOL(clear_user_page); |
94 | #endif | 95 | #endif |
95 | 96 | ||