diff options
Diffstat (limited to 'arch/sh/boards/renesas/r7780rp/irq-r7780rp.c')
-rw-r--r-- | arch/sh/boards/renesas/r7780rp/irq-r7780rp.c | 52 |
1 files changed, 48 insertions, 4 deletions
diff --git a/arch/sh/boards/renesas/r7780rp/irq-r7780rp.c b/arch/sh/boards/renesas/r7780rp/irq-r7780rp.c index fa4a534cade9..bd34048ed0e1 100644 --- a/arch/sh/boards/renesas/r7780rp/irq-r7780rp.c +++ b/arch/sh/boards/renesas/r7780rp/irq-r7780rp.c | |||
@@ -3,21 +3,65 @@ | |||
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) 2008 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> |
13 | #include <linux/irq.h> | ||
12 | #include <linux/io.h> | 14 | #include <linux/io.h> |
13 | #include <asm/r7780rp.h> | 15 | #include <asm/r7780rp.h> |
14 | 16 | ||
17 | enum { | ||
18 | UNUSED = 0, | ||
19 | |||
20 | /* board specific interrupt sources */ | ||
21 | |||
22 | AX88796, /* Ethernet controller */ | ||
23 | PSW, /* Push Switch */ | ||
24 | CF, /* Compact Flash */ | ||
25 | |||
26 | PCI_A, | ||
27 | PCI_B, | ||
28 | PCI_C, | ||
29 | PCI_D, | ||
30 | }; | ||
31 | |||
32 | static struct intc_vect vectors[] __initdata = { | ||
33 | INTC_IRQ(PCI_A, 65), /* dirty: overwrite cpu vectors for pci */ | ||
34 | INTC_IRQ(PCI_B, 66), | ||
35 | INTC_IRQ(PCI_C, 67), | ||
36 | INTC_IRQ(PCI_D, 68), | ||
37 | INTC_IRQ(CF, IRQ_CF), | ||
38 | INTC_IRQ(PSW, IRQ_PSW), | ||
39 | INTC_IRQ(AX88796, IRQ_AX88796), | ||
40 | }; | ||
41 | |||
42 | static struct intc_mask_reg mask_registers[] __initdata = { | ||
43 | { 0xa5000000, 0, 16, /* IRLMSK */ | ||
44 | { PCI_A, PCI_B, PCI_C, PCI_D, CF, 0, 0, 0, | ||
45 | 0, 0, 0, 0, 0, 0, PSW, AX88796 } }, | ||
46 | }; | ||
47 | |||
48 | static unsigned char irl2irq[HL_NR_IRL] __initdata = { | ||
49 | 65, 66, 67, 68, | ||
50 | IRQ_CF, 0, 0, 0, | ||
51 | 0, 0, 0, 0, | ||
52 | IRQ_AX88796, IRQ_PSW | ||
53 | }; | ||
54 | |||
55 | static DECLARE_INTC_DESC(intc_desc, "r7780rp", vectors, | ||
56 | NULL, mask_registers, NULL, NULL); | ||
57 | |||
15 | unsigned char * __init highlander_init_irq_r7780rp(void) | 58 | unsigned char * __init highlander_init_irq_r7780rp(void) |
16 | { | 59 | { |
17 | int i; | 60 | if (ctrl_inw(0xa5000600)) { |
18 | 61 | printk(KERN_INFO "Using r7780rp interrupt controller.\n"); | |
19 | for (i = 0; i < 15; i++) | 62 | register_intc_controller(&intc_desc); |
20 | make_r7780rp_irq(i); | 63 | return irl2irq; |
64 | } | ||
21 | 65 | ||
22 | return NULL; | 66 | return NULL; |
23 | } | 67 | } |