diff options
author | Nobuhiro Iwamatsu <nobuhiro.iwamatsu.zh@hitachi.com> | 2007-04-25 22:51:00 -0400 |
---|---|---|
committer | Paul Mundt <lethal@hera.kernel.org> | 2007-05-06 22:11:56 -0400 |
commit | 2a8ff4596cde3ec2a51980288ebb28a0d196d19a (patch) | |
tree | a895745a2a0bf676a6740c0529175cf430dee489 /arch/sh/kernel/cpu/sh3 | |
parent | 005a336e71e9e3ea356f9afca5d66318d6901319 (diff) |
sh: Solution Engine SH7705 board and CPU updates.
This fixes up SH7705 CPU support and the SE7705 board
for some of the recent changes.
Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.zh@hitachi.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/cpu/sh3')
-rw-r--r-- | arch/sh/kernel/cpu/sh3/setup-sh7705.c | 54 |
1 files changed, 50 insertions, 4 deletions
diff --git a/arch/sh/kernel/cpu/sh3/setup-sh7705.c b/arch/sh/kernel/cpu/sh3/setup-sh7705.c index a8e41c5241fa..1983fb7ad6ea 100644 --- a/arch/sh/kernel/cpu/sh3/setup-sh7705.c +++ b/arch/sh/kernel/cpu/sh3/setup-sh7705.c | |||
@@ -2,6 +2,7 @@ | |||
2 | * SH7705 Setup | 2 | * SH7705 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 |
@@ -14,15 +15,15 @@ | |||
14 | 15 | ||
15 | static struct plat_sci_port sci_platform_data[] = { | 16 | static struct plat_sci_port sci_platform_data[] = { |
16 | { | 17 | { |
17 | .mapbase = 0xa4400000, | 18 | .mapbase = 0xa4410000, |
18 | .flags = UPF_BOOT_AUTOCONF, | 19 | .flags = UPF_BOOT_AUTOCONF, |
19 | .type = PORT_SCIF, | 20 | .type = PORT_SCIF, |
20 | .irqs = { 52, 53, 55, 54 }, | 21 | .irqs = { 56, 57, 59 }, |
21 | }, { | 22 | }, { |
22 | .mapbase = 0xa4410000, | 23 | .mapbase = 0xa4400000, |
23 | .flags = UPF_BOOT_AUTOCONF, | 24 | .flags = UPF_BOOT_AUTOCONF, |
24 | .type = PORT_SCIF, | 25 | .type = PORT_SCIF, |
25 | .irqs = { 56, 57, 59, 58 }, | 26 | .irqs = { 52, 53, 55 }, |
26 | }, { | 27 | }, { |
27 | .flags = 0, | 28 | .flags = 0, |
28 | } | 29 | } |
@@ -46,3 +47,48 @@ static int __init sh7705_devices_setup(void) | |||
46 | ARRAY_SIZE(sh7705_devices)); | 47 | ARRAY_SIZE(sh7705_devices)); |
47 | } | 48 | } |
48 | __initcall(sh7705_devices_setup); | 49 | __initcall(sh7705_devices_setup); |
50 | |||
51 | static struct ipr_data sh7705_ipr_map[] = { | ||
52 | /* IRQ, IPR-idx, shift, priority */ | ||
53 | { 16, 0, 12, 2 }, /* TMU0 TUNI*/ | ||
54 | { 17, 0, 8, 2 }, /* TMU1 TUNI */ | ||
55 | { 18, 0, 4, 2 }, /* TMU2 TUNI */ | ||
56 | { 27, 1, 12, 2 }, /* WDT ITI */ | ||
57 | { 20, 0, 0, 2 }, /* RTC ATI (alarm) */ | ||
58 | { 21, 0, 0, 2 }, /* RTC PRI (period) */ | ||
59 | { 22, 0, 0, 2 }, /* RTC CUI (carry) */ | ||
60 | { 48, 4, 12, 7 }, /* DMAC DMTE0 */ | ||
61 | { 49, 4, 12, 7 }, /* DMAC DMTE1 */ | ||
62 | { 50, 4, 12, 7 }, /* DMAC DMTE2 */ | ||
63 | { 51, 4, 12, 7 }, /* DMAC DMTE3 */ | ||
64 | { 52, 4, 8, 3 }, /* SCIF0 ERI */ | ||
65 | { 53, 4, 8, 3 }, /* SCIF0 RXI */ | ||
66 | { 55, 4, 8, 3 }, /* SCIF0 TXI */ | ||
67 | { 56, 4, 4, 3 }, /* SCIF1 ERI */ | ||
68 | { 57, 4, 4, 3 }, /* SCIF1 RXI */ | ||
69 | { 59, 4, 4, 3 }, /* SCIF1 TXI */ | ||
70 | }; | ||
71 | |||
72 | static unsigned long ipr_offsets[] = { | ||
73 | 0xFFFFFEE2 /* 0: IPRA */ | ||
74 | , 0xFFFFFEE4 /* 1: IPRB */ | ||
75 | , 0xA4000016 /* 2: IPRC */ | ||
76 | , 0xA4000018 /* 3: IPRD */ | ||
77 | , 0xA400001A /* 4: IPRE */ | ||
78 | , 0xA4080000 /* 5: IPRF */ | ||
79 | , 0xA4080002 /* 6: IPRG */ | ||
80 | , 0xA4080004 /* 7: IPRH */ | ||
81 | }; | ||
82 | |||
83 | /* given the IPR index return the address of the IPR register */ | ||
84 | unsigned int map_ipridx_to_addr(int idx) | ||
85 | { | ||
86 | if (idx >= ARRAY_SIZE(ipr_offsets)) | ||
87 | return 0; | ||
88 | return ipr_offsets[idx]; | ||
89 | } | ||
90 | |||
91 | void __init init_IRQ_ipr() | ||
92 | { | ||
93 | make_ipr_irq(sh7705_ipr_map, ARRAY_SIZE(sh7705_ipr_map)); | ||
94 | } | ||