diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/sh/Kconfig | 12 | ||||
-rw-r--r-- | arch/sh/Makefile | 7 | ||||
-rw-r--r-- | arch/sh/boards/hp6xx/setup.c | 5 | ||||
-rw-r--r-- | arch/sh/boards/renesas/hs7751rvoip/io.c | 2 | ||||
-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 | ||||
-rw-r--r-- | arch/sh/mm/Kconfig | 30 |
18 files changed, 308 insertions, 51 deletions
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index 035df7fb2237..557e7232141c 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig | |||
@@ -324,12 +324,11 @@ config SH_FPU_EMU | |||
324 | 324 | ||
325 | config SH_DSP | 325 | config SH_DSP |
326 | bool "DSP support" | 326 | bool "DSP support" |
327 | depends on !CPU_SH4 | 327 | default y if SH4AL_DSP || !CPU_SH4 |
328 | default y | 328 | default n |
329 | help | 329 | help |
330 | Selecting this option will enable support for SH processors that | 330 | Selecting this option will enable support for SH processors that |
331 | have DSP units (ie, SH2-DSP and SH3-DSP). It is safe to say Y here | 331 | have DSP units (ie, SH2-DSP, SH3-DSP, and SH4AL-DSP). |
332 | by default, as the existance of the DSP will be probed at runtime. | ||
333 | 332 | ||
334 | This option must be set in order to enable the DSP. | 333 | This option must be set in order to enable the DSP. |
335 | 334 | ||
@@ -393,8 +392,9 @@ config SH_PCLK_FREQ | |||
393 | int "Peripheral clock frequency (in Hz)" | 392 | int "Peripheral clock frequency (in Hz)" |
394 | default "50000000" if CPU_SUBTYPE_SH7750 || CPU_SUBTYPE_SH7780 | 393 | default "50000000" if CPU_SUBTYPE_SH7750 || CPU_SUBTYPE_SH7780 |
395 | default "60000000" if CPU_SUBTYPE_SH7751 | 394 | default "60000000" if CPU_SUBTYPE_SH7751 |
396 | default "33333333" if CPU_SUBTYPE_SH7300 || CPU_SUBTYPE_SH7770 || CPU_SUBTYPE_SH7760 | 395 | default "33333333" if CPU_SUBTYPE_SH7300 || CPU_SUBTYPE_SH7770 || \ |
397 | default "27000000" if CPU_SUBTYPE_SH73180 | 396 | CPU_SUBTYPE_SH7760 |
397 | default "27000000" if CPU_SUBTYPE_SH73180 || CPU_SUBTYPE_SH7343 | ||
398 | default "66000000" if CPU_SUBTYPE_SH4_202 | 398 | default "66000000" if CPU_SUBTYPE_SH4_202 |
399 | help | 399 | help |
400 | This option is used to specify the peripheral clock frequency. | 400 | This option is used to specify the peripheral clock frequency. |
diff --git a/arch/sh/Makefile b/arch/sh/Makefile index 13b688b13e1c..d118e48ea1ba 100644 --- a/arch/sh/Makefile +++ b/arch/sh/Makefile | |||
@@ -18,11 +18,13 @@ cflags-y := -mb | |||
18 | cflags-$(CONFIG_CPU_LITTLE_ENDIAN) := -ml | 18 | cflags-$(CONFIG_CPU_LITTLE_ENDIAN) := -ml |
19 | 19 | ||
20 | isa-y := any | 20 | isa-y := any |
21 | isa-$(CONFIG_SH_DSP) := sh | ||
21 | isa-$(CONFIG_CPU_SH2) := sh2 | 22 | isa-$(CONFIG_CPU_SH2) := sh2 |
23 | isa-$(CONFIG_CPU_SH2A) := sh2a | ||
22 | isa-$(CONFIG_CPU_SH3) := sh3 | 24 | isa-$(CONFIG_CPU_SH3) := sh3 |
23 | isa-$(CONFIG_CPU_SH4) := sh4 | 25 | isa-$(CONFIG_CPU_SH4) := sh4 |
24 | isa-$(CONFIG_CPU_SH4A) := sh4a | 26 | isa-$(CONFIG_CPU_SH4A) := sh4a |
25 | isa-$(CONFIG_CPU_SH2A) := sh2a | 27 | isa-$(CONFIG_CPU_SH4AL_DSP) := sh4al |
26 | 28 | ||
27 | isa-$(CONFIG_SH_DSP) := $(isa-y)-dsp | 29 | isa-$(CONFIG_SH_DSP) := $(isa-y)-dsp |
28 | 30 | ||
@@ -30,9 +32,11 @@ ifndef CONFIG_MMU | |||
30 | isa-y := $(isa-y)-nommu | 32 | isa-y := $(isa-y)-nommu |
31 | endif | 33 | endif |
32 | 34 | ||
35 | ifndef CONFIG_SH_DSP | ||
33 | ifndef CONFIG_SH_FPU | 36 | ifndef CONFIG_SH_FPU |
34 | isa-y := $(isa-y)-nofpu | 37 | isa-y := $(isa-y)-nofpu |
35 | endif | 38 | endif |
39 | endif | ||
36 | 40 | ||
37 | cflags-y += $(call as-option,-Wa$(comma)-isa=$(isa-y),) | 41 | cflags-y += $(call as-option,-Wa$(comma)-isa=$(isa-y),) |
38 | 42 | ||
@@ -188,4 +192,3 @@ CLEAN_FILES += include/asm-sh/machtypes.h | |||
188 | define archhelp | 192 | define archhelp |
189 | @echo ' zImage - Compressed kernel image (arch/sh/boot/zImage)' | 193 | @echo ' zImage - Compressed kernel image (arch/sh/boot/zImage)' |
190 | endef | 194 | endef |
191 | |||
diff --git a/arch/sh/boards/hp6xx/setup.c b/arch/sh/boards/hp6xx/setup.c index 5fc00f0727c4..629016bec809 100644 --- a/arch/sh/boards/hp6xx/setup.c +++ b/arch/sh/boards/hp6xx/setup.c | |||
@@ -8,10 +8,11 @@ | |||
8 | * | 8 | * |
9 | * Setup code for an HP680 (internal peripherials only) | 9 | * Setup code for an HP680 (internal peripherials only) |
10 | */ | 10 | */ |
11 | 11 | #include <linux/types.h> | |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <asm/io.h> | ||
14 | #include <asm/hd64461.h> | 13 | #include <asm/hd64461.h> |
14 | #include <asm/io.h> | ||
15 | #include <asm/irq.h> | ||
15 | #include <asm/hp6xx/hp6xx.h> | 16 | #include <asm/hp6xx/hp6xx.h> |
16 | #include <asm/cpu/dac.h> | 17 | #include <asm/cpu/dac.h> |
17 | 18 | ||
diff --git a/arch/sh/boards/renesas/hs7751rvoip/io.c b/arch/sh/boards/renesas/hs7751rvoip/io.c index 8c26550ca2e4..9ea1136b219b 100644 --- a/arch/sh/boards/renesas/hs7751rvoip/io.c +++ b/arch/sh/boards/renesas/hs7751rvoip/io.c | |||
@@ -10,10 +10,10 @@ | |||
10 | * placeholder code from io_hs7751rvoip.c left in with the | 10 | * placeholder code from io_hs7751rvoip.c left in with the |
11 | * expectation of later SuperIO and PCMCIA access. | 11 | * expectation of later SuperIO and PCMCIA access. |
12 | */ | 12 | */ |
13 | |||
14 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
15 | #include <linux/types.h> | 14 | #include <linux/types.h> |
16 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/pci.h> | ||
17 | #include <asm/io.h> | 17 | #include <asm/io.h> |
18 | #include <asm/hs7751rvoip/hs7751rvoip.h> | 18 | #include <asm/hs7751rvoip/hs7751rvoip.h> |
19 | #include <asm/addrspace.h> | 19 | #include <asm/addrspace.h> |
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 | ||
diff --git a/arch/sh/mm/Kconfig b/arch/sh/mm/Kconfig index bed697c0dc19..b445d02075e8 100644 --- a/arch/sh/mm/Kconfig +++ b/arch/sh/mm/Kconfig | |||
@@ -21,6 +21,10 @@ config CPU_SH4A | |||
21 | bool | 21 | bool |
22 | select CPU_SH4 | 22 | select CPU_SH4 |
23 | 23 | ||
24 | config CPU_SH4AL_DSP | ||
25 | bool | ||
26 | select CPU_SH4A | ||
27 | |||
24 | config CPU_SUBTYPE_ST40 | 28 | config CPU_SUBTYPE_ST40 |
25 | bool | 29 | bool |
26 | select CPU_SH4 | 30 | select CPU_SH4 |
@@ -47,6 +51,12 @@ config CPU_SUBTYPE_SH7705 | |||
47 | select CPU_SH3 | 51 | select CPU_SH3 |
48 | select CPU_HAS_PINT_IRQ | 52 | select CPU_HAS_PINT_IRQ |
49 | 53 | ||
54 | config CPU_SUBTYPE_SH7706 | ||
55 | bool "Support SH7706 processor" | ||
56 | select CPU_SH3 | ||
57 | help | ||
58 | Select SH7706 if you have a 133 Mhz SH-3 HD6417706 CPU. | ||
59 | |||
50 | config CPU_SUBTYPE_SH7707 | 60 | config CPU_SUBTYPE_SH7707 |
51 | bool "Support SH7707 processor" | 61 | bool "Support SH7707 processor" |
52 | select CPU_SH3 | 62 | select CPU_SH3 |
@@ -68,6 +78,12 @@ config CPU_SUBTYPE_SH7709 | |||
68 | help | 78 | help |
69 | Select SH7709 if you have a 80 Mhz SH-3 HD6417709 CPU. | 79 | Select SH7709 if you have a 80 Mhz SH-3 HD6417709 CPU. |
70 | 80 | ||
81 | config CPU_SUBTYPE_SH7710 | ||
82 | bool "Support SH7710 processor" | ||
83 | select CPU_SH3 | ||
84 | help | ||
85 | Select SH7710 if you have a SH3-DSP SH7710 CPU. | ||
86 | |||
71 | comment "SH-4 Processor Support" | 87 | comment "SH-4 Processor Support" |
72 | 88 | ||
73 | config CPU_SUBTYPE_SH7750 | 89 | config CPU_SUBTYPE_SH7750 |
@@ -132,10 +148,6 @@ config CPU_SUBTYPE_ST40GX1 | |||
132 | 148 | ||
133 | comment "SH-4A Processor Support" | 149 | comment "SH-4A Processor Support" |
134 | 150 | ||
135 | config CPU_SUBTYPE_SH73180 | ||
136 | bool "Support SH73180 processor" | ||
137 | select CPU_SH4A | ||
138 | |||
139 | config CPU_SUBTYPE_SH7770 | 151 | config CPU_SUBTYPE_SH7770 |
140 | bool "Support SH7770 processor" | 152 | bool "Support SH7770 processor" |
141 | select CPU_SH4A | 153 | select CPU_SH4A |
@@ -145,6 +157,16 @@ config CPU_SUBTYPE_SH7780 | |||
145 | select CPU_SH4A | 157 | select CPU_SH4A |
146 | select CPU_HAS_INTC2_IRQ | 158 | select CPU_HAS_INTC2_IRQ |
147 | 159 | ||
160 | comment "SH4AL-DSP Processor Support" | ||
161 | |||
162 | config CPU_SUBTYPE_SH73180 | ||
163 | bool "Support SH73180 processor" | ||
164 | select CPU_SH4AL_DSP | ||
165 | |||
166 | config CPU_SUBTYPE_SH7343 | ||
167 | bool "Support SH7343 processor" | ||
168 | select CPU_SH4AL_DSP | ||
169 | |||
148 | endmenu | 170 | endmenu |
149 | 171 | ||
150 | menu "Memory management options" | 172 | menu "Memory management options" |