diff options
author | Nobuhiro Iwamatsu <iwamatsu@nigauri.org> | 2007-03-27 05:13:51 -0400 |
---|---|---|
committer | Paul Mundt <lethal@hera.kernel.org> | 2007-05-06 22:10:54 -0400 |
commit | 9465a54fa4a9da628091c372baa84120f8304587 (patch) | |
tree | ef34abf9debce228b0985e0fb783ca46939e626a /arch/sh/kernel | |
parent | c86c5a910451dd5a30e62a9e36d8e9b3c7a0c1d1 (diff) |
sh: MS7712SE01 board support.
Support the SH7712 (SH3-DSP) Solution Engine reference board.
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel')
-rw-r--r-- | arch/sh/kernel/cpu/sh3/Makefile | 1 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh3/probe.c | 3 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh3/setup-sh7710.c | 60 | ||||
-rw-r--r-- | arch/sh/kernel/process.c | 3 | ||||
-rw-r--r-- | arch/sh/kernel/setup.c | 1 |
5 files changed, 67 insertions, 1 deletions
diff --git a/arch/sh/kernel/cpu/sh3/Makefile b/arch/sh/kernel/cpu/sh3/Makefile index 83905e4e4387..09faa056cd43 100644 --- a/arch/sh/kernel/cpu/sh3/Makefile +++ b/arch/sh/kernel/cpu/sh3/Makefile | |||
@@ -12,6 +12,7 @@ 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 | 13 | obj-$(CONFIG_CPU_SUBTYPE_SH7300) += setup-sh7300.o |
14 | obj-$(CONFIG_CPU_SUBTYPE_SH7710) += setup-sh7710.o | 14 | obj-$(CONFIG_CPU_SUBTYPE_SH7710) += setup-sh7710.o |
15 | obj-$(CONFIG_CPU_SUBTYPE_SH7712) += setup-sh7710.o | ||
15 | 16 | ||
16 | # Primary on-chip clocks (common) | 17 | # Primary on-chip clocks (common) |
17 | clock-$(CONFIG_CPU_SH3) := clock-sh3.o | 18 | clock-$(CONFIG_CPU_SH3) := clock-sh3.o |
diff --git a/arch/sh/kernel/cpu/sh3/probe.c b/arch/sh/kernel/cpu/sh3/probe.c index 821b0ab7b528..647623b22edc 100644 --- a/arch/sh/kernel/cpu/sh3/probe.c +++ b/arch/sh/kernel/cpu/sh3/probe.c | |||
@@ -78,6 +78,9 @@ int __init detect_cpu_and_cache_system(void) | |||
78 | #if defined(CONFIG_CPU_SUBTYPE_SH7710) | 78 | #if defined(CONFIG_CPU_SUBTYPE_SH7710) |
79 | current_cpu_data.type = CPU_SH7710; | 79 | current_cpu_data.type = CPU_SH7710; |
80 | #endif | 80 | #endif |
81 | #if defined(CONFIG_CPU_SUBTYPE_SH7712) | ||
82 | current_cpu_data.type = CPU_SH7712; | ||
83 | #endif | ||
81 | #if defined(CONFIG_CPU_SUBTYPE_SH7705) | 84 | #if defined(CONFIG_CPU_SUBTYPE_SH7705) |
82 | current_cpu_data.type = CPU_SH7705; | 85 | current_cpu_data.type = CPU_SH7705; |
83 | 86 | ||
diff --git a/arch/sh/kernel/cpu/sh3/setup-sh7710.c b/arch/sh/kernel/cpu/sh3/setup-sh7710.c index 895f99ee6a95..51760a7e7f1c 100644 --- a/arch/sh/kernel/cpu/sh3/setup-sh7710.c +++ b/arch/sh/kernel/cpu/sh3/setup-sh7710.c | |||
@@ -2,6 +2,7 @@ | |||
2 | * SH7710 Setup | 2 | * SH7710 Setup |
3 | * | 3 | * |
4 | * Copyright (C) 2006 Paul Mundt | 4 | * Copyright (C) 2006 Paul Mundt |
5 | * Copyright (C) 2007 Nobuhiro Iwamatsu | ||
5 | * | 6 | * |
6 | * This file is subject to the terms and conditions of the GNU General Public | 7 | * 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 | * License. See the file "COPYING" in the main directory of this archive |
@@ -19,6 +20,12 @@ static struct plat_sci_port sci_platform_data[] = { | |||
19 | .type = PORT_SCIF, | 20 | .type = PORT_SCIF, |
20 | .irqs = { 52, 53, 55, 54 }, | 21 | .irqs = { 52, 53, 55, 54 }, |
21 | }, { | 22 | }, { |
23 | .mapbase = 0xa4420000, | ||
24 | .flags = UPF_BOOT_AUTOCONF, | ||
25 | .type = PORT_SCIF, | ||
26 | .irqs = { 56, 57, 59, 58 }, | ||
27 | }, { | ||
28 | |||
22 | .flags = 0, | 29 | .flags = 0, |
23 | } | 30 | } |
24 | }; | 31 | }; |
@@ -41,3 +48,56 @@ static int __init sh7710_devices_setup(void) | |||
41 | ARRAY_SIZE(sh7710_devices)); | 48 | ARRAY_SIZE(sh7710_devices)); |
42 | } | 49 | } |
43 | __initcall(sh7710_devices_setup); | 50 | __initcall(sh7710_devices_setup); |
51 | |||
52 | static struct ipr_data sh7710_ipr_map[] = { | ||
53 | /* IRQ, IPR-idx, shift, priority */ | ||
54 | { 16, 0, 12, 2 }, /* TMU0 TUNI*/ | ||
55 | { 17, 0, 8, 2 }, /* TMU1 TUNI */ | ||
56 | { 18, 0, 4, 2 }, /* TMU2 TUNI */ | ||
57 | { 27, 1, 12, 2 }, /* WDT ITI */ | ||
58 | { 20, 0, 0, 2 }, /* RTC ATI (alarm) */ | ||
59 | { 21, 0, 0, 2 }, /* RTC PRI (period) */ | ||
60 | { 22, 0, 0, 2 }, /* RTC CUI (carry) */ | ||
61 | { 48, 4, 12, 7 }, /* DMAC DMTE0 */ | ||
62 | { 49, 4, 12, 7 }, /* DMAC DMTE1 */ | ||
63 | { 50, 4, 12, 7 }, /* DMAC DMTE2 */ | ||
64 | { 51, 4, 12, 7 }, /* DMAC DMTE3 */ | ||
65 | { 52, 4, 8, 3 }, /* SCIF0 ERI */ | ||
66 | { 53, 4, 8, 3 }, /* SCIF0 RXI */ | ||
67 | { 54, 4, 8, 3 }, /* SCIF0 BRI */ | ||
68 | { 55, 4, 8, 3 }, /* SCIF0 TXI */ | ||
69 | { 56, 4, 4, 3 }, /* SCIF1 ERI */ | ||
70 | { 57, 4, 4, 3 }, /* SCIF1 RXI */ | ||
71 | { 58, 4, 4, 3 }, /* SCIF1 BRI */ | ||
72 | { 59, 4, 4, 3 }, /* SCIF1 TXI */ | ||
73 | { 76, 5, 8, 7 }, /* DMAC DMTE4 */ | ||
74 | { 77, 5, 8, 7 }, /* DMAC DMTE5 */ | ||
75 | { 80, 6, 12, 5 }, /* EDMAC EINT0 */ | ||
76 | { 81, 6, 8, 5 }, /* EDMAC EINT1 */ | ||
77 | { 82, 6, 4, 5 }, /* EDMAC EINT2 */ | ||
78 | }; | ||
79 | |||
80 | static unsigned long ipr_offsets[] = { | ||
81 | 0xA414FEE2 /* 0: IPRA */ | ||
82 | , 0xA414FEE4 /* 1: IPRB */ | ||
83 | , 0xA4140016 /* 2: IPRC */ | ||
84 | , 0xA4140018 /* 3: IPRD */ | ||
85 | , 0xA414001A /* 4: IPRE */ | ||
86 | , 0xA4080000 /* 5: IPRF */ | ||
87 | , 0xA4080002 /* 6: IPRG */ | ||
88 | , 0xA4080004 /* 7: IPRH */ | ||
89 | , 0xA4080006 /* 8: IPRI */ | ||
90 | }; | ||
91 | |||
92 | /* given the IPR index return the address of the IPR register */ | ||
93 | unsigned int map_ipridx_to_addr(int idx) | ||
94 | { | ||
95 | if (idx >= ARRAY_SIZE(ipr_offsets)) | ||
96 | return 0; | ||
97 | return ipr_offsets[idx]; | ||
98 | } | ||
99 | |||
100 | void __init init_IRQ_ipr() | ||
101 | { | ||
102 | make_ipr_irq(sh7710_ipr_map, ARRAY_SIZE(sh7710_ipr_map)); | ||
103 | } | ||
diff --git a/arch/sh/kernel/process.c b/arch/sh/kernel/process.c index e7607366ac4e..286c80388bf5 100644 --- a/arch/sh/kernel/process.c +++ b/arch/sh/kernel/process.c | |||
@@ -299,7 +299,8 @@ static void ubc_set_tracing(int asid, unsigned long pc) | |||
299 | ctrl_outl(0, UBC_BAMRA); | 299 | ctrl_outl(0, UBC_BAMRA); |
300 | 300 | ||
301 | if (current_cpu_data.type == CPU_SH7729 || | 301 | if (current_cpu_data.type == CPU_SH7729 || |
302 | current_cpu_data.type == CPU_SH7710) { | 302 | current_cpu_data.type == CPU_SH7710 || |
303 | current_cpu_data.type == CPU_SH7712 ) { | ||
303 | ctrl_outw(BBR_INST | BBR_READ | BBR_CPU, UBC_BBRA); | 304 | ctrl_outw(BBR_INST | BBR_READ | BBR_CPU, UBC_BBRA); |
304 | ctrl_outl(BRCR_PCBA | BRCR_PCTE, UBC_BRCR); | 305 | ctrl_outl(BRCR_PCBA | BRCR_PCTE, UBC_BRCR); |
305 | } else { | 306 | } else { |
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c index f96490419768..4d6d89115194 100644 --- a/arch/sh/kernel/setup.c +++ b/arch/sh/kernel/setup.c | |||
@@ -377,6 +377,7 @@ static const char *cpu_name[] = { | |||
377 | [CPU_SH7705] = "SH7705", [CPU_SH7706] = "SH7706", | 377 | [CPU_SH7705] = "SH7705", [CPU_SH7706] = "SH7706", |
378 | [CPU_SH7707] = "SH7707", [CPU_SH7708] = "SH7708", | 378 | [CPU_SH7707] = "SH7707", [CPU_SH7708] = "SH7708", |
379 | [CPU_SH7709] = "SH7709", [CPU_SH7710] = "SH7710", | 379 | [CPU_SH7709] = "SH7709", [CPU_SH7710] = "SH7710", |
380 | [CPU_SH7712] = "SH7712", | ||
380 | [CPU_SH7729] = "SH7729", [CPU_SH7750] = "SH7750", | 381 | [CPU_SH7729] = "SH7729", [CPU_SH7750] = "SH7750", |
381 | [CPU_SH7750S] = "SH7750S", [CPU_SH7750R] = "SH7750R", | 382 | [CPU_SH7750S] = "SH7750S", [CPU_SH7750R] = "SH7750R", |
382 | [CPU_SH7751] = "SH7751", [CPU_SH7751R] = "SH7751R", | 383 | [CPU_SH7751] = "SH7751", [CPU_SH7751R] = "SH7751R", |