Commit | Line | Data |
---|---|---|
1da177e4 LT |
1 | /* |
2 | * linux/arch/sh/boards/se/7300/irq.c | |
3 | * | |
4 | * Copyright (C) 2003 Takashi Kusuda <kusuda-takashi@hitachi-ul.co.jp> | |
5 | * | |
6 | * SH-Mobile SolutionEngine 7300 Support. | |
7 | * | |
8 | */ | |
9 | ||
1da177e4 LT |
10 | #include <linux/init.h> |
11 | #include <linux/irq.h> | |
12 | #include <asm/irq.h> | |
13 | #include <asm/io.h> | |
373e68b5 | 14 | #include <asm/se7300.h> |
1da177e4 | 15 | |
bd71ab88 JL |
16 | static struct ipr_data se7300_ipr_map[] = { |
17 | /* PC_IRQ[0-3] -> IRQ0 (32) */ | |
18 | { IRQ0_IRQ, IRQ0_IPR_ADDR, IRQ0_IPR_POS, 0x0f - IRQ0_IRQ }, | |
19 | /* A_IRQ[0-3] -> IRQ1 (33) */ | |
20 | { IRQ1_IRQ, IRQ1_IPR_ADDR, IRQ1_IPR_POS, 0x0f - IRQ1_IRQ }, | |
21 | { SIOF0_IRQ, SIOF0_IPR_ADDR, SIOF0_IPR_POS, SIOF0_PRIORITY }, | |
22 | { DMTE2_IRQ, DMA1_IPR_ADDR, DMA1_IPR_POS, DMA1_PRIORITY }, | |
23 | { DMTE3_IRQ, DMA1_IPR_ADDR, DMA1_IPR_POS, DMA1_PRIORITY }, | |
24 | { VIO_IRQ, VIO_IPR_ADDR, VIO_IPR_POS, VIO_PRIORITY }, | |
25 | }; | |
26 | ||
1da177e4 LT |
27 | /* |
28 | * Initialize IRQ setting | |
29 | */ | |
30 | void __init | |
31 | init_7300se_IRQ(void) | |
32 | { | |
33 | ctrl_outw(0x0028, PA_EPLD_MODESET); /* mode set IRQ0,1 active low. */ | |
34 | ctrl_outw(0xa000, INTC_ICR1); /* IRQ mode; IRQ0,1 enable. */ | |
35 | ctrl_outw(0x0000, PORT_PFCR); /* use F for IRQ[3:0] and SIU. */ | |
36 | ||
bd71ab88 | 37 | make_ipr_irq(se7300_ipr_map, ARRAY_SIZE(se7300_ipr_map)); |
1da177e4 LT |
38 | |
39 | ctrl_outw(0x2000, PA_MRSHPC + 0x0c); /* mrshpc irq enable */ | |
40 | } |