aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/boards/se/770x/irq.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/boards/se/770x/irq.c')
-rw-r--r--arch/sh/boards/se/770x/irq.c80
1 files changed, 80 insertions, 0 deletions
diff --git a/arch/sh/boards/se/770x/irq.c b/arch/sh/boards/se/770x/irq.c
new file mode 100644
index 000000000000..210897b315f4
--- /dev/null
+++ b/arch/sh/boards/se/770x/irq.c
@@ -0,0 +1,80 @@
1/*
2 * linux/arch/sh/boards/se/770x/irq.c
3 *
4 * Copyright (C) 2000 Kazumoto Kojima
5 *
6 * Hitachi SolutionEngine Support.
7 *
8 */
9
10#include <linux/config.h>
11#include <linux/init.h>
12#include <linux/irq.h>
13#include <asm/irq.h>
14#include <asm/io.h>
15#include <asm/se/se.h>
16
17/*
18 * Initialize IRQ setting
19 */
20void __init init_se_IRQ(void)
21{
22 /*
23 * Super I/O (Just mimic PC):
24 * 1: keyboard
25 * 3: serial 0
26 * 4: serial 1
27 * 5: printer
28 * 6: floppy
29 * 8: rtc
30 * 12: mouse
31 * 14: ide0
32 */
33#if defined(CONFIG_CPU_SUBTYPE_SH7705)
34 /* Disable all interrupts */
35 ctrl_outw(0, BCR_ILCRA);
36 ctrl_outw(0, BCR_ILCRB);
37 ctrl_outw(0, BCR_ILCRC);
38 ctrl_outw(0, BCR_ILCRD);
39 ctrl_outw(0, BCR_ILCRE);
40 ctrl_outw(0, BCR_ILCRF);
41 ctrl_outw(0, BCR_ILCRG);
42 /* This is default value */
43 make_ipr_irq(0xf-0x2, BCR_ILCRA, 2, 0x2);
44 make_ipr_irq(0xf-0xa, BCR_ILCRA, 1, 0xa);
45 make_ipr_irq(0xf-0x5, BCR_ILCRB, 0, 0x5);
46 make_ipr_irq(0xf-0x8, BCR_ILCRC, 1, 0x8);
47 make_ipr_irq(0xf-0xc, BCR_ILCRC, 0, 0xc);
48 make_ipr_irq(0xf-0xe, BCR_ILCRD, 3, 0xe);
49 make_ipr_irq(0xf-0x3, BCR_ILCRD, 1, 0x3); /* LAN */
50 make_ipr_irq(0xf-0xd, BCR_ILCRE, 2, 0xd);
51 make_ipr_irq(0xf-0x9, BCR_ILCRE, 1, 0x9);
52 make_ipr_irq(0xf-0x1, BCR_ILCRE, 0, 0x1);
53 make_ipr_irq(0xf-0xf, BCR_ILCRF, 3, 0xf);
54 make_ipr_irq(0xf-0xb, BCR_ILCRF, 1, 0xb);
55 make_ipr_irq(0xf-0x7, BCR_ILCRG, 3, 0x7);
56 make_ipr_irq(0xf-0x6, BCR_ILCRG, 2, 0x6);
57 make_ipr_irq(0xf-0x4, BCR_ILCRG, 1, 0x4);
58#else
59 make_ipr_irq(14, BCR_ILCRA, 2, 0x0f-14);
60 make_ipr_irq(12, BCR_ILCRA, 1, 0x0f-12);
61 make_ipr_irq( 8, BCR_ILCRB, 1, 0x0f- 8);
62 make_ipr_irq( 6, BCR_ILCRC, 3, 0x0f- 6);
63 make_ipr_irq( 5, BCR_ILCRC, 2, 0x0f- 5);
64 make_ipr_irq( 4, BCR_ILCRC, 1, 0x0f- 4);
65 make_ipr_irq( 3, BCR_ILCRC, 0, 0x0f- 3);
66 make_ipr_irq( 1, BCR_ILCRD, 3, 0x0f- 1);
67
68 make_ipr_irq(10, BCR_ILCRD, 1, 0x0f-10); /* LAN */
69
70 make_ipr_irq( 0, BCR_ILCRE, 3, 0x0f- 0); /* PCIRQ3 */
71 make_ipr_irq(11, BCR_ILCRE, 2, 0x0f-11); /* PCIRQ2 */
72 make_ipr_irq( 9, BCR_ILCRE, 1, 0x0f- 9); /* PCIRQ1 */
73 make_ipr_irq( 7, BCR_ILCRE, 0, 0x0f- 7); /* PCIRQ0 */
74
75 /* #2, #13 are allocated for SLOT IRQ #1 and #2 (for now) */
76 /* NOTE: #2 and #13 are not used on PC */
77 make_ipr_irq(13, BCR_ILCRG, 1, 0x0f-13); /* SLOTIRQ2 */
78 make_ipr_irq( 2, BCR_ILCRG, 0, 0x0f- 2); /* SLOTIRQ1 */
79#endif
80}