diff options
author | Paul Mundt <lethal@linux-sh.org> | 2007-11-21 09:16:33 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2008-01-27 23:18:54 -0500 |
commit | 18bc81319b438ae3266e1b2653ce874912dae891 (patch) | |
tree | a0fc683c0beafdafc360f5ad77c995d55df684fd /arch/sh/mach-cayman/setup.c | |
parent | caead5ef34e5abdda8c5189cf698e0b863904701 (diff) |
sh: Get the mach-cayman IRQ support building.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/mach-cayman/setup.c')
-rw-r--r-- | arch/sh/mach-cayman/setup.c | 94 |
1 files changed, 21 insertions, 73 deletions
diff --git a/arch/sh/mach-cayman/setup.c b/arch/sh/mach-cayman/setup.c index 726c520d7eb9..8c9fa472d8f5 100644 --- a/arch/sh/mach-cayman/setup.c +++ b/arch/sh/mach-cayman/setup.c | |||
@@ -1,28 +1,19 @@ | |||
1 | /* | 1 | /* |
2 | * This file is subject to the terms and conditions of the GNU General Public | 2 | * arch/sh/mach-cayman/setup.c |
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * arch/sh64/mach-cayman/setup.c | ||
7 | * | 3 | * |
8 | * SH5 Cayman support | 4 | * SH5 Cayman support |
9 | * | 5 | * |
10 | * This file handles the architecture-dependent parts of initialization | 6 | * Copyright (C) 2002 David J. Mckay & Benedict Gaster |
7 | * Copyright (C) 2003 - 2007 Paul Mundt | ||
11 | * | 8 | * |
12 | * Copyright David J. Mckay. | 9 | * This file is subject to the terms and conditions of the GNU General Public |
13 | * Needs major work! | 10 | * License. See the file "COPYING" in the main directory of this archive |
14 | * | 11 | * for more details. |
15 | * benedict.gaster@superh.com: 3rd May 2002 | ||
16 | * Added support for ramdisk, removing statically linked romfs at the same time. | ||
17 | * | ||
18 | * lethal@linux-sh.org: 15th May 2003 | ||
19 | * Use the generic procfs cpuinfo interface, just return a valid board name. | ||
20 | */ | 12 | */ |
21 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/io.h> | ||
22 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
23 | #include <asm/platform.h> | 16 | #include <asm/cpu/irq.h> |
24 | #include <asm/irq.h> | ||
25 | #include <asm/io.h> | ||
26 | 17 | ||
27 | /* | 18 | /* |
28 | * Platform Dependent Interrupt Priorities. | 19 | * Platform Dependent Interrupt Priorities. |
@@ -96,42 +87,6 @@ | |||
96 | 87 | ||
97 | unsigned long smsc_superio_virt; | 88 | unsigned long smsc_superio_virt; |
98 | 89 | ||
99 | /* | ||
100 | * Platform dependent structures: maps and parms block. | ||
101 | */ | ||
102 | struct resource io_resources[] = { | ||
103 | /* To be updated with external devices */ | ||
104 | }; | ||
105 | |||
106 | struct resource kram_resources[] = { | ||
107 | /* These must be last in the array */ | ||
108 | { .name = "Kernel code", .start = 0, .end = 0 }, | ||
109 | /* These must be last in the array */ | ||
110 | { .name = "Kernel data", .start = 0, .end = 0 } | ||
111 | }; | ||
112 | |||
113 | struct resource xram_resources[] = { | ||
114 | /* To be updated with external devices */ | ||
115 | }; | ||
116 | |||
117 | struct resource rom_resources[] = { | ||
118 | /* To be updated with external devices */ | ||
119 | }; | ||
120 | |||
121 | struct sh64_platform platform_parms = { | ||
122 | .readonly_rootfs = 1, | ||
123 | .initial_root_dev = 0x0100, | ||
124 | .loader_type = 1, | ||
125 | .io_res_p = io_resources, | ||
126 | .io_res_count = ARRAY_SIZE(io_resources), | ||
127 | .kram_res_p = kram_resources, | ||
128 | .kram_res_count = ARRAY_SIZE(kram_resources), | ||
129 | .xram_res_p = xram_resources, | ||
130 | .xram_res_count = ARRAY_SIZE(xram_resources), | ||
131 | .rom_res_p = rom_resources, | ||
132 | .rom_res_count = ARRAY_SIZE(rom_resources), | ||
133 | }; | ||
134 | |||
135 | int platform_int_priority[NR_INTC_IRQS] = { | 90 | int platform_int_priority[NR_INTC_IRQS] = { |
136 | IR0, IR1, IR2, IR3, PCA, PCB, PCC, PCD, /* IRQ 0- 7 */ | 91 | IR0, IR1, IR2, IR3, PCA, PCB, PCC, PCD, /* IRQ 0- 7 */ |
137 | RES, RES, RES, RES, SER, ERR, PW3, PW2, /* IRQ 8-15 */ | 92 | RES, RES, RES, RES, SER, ERR, PW3, PW2, /* IRQ 8-15 */ |
@@ -210,30 +165,23 @@ static int __init smsc_superio_setup(void) | |||
210 | 165 | ||
211 | return 0; | 166 | return 0; |
212 | } | 167 | } |
213 | |||
214 | /* This is grotty, but, because kernel is always referenced on the link line | ||
215 | * before any devices, this is safe. | ||
216 | */ | ||
217 | __initcall(smsc_superio_setup); | 168 | __initcall(smsc_superio_setup); |
218 | 169 | ||
219 | void __init platform_setup(void) | 170 | static void __iomem *cayman_ioport_map(unsigned long port, unsigned int len) |
220 | { | ||
221 | /* Cayman platform leaves the decision to head.S, for now */ | ||
222 | platform_parms.fpu_flags = fpu_in_use; | ||
223 | } | ||
224 | |||
225 | void __init platform_monitor(void) | ||
226 | { | 171 | { |
227 | /* Nothing yet .. */ | 172 | if (port < 0x400) { |
228 | } | 173 | extern unsigned long smsc_superio_virt; |
174 | return (void __iomem *)((port << 2) | smsc_superio_virt); | ||
175 | } | ||
229 | 176 | ||
230 | void __init platform_reserve(void) | 177 | return (void __iomem *)port; |
231 | { | ||
232 | /* Nothing yet .. */ | ||
233 | } | 178 | } |
234 | 179 | ||
235 | const char *get_system_type(void) | 180 | extern void init_cayman_irq(void); |
236 | { | ||
237 | return "Hitachi Cayman"; | ||
238 | } | ||
239 | 181 | ||
182 | static struct sh_machine_vector mv_cayman __initmv = { | ||
183 | .mv_name = "Hitachi Cayman", | ||
184 | .mv_nr_irqs = 64, | ||
185 | .mv_ioport_map = cayman_ioport_map, | ||
186 | .mv_init_irq = init_cayman_irq, | ||
187 | }; | ||