aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2007-11-21 09:16:33 -0500
committerPaul Mundt <lethal@linux-sh.org>2008-01-27 23:18:54 -0500
commit18bc81319b438ae3266e1b2653ce874912dae891 (patch)
treea0fc683c0beafdafc360f5ad77c995d55df684fd /arch
parentcaead5ef34e5abdda8c5189cf698e0b863904701 (diff)
sh: Get the mach-cayman IRQ support building.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/sh/kernel/cpu/irq/Makefile1
-rw-r--r--arch/sh/kernel/cpu/irq/intc-sh5.c (renamed from arch/sh64/kernel/irq_intc.c)23
-rw-r--r--arch/sh/kernel/cpu/sh5/Makefile4
-rw-r--r--arch/sh/kernel/cpu/sh5/setup-sh5-101.c15
-rw-r--r--arch/sh/mach-cayman/Makefile8
-rw-r--r--arch/sh/mach-cayman/iomap.c22
-rw-r--r--arch/sh/mach-cayman/irq.c26
-rw-r--r--arch/sh/mach-cayman/setup.c94
8 files changed, 41 insertions, 152 deletions
diff --git a/arch/sh/kernel/cpu/irq/Makefile b/arch/sh/kernel/cpu/irq/Makefile
index 81d37e948b86..cc1836e47a5d 100644
--- a/arch/sh/kernel/cpu/irq/Makefile
+++ b/arch/sh/kernel/cpu/irq/Makefile
@@ -4,5 +4,6 @@
4obj-y += intc.o 4obj-y += intc.o
5 5
6obj-$(CONFIG_SUPERH32) += imask.o 6obj-$(CONFIG_SUPERH32) += imask.o
7obj-$(CONFIG_CPU_SH5) += intc-sh5.o
7obj-$(CONFIG_CPU_HAS_IPR_IRQ) += ipr.o 8obj-$(CONFIG_CPU_HAS_IPR_IRQ) += ipr.o
8obj-$(CONFIG_CPU_HAS_MASKREG_IRQ) += maskreg.o 9obj-$(CONFIG_CPU_HAS_MASKREG_IRQ) += maskreg.o
diff --git a/arch/sh64/kernel/irq_intc.c b/arch/sh/kernel/cpu/irq/intc-sh5.c
index 3b63a93198f2..49b845a31fff 100644
--- a/arch/sh64/kernel/irq_intc.c
+++ b/arch/sh/kernel/cpu/irq/intc-sh5.c
@@ -14,21 +14,14 @@
14 * controller. 14 * controller.
15 * 15 *
16 */ 16 */
17
18#include <linux/init.h> 17#include <linux/init.h>
19#include <linux/interrupt.h> 18#include <linux/interrupt.h>
20#include <linux/irq.h> 19#include <linux/irq.h>
20#include <linux/io.h>
21#include <linux/kernel.h> 21#include <linux/kernel.h>
22#include <linux/stddef.h> 22#include <linux/bitops.h>
23#include <linux/bitops.h> /* this includes also <asm/registers.h */ 23#include <asm/cpu/irq.h>
24 /* which is required to remap register */
25 /* names used into __asm__ blocks... */
26
27#include <asm/hardware.h>
28#include <asm/platform.h>
29#include <asm/page.h> 24#include <asm/page.h>
30#include <asm/io.h>
31#include <asm/irq.h>
32 25
33/* 26/*
34 * Maybe the generic Peripheral block could move to a more 27 * Maybe the generic Peripheral block could move to a more
@@ -192,7 +185,7 @@ int intc_irq_describe(char* p, int irq)
192} 185}
193#endif 186#endif
194 187
195void __init init_IRQ(void) 188void __init plat_irq_setup(void)
196{ 189{
197 unsigned long long __dummy0, __dummy1=~0x00000000100000f0; 190 unsigned long long __dummy0, __dummy1=~0x00000000100000f0;
198 unsigned long reg; 191 unsigned long reg;
@@ -251,14 +244,6 @@ void __init init_IRQ(void)
251 } 244 }
252 } 245 }
253 246
254#ifdef CONFIG_SH_CAYMAN
255 {
256 extern void init_cayman_irq(void);
257
258 init_cayman_irq();
259 }
260#endif
261
262 /* 247 /*
263 * And now let interrupts come in. 248 * And now let interrupts come in.
264 * sti() is not enough, we need to 249 * sti() is not enough, we need to
diff --git a/arch/sh/kernel/cpu/sh5/Makefile b/arch/sh/kernel/cpu/sh5/Makefile
index 0ef257b72e5d..8646363e9ded 100644
--- a/arch/sh/kernel/cpu/sh5/Makefile
+++ b/arch/sh/kernel/cpu/sh5/Makefile
@@ -5,7 +5,3 @@ obj-y := entry.o probe.o switchto.o
5 5
6obj-$(CONFIG_SH_FPU) += fpu.o 6obj-$(CONFIG_SH_FPU) += fpu.o
7obj-$(CONFIG_KALLSYMS) += unwind.o 7obj-$(CONFIG_KALLSYMS) += unwind.o
8
9# CPU subtype setup
10obj-$(CONFIG_CPU_SUBTYPE_SH5_101) += setup-sh5-101.o
11obj-$(CONFIG_CPU_SUBTYPE_SH5_103) += setup-sh5-101.o
diff --git a/arch/sh/kernel/cpu/sh5/setup-sh5-101.c b/arch/sh/kernel/cpu/sh5/setup-sh5-101.c
deleted file mode 100644
index 3680012d7109..000000000000
--- a/arch/sh/kernel/cpu/sh5/setup-sh5-101.c
+++ /dev/null
@@ -1,15 +0,0 @@
1/*
2 * SH5-101 Setup
3 *
4 * Copyright (C) 2007 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/init.h>
11
12void __init plat_irq_setup(void)
13{
14 /* do nothing - all IRL interrupts are handled by the board code */
15}
diff --git a/arch/sh/mach-cayman/Makefile b/arch/sh/mach-cayman/Makefile
index 67a2258bf8c4..489a8f867368 100644
--- a/arch/sh/mach-cayman/Makefile
+++ b/arch/sh/mach-cayman/Makefile
@@ -1,11 +1,5 @@
1# 1#
2# Makefile for the Hitachi Cayman specific parts of the kernel 2# Makefile for the Hitachi Cayman specific parts of the kernel
3# 3#
4# Note! Dependencies are done automagically by 'make dep', which also 4obj-y := setup.o irq.o
5# removes any old dependencies. DON'T put your own dependencies here
6# unless it's something special (ie not a .c file).
7#
8
9obj-y := setup.o irq.o iomap.o
10obj-$(CONFIG_HEARTBEAT) += led.o 5obj-$(CONFIG_HEARTBEAT) += led.o
11
diff --git a/arch/sh/mach-cayman/iomap.c b/arch/sh/mach-cayman/iomap.c
deleted file mode 100644
index a5c645f02d57..000000000000
--- a/arch/sh/mach-cayman/iomap.c
+++ /dev/null
@@ -1,22 +0,0 @@
1/*
2 * arch/sh64/mach-cayman/iomap.c
3 *
4 * Cayman iomap interface
5 *
6 * Copyright (C) 2004 Paul Mundt
7 *
8 * This file is subject to the terms and conditions of the GNU General Public
9 * License. See the file "COPYING" in the main directory of this archive
10 * for more details.
11 */
12#include <asm/io.h>
13#include <asm/cayman.h>
14
15void __iomem *ioport_map(unsigned long port, unsigned int len)
16{
17 if (port < 0x400)
18 return (void __iomem *)((port << 2) | smsc_superio_virt);
19
20 return (void __iomem *)port;
21}
22
diff --git a/arch/sh/mach-cayman/irq.c b/arch/sh/mach-cayman/irq.c
index aaad36d37d1f..30ec7bebfaf1 100644
--- a/arch/sh/mach-cayman/irq.c
+++ b/arch/sh/mach-cayman/irq.c
@@ -1,24 +1,26 @@
1/* 1/*
2 * This file is subject to the terms and conditions of the GNU General Public 2 * arch/sh/mach-cayman/irq.c - SH-5 Cayman Interrupt Support
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * arch/sh64/kernel/irq_cayman.c
7 *
8 * SH-5 Cayman Interrupt Support
9 * 3 *
10 * This file handles the board specific parts of the Cayman interrupt system 4 * This file handles the board specific parts of the Cayman interrupt system
11 * 5 *
12 * Copyright (C) 2002 Stuart Menefy 6 * Copyright (C) 2002 Stuart Menefy
7 *
8 * This file is subject to the terms and conditions of the GNU General Public
9 * License. See the file "COPYING" in the main directory of this archive
10 * for more details.
13 */ 11 */
14 12#include <linux/io.h>
15#include <asm/irq.h>
16#include <asm/page.h>
17#include <asm/io.h>
18#include <linux/irq.h> 13#include <linux/irq.h>
19#include <linux/interrupt.h> 14#include <linux/interrupt.h>
20#include <linux/signal.h> 15#include <linux/signal.h>
21#include <asm/cayman.h> 16#include <asm/cpu/irq.h>
17#include <asm/page.h>
18
19/* Setup for the SMSC FDC37C935 / LAN91C100FD */
20#define SMSC_IRQ IRQ_IRL1
21
22/* Setup for PCI Bus 2, which transmits interrupts via the EPLD */
23#define PCI2_IRQ IRQ_IRL3
22 24
23unsigned long epld_virt; 25unsigned long epld_virt;
24 26
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
97unsigned long smsc_superio_virt; 88unsigned long smsc_superio_virt;
98 89
99/*
100 * Platform dependent structures: maps and parms block.
101 */
102struct resource io_resources[] = {
103 /* To be updated with external devices */
104};
105
106struct 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
113struct resource xram_resources[] = {
114 /* To be updated with external devices */
115};
116
117struct resource rom_resources[] = {
118 /* To be updated with external devices */
119};
120
121struct 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
135int platform_int_priority[NR_INTC_IRQS] = { 90int 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
219void __init platform_setup(void) 170static 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
225void __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
230void __init platform_reserve(void) 177 return (void __iomem *)port;
231{
232 /* Nothing yet .. */
233} 178}
234 179
235const char *get_system_type(void) 180extern void init_cayman_irq(void);
236{
237 return "Hitachi Cayman";
238}
239 181
182static 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};