aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/boards/renesas/r7780rp/irq-r7785rp.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/boards/renesas/r7780rp/irq-r7785rp.c')
-rw-r--r--arch/sh/boards/renesas/r7780rp/irq-r7785rp.c46
1 files changed, 41 insertions, 5 deletions
diff --git a/arch/sh/boards/renesas/r7780rp/irq-r7785rp.c b/arch/sh/boards/renesas/r7780rp/irq-r7785rp.c
index dd6ec4ce44dc..b2c6a84673bd 100644
--- a/arch/sh/boards/renesas/r7780rp/irq-r7785rp.c
+++ b/arch/sh/boards/renesas/r7780rp/irq-r7785rp.c
@@ -1,19 +1,55 @@
1/* 1/*
2 * Renesas Solutions Highlander R7780RP-1 Support. 2 * Renesas Solutions Highlander R7785RP Support.
3 * 3 *
4 * Copyright (C) 2002 Atom Create Engineering Co., Ltd. 4 * Copyright (C) 2002 Atom Create Engineering Co., Ltd.
5 * Copyright (C) 2006 Paul Mundt 5 * Copyright (C) 2006 Paul Mundt
6 * Copyright (C) 2007 Magnus Damm
6 * 7 *
7 * This file is subject to the terms and conditions of the GNU General Public 8 * This file is subject to the terms and conditions of the GNU General Public
8 * License. See the file "COPYING" in the main directory of this archive 9 * License. See the file "COPYING" in the main directory of this archive
9 * for more details. 10 * for more details.
10 */ 11 */
11#include <linux/init.h> 12#include <linux/init.h>
12#include <asm/io.h> 13#include <linux/irq.h>
14#include <linux/io.h>
13#include <asm/r7780rp.h> 15#include <asm/r7780rp.h>
14 16
15void __init highlander_init_irq(void) 17enum {
18 UNUSED = 0,
19
20 /* board specific interrupt sources */
21 AX88796, /* Ethernet controller */
22 CF, /* Compact Flash */
23};
24
25static struct intc_vect vectors[] __initdata = {
26 INTC_IRQ(CF, IRQ_CF),
27 INTC_IRQ(AX88796, IRQ_AX88796),
28};
29
30static struct intc_mask_reg mask_registers[] __initdata = {
31 { 0xa4000010, 0, 16, /* IRLMCR1 */
32 { 0, 0, 0, 0, CF, AX88796, 0, 0,
33 0, 0, 0, 0, 0, 0, 0, 0 } },
34};
35
36static unsigned char irl2irq[HL_NR_IRL] __initdata = {
37 0, IRQ_CF, 0, 0,
38 0, 0, 0, 0,
39 0, 0, IRQ_AX88796, 0,
40 0, 0, 0,
41};
42
43static DECLARE_INTC_DESC(intc_desc, "r7785rp", vectors,
44 NULL, NULL, mask_registers, NULL, NULL);
45
46unsigned char * __init highlander_init_irq_r7785rp(void)
16{ 47{
48 if ((ctrl_inw(0xa4000158) & 0xf000) != 0x1000)
49 return NULL;
50
51 printk(KERN_INFO "Using r7785rp interrupt controller.\n");
52
17 ctrl_outw(0x0000, PA_IRLSSR1); /* FPGA IRLSSR1(CF_CD clear) */ 53 ctrl_outw(0x0000, PA_IRLSSR1); /* FPGA IRLSSR1(CF_CD clear) */
18 54
19 /* Setup the FPGA IRL */ 55 /* Setup the FPGA IRL */
@@ -24,6 +60,6 @@ void __init highlander_init_irq(void)
24 ctrl_outw(0x4321, PA_IRLPRE); /* FPGA IRLE */ 60 ctrl_outw(0x4321, PA_IRLPRE); /* FPGA IRLE */
25 ctrl_outw(0x0000, PA_IRLPRF); /* FPGA IRLF */ 61 ctrl_outw(0x0000, PA_IRLPRF); /* FPGA IRLF */
26 62
27 make_r7780rp_irq(1); /* CF card */ 63 register_intc_controller(&intc_desc);
28 make_r7780rp_irq(10); /* On-board ethernet */ 64 return irl2irq;
29} 65}