diff options
Diffstat (limited to 'arch/sh')
-rw-r--r-- | arch/sh/Kconfig.debug | 1 | ||||
-rw-r--r-- | arch/sh/boards/se/770x/io.c | 2 | ||||
-rw-r--r-- | arch/sh/boards/se/770x/irq.c | 27 | ||||
-rw-r--r-- | arch/sh/boards/se/770x/setup.c | 4 | ||||
-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 | ||||
-rw-r--r-- | arch/sh/mm/Kconfig | 8 |
10 files changed, 95 insertions, 15 deletions
diff --git a/arch/sh/Kconfig.debug b/arch/sh/Kconfig.debug index 931c620dbc24..be60def6f306 100644 --- a/arch/sh/Kconfig.debug +++ b/arch/sh/Kconfig.debug | |||
@@ -33,6 +33,7 @@ config EARLY_SCIF_CONSOLE_PORT | |||
33 | default "0xffe00000" if CPU_SUBTYPE_SH7780 | 33 | default "0xffe00000" if CPU_SUBTYPE_SH7780 |
34 | default "0xfffe9800" if CPU_SUBTYPE_SH7206 | 34 | default "0xfffe9800" if CPU_SUBTYPE_SH7206 |
35 | default "0xf8420000" if CPU_SUBTYPE_SH7619 | 35 | default "0xf8420000" if CPU_SUBTYPE_SH7619 |
36 | default "0xa4400000" if CPU_SUBTYPE_SH7712 | ||
36 | default "0xffe80000" if CPU_SH4 | 37 | default "0xffe80000" if CPU_SH4 |
37 | 38 | ||
38 | config EARLY_PRINTK | 39 | config EARLY_PRINTK |
diff --git a/arch/sh/boards/se/770x/io.c b/arch/sh/boards/se/770x/io.c index 9941949331ab..c4550473d4c3 100644 --- a/arch/sh/boards/se/770x/io.c +++ b/arch/sh/boards/se/770x/io.c | |||
@@ -27,6 +27,8 @@ int sh_pcic_io_dummy; | |||
27 | static inline volatile __u16 * | 27 | static inline volatile __u16 * |
28 | port2adr(unsigned int port) | 28 | port2adr(unsigned int port) |
29 | { | 29 | { |
30 | if (port & 0xff000000) | ||
31 | return ( volatile __u16 *) port; | ||
30 | if (port >= 0x2000) | 32 | if (port >= 0x2000) |
31 | return (volatile __u16 *) (PA_MRSHPC + (port - 0x2000)); | 33 | return (volatile __u16 *) (PA_MRSHPC + (port - 0x2000)); |
32 | else if (port >= 0x1000) | 34 | else if (port >= 0x1000) |
diff --git a/arch/sh/boards/se/770x/irq.c b/arch/sh/boards/se/770x/irq.c index 307ca5da6232..59cdffa13964 100644 --- a/arch/sh/boards/se/770x/irq.c +++ b/arch/sh/boards/se/770x/irq.c | |||
@@ -55,6 +55,17 @@ void make_se770x_irq(struct ipr_data *table, unsigned int nr_irqs) | |||
55 | } | 55 | } |
56 | 56 | ||
57 | static struct ipr_data se770x_ipr_map[] = { | 57 | static struct ipr_data se770x_ipr_map[] = { |
58 | /* | ||
59 | * Super I/O (Just mimic PC): | ||
60 | * 1: keyboard | ||
61 | * 3: serial 0 | ||
62 | * 4: serial 1 | ||
63 | * 5: printer | ||
64 | * 6: floppy | ||
65 | * 8: rtc | ||
66 | * 12: mouse | ||
67 | * 14: ide0 | ||
68 | */ | ||
58 | #if defined(CONFIG_CPU_SUBTYPE_SH7705) | 69 | #if defined(CONFIG_CPU_SUBTYPE_SH7705) |
59 | /* This is default value */ | 70 | /* This is default value */ |
60 | { 0xf-0x2, 0, 8, 0x2 , BCR_ILCRA}, | 71 | { 0xf-0x2, 0, 8, 0x2 , BCR_ILCRA}, |
@@ -81,8 +92,10 @@ static struct ipr_data se770x_ipr_map[] = { | |||
81 | { 4, 0, 4, 0x0f- 4 ,BCR_ILCRC}, | 92 | { 4, 0, 4, 0x0f- 4 ,BCR_ILCRC}, |
82 | { 3, 0, 0, 0x0f- 3 ,BCR_ILCRC}, | 93 | { 3, 0, 0, 0x0f- 3 ,BCR_ILCRC}, |
83 | { 1, 0, 12, 0x0f- 1 ,BCR_ILCRD}, | 94 | { 1, 0, 12, 0x0f- 1 ,BCR_ILCRD}, |
95 | #if defined(CONFIG_STNIC) | ||
84 | /* ST NIC */ | 96 | /* ST NIC */ |
85 | { 10, 0, 4, 0x0f-10 ,BCR_ILCRD}, /* LAN */ | 97 | { 10, 0, 4, 0x0f-10 ,BCR_ILCRD}, /* LAN */ |
98 | #endif | ||
86 | /* MRSHPC IRQs setting */ | 99 | /* MRSHPC IRQs setting */ |
87 | { 0, 0, 12, 0x0f- 0 ,BCR_ILCRE}, /* PCIRQ3 */ | 100 | { 0, 0, 12, 0x0f- 0 ,BCR_ILCRE}, /* PCIRQ3 */ |
88 | { 11, 0, 8, 0x0f-11 ,BCR_ILCRE}, /* PCIRQ2 */ | 101 | { 11, 0, 8, 0x0f-11 ,BCR_ILCRE}, /* PCIRQ2 */ |
@@ -100,18 +113,6 @@ static struct ipr_data se770x_ipr_map[] = { | |||
100 | */ | 113 | */ |
101 | void __init init_se_IRQ(void) | 114 | void __init init_se_IRQ(void) |
102 | { | 115 | { |
103 | /* | ||
104 | * Super I/O (Just mimic PC): | ||
105 | * 1: keyboard | ||
106 | * 3: serial 0 | ||
107 | * 4: serial 1 | ||
108 | * 5: printer | ||
109 | * 6: floppy | ||
110 | * 8: rtc | ||
111 | * 12: mouse | ||
112 | * 14: ide0 | ||
113 | */ | ||
114 | #if defined(CONFIG_CPU_SUBTYPE_SH7705) | ||
115 | /* Disable all interrupts */ | 116 | /* Disable all interrupts */ |
116 | ctrl_outw(0, BCR_ILCRA); | 117 | ctrl_outw(0, BCR_ILCRA); |
117 | ctrl_outw(0, BCR_ILCRB); | 118 | ctrl_outw(0, BCR_ILCRB); |
@@ -120,6 +121,6 @@ void __init init_se_IRQ(void) | |||
120 | ctrl_outw(0, BCR_ILCRE); | 121 | ctrl_outw(0, BCR_ILCRE); |
121 | ctrl_outw(0, BCR_ILCRF); | 122 | ctrl_outw(0, BCR_ILCRF); |
122 | ctrl_outw(0, BCR_ILCRG); | 123 | ctrl_outw(0, BCR_ILCRG); |
123 | #endif | 124 | |
124 | make_se770x_irq(se770x_ipr_map, ARRAY_SIZE(se770x_ipr_map)); | 125 | make_se770x_irq(se770x_ipr_map, ARRAY_SIZE(se770x_ipr_map)); |
125 | } | 126 | } |
diff --git a/arch/sh/boards/se/770x/setup.c b/arch/sh/boards/se/770x/setup.c index dab5510699a0..f1c7c8d9fdd2 100644 --- a/arch/sh/boards/se/770x/setup.c +++ b/arch/sh/boards/se/770x/setup.c | |||
@@ -117,7 +117,7 @@ static int __init se_devices_setup(void) | |||
117 | { | 117 | { |
118 | return platform_add_devices(se_devices, ARRAY_SIZE(se_devices)); | 118 | return platform_add_devices(se_devices, ARRAY_SIZE(se_devices)); |
119 | } | 119 | } |
120 | __initcall(se_devices_setup); | 120 | device_initcall(se_devices_setup); |
121 | 121 | ||
122 | /* | 122 | /* |
123 | * The Machine Vector | 123 | * The Machine Vector |
@@ -133,6 +133,8 @@ struct sh_machine_vector mv_se __initmv = { | |||
133 | .mv_nr_irqs = 61, | 133 | .mv_nr_irqs = 61, |
134 | #elif defined(CONFIG_CPU_SUBTYPE_SH7705) | 134 | #elif defined(CONFIG_CPU_SUBTYPE_SH7705) |
135 | .mv_nr_irqs = 86, | 135 | .mv_nr_irqs = 86, |
136 | #elif defined(CONFIG_CPU_SUBTYPE_SH7710) || defined(CONFIG_CPU_SUBTYPE_SH7712) | ||
137 | .mv_nr_irqs = 104, | ||
136 | #endif | 138 | #endif |
137 | 139 | ||
138 | .mv_inb = se_inb, | 140 | .mv_inb = se_inb, |
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", |
diff --git a/arch/sh/mm/Kconfig b/arch/sh/mm/Kconfig index 6b0d28ac9241..3cac22f50e15 100644 --- a/arch/sh/mm/Kconfig +++ b/arch/sh/mm/Kconfig | |||
@@ -101,9 +101,17 @@ config CPU_SUBTYPE_SH7709 | |||
101 | config CPU_SUBTYPE_SH7710 | 101 | config CPU_SUBTYPE_SH7710 |
102 | bool "Support SH7710 processor" | 102 | bool "Support SH7710 processor" |
103 | select CPU_SH3 | 103 | select CPU_SH3 |
104 | select CPU_HAS_IPR_IRQ | ||
104 | help | 105 | help |
105 | Select SH7710 if you have a SH3-DSP SH7710 CPU. | 106 | Select SH7710 if you have a SH3-DSP SH7710 CPU. |
106 | 107 | ||
108 | config CPU_SUBTYPE_SH7712 | ||
109 | bool "Support SH7712 processor" | ||
110 | select CPU_SH3 | ||
111 | select CPU_HAS_IPR_IRQ | ||
112 | help | ||
113 | Select SH7712 if you have a SH3-DSP SH7712 CPU. | ||
114 | |||
107 | comment "SH-4 Processor Support" | 115 | comment "SH-4 Processor Support" |
108 | 116 | ||
109 | config CPU_SUBTYPE_SH7750 | 117 | config CPU_SUBTYPE_SH7750 |