diff options
Diffstat (limited to 'include/asm-ppc/amigaints.h')
-rw-r--r-- | include/asm-ppc/amigaints.h | 133 |
1 files changed, 133 insertions, 0 deletions
diff --git a/include/asm-ppc/amigaints.h b/include/asm-ppc/amigaints.h new file mode 100644 index 000000000000..aa3ff6349e81 --- /dev/null +++ b/include/asm-ppc/amigaints.h | |||
@@ -0,0 +1,133 @@ | |||
1 | /* | ||
2 | ** amigaints.h -- Amiga Linux interrupt handling structs and prototypes | ||
3 | ** | ||
4 | ** Copyright 1992 by Greg Harp | ||
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 | ** Created 10/2/92 by Greg Harp | ||
11 | */ | ||
12 | |||
13 | #ifdef __KERNEL__ | ||
14 | #ifndef _ASMm68k_AMIGAINTS_H_ | ||
15 | #define _ASMm68k_AMIGAINTS_H_ | ||
16 | |||
17 | /* | ||
18 | ** Amiga Interrupt sources. | ||
19 | ** | ||
20 | */ | ||
21 | |||
22 | #define AUTO_IRQS (8) | ||
23 | #define AMI_STD_IRQS (14) | ||
24 | #define CIA_IRQS (5) | ||
25 | #define AMI_IRQS (32) /* AUTO_IRQS+AMI_STD_IRQS+2*CIA_IRQS */ | ||
26 | |||
27 | /* vertical blanking interrupt */ | ||
28 | #define IRQ_AMIGA_VERTB 0 | ||
29 | |||
30 | /* copper interrupt */ | ||
31 | #define IRQ_AMIGA_COPPER 1 | ||
32 | |||
33 | /* Audio interrupts */ | ||
34 | #define IRQ_AMIGA_AUD0 2 | ||
35 | #define IRQ_AMIGA_AUD1 3 | ||
36 | #define IRQ_AMIGA_AUD2 4 | ||
37 | #define IRQ_AMIGA_AUD3 5 | ||
38 | |||
39 | /* Blitter done interrupt */ | ||
40 | #define IRQ_AMIGA_BLIT 6 | ||
41 | |||
42 | /* floppy disk interrupts */ | ||
43 | #define IRQ_AMIGA_DSKSYN 7 | ||
44 | #define IRQ_AMIGA_DSKBLK 8 | ||
45 | |||
46 | /* builtin serial port interrupts */ | ||
47 | #define IRQ_AMIGA_RBF 9 | ||
48 | #define IRQ_AMIGA_TBE 10 | ||
49 | |||
50 | /* software interrupts */ | ||
51 | #define IRQ_AMIGA_SOFT 11 | ||
52 | |||
53 | /* interrupts from external hardware */ | ||
54 | #define IRQ_AMIGA_PORTS 12 | ||
55 | #define IRQ_AMIGA_EXTER 13 | ||
56 | |||
57 | /* CIA interrupt sources */ | ||
58 | #define IRQ_AMIGA_CIAA 14 | ||
59 | #define IRQ_AMIGA_CIAA_TA 14 | ||
60 | #define IRQ_AMIGA_CIAA_TB 15 | ||
61 | #define IRQ_AMIGA_CIAA_ALRM 16 | ||
62 | #define IRQ_AMIGA_CIAA_SP 17 | ||
63 | #define IRQ_AMIGA_CIAA_FLG 18 | ||
64 | #define IRQ_AMIGA_CIAB 19 | ||
65 | #define IRQ_AMIGA_CIAB_TA 19 | ||
66 | #define IRQ_AMIGA_CIAB_TB 20 | ||
67 | #define IRQ_AMIGA_CIAB_ALRM 21 | ||
68 | #define IRQ_AMIGA_CIAB_SP 22 | ||
69 | #define IRQ_AMIGA_CIAB_FLG 23 | ||
70 | |||
71 | /* auto-vector interrupts */ | ||
72 | #define IRQ_AMIGA_AUTO 24 | ||
73 | #define IRQ_AMIGA_AUTO_0 24 /* This is just a dummy */ | ||
74 | #define IRQ_AMIGA_AUTO_1 25 | ||
75 | #define IRQ_AMIGA_AUTO_2 26 | ||
76 | #define IRQ_AMIGA_AUTO_3 27 | ||
77 | #define IRQ_AMIGA_AUTO_4 28 | ||
78 | #define IRQ_AMIGA_AUTO_5 29 | ||
79 | #define IRQ_AMIGA_AUTO_6 30 | ||
80 | #define IRQ_AMIGA_AUTO_7 31 | ||
81 | |||
82 | #define IRQ_FLOPPY IRQ_AMIGA_DSKBLK | ||
83 | |||
84 | /* INTREQR masks */ | ||
85 | #define IRQ1_MASK 0x0007 /* INTREQR mask for IRQ 1 */ | ||
86 | #define IRQ2_MASK 0x0008 /* INTREQR mask for IRQ 2 */ | ||
87 | #define IRQ3_MASK 0x0070 /* INTREQR mask for IRQ 3 */ | ||
88 | #define IRQ4_MASK 0x0780 /* INTREQR mask for IRQ 4 */ | ||
89 | #define IRQ5_MASK 0x1800 /* INTREQR mask for IRQ 5 */ | ||
90 | #define IRQ6_MASK 0x2000 /* INTREQR mask for IRQ 6 */ | ||
91 | #define IRQ7_MASK 0x4000 /* INTREQR mask for IRQ 7 */ | ||
92 | |||
93 | #define IF_SETCLR 0x8000 /* set/clr bit */ | ||
94 | #define IF_INTEN 0x4000 /* master interrupt bit in INT* registers */ | ||
95 | #define IF_EXTER 0x2000 /* external level 6 and CIA B interrupt */ | ||
96 | #define IF_DSKSYN 0x1000 /* disk sync interrupt */ | ||
97 | #define IF_RBF 0x0800 /* serial receive buffer full interrupt */ | ||
98 | #define IF_AUD3 0x0400 /* audio channel 3 done interrupt */ | ||
99 | #define IF_AUD2 0x0200 /* audio channel 2 done interrupt */ | ||
100 | #define IF_AUD1 0x0100 /* audio channel 1 done interrupt */ | ||
101 | #define IF_AUD0 0x0080 /* audio channel 0 done interrupt */ | ||
102 | #define IF_BLIT 0x0040 /* blitter done interrupt */ | ||
103 | #define IF_VERTB 0x0020 /* vertical blanking interrupt */ | ||
104 | #define IF_COPER 0x0010 /* copper interrupt */ | ||
105 | #define IF_PORTS 0x0008 /* external level 2 and CIA A interrupt */ | ||
106 | #define IF_SOFT 0x0004 /* software initiated interrupt */ | ||
107 | #define IF_DSKBLK 0x0002 /* diskblock DMA finished */ | ||
108 | #define IF_TBE 0x0001 /* serial transmit buffer empty interrupt */ | ||
109 | |||
110 | extern void amiga_do_irq(int irq, struct pt_regs *fp); | ||
111 | extern void amiga_do_irq_list(int irq, struct pt_regs *fp); | ||
112 | |||
113 | /* CIA interrupt control register bits */ | ||
114 | |||
115 | #define CIA_ICR_TA 0x01 | ||
116 | #define CIA_ICR_TB 0x02 | ||
117 | #define CIA_ICR_ALRM 0x04 | ||
118 | #define CIA_ICR_SP 0x08 | ||
119 | #define CIA_ICR_FLG 0x10 | ||
120 | #define CIA_ICR_ALL 0x1f | ||
121 | #define CIA_ICR_SETCLR 0x80 | ||
122 | |||
123 | /* to access the interrupt control registers of CIA's use only | ||
124 | ** these functions, they behave exactly like the amiga os routines | ||
125 | */ | ||
126 | |||
127 | extern struct ciabase ciaa_base, ciab_base; | ||
128 | |||
129 | extern unsigned char cia_set_irq(unsigned int irq, int set); | ||
130 | extern unsigned char cia_able_irq(unsigned int irq, int enable); | ||
131 | |||
132 | #endif /* asm-m68k/amigaints.h */ | ||
133 | #endif /* __KERNEL__ */ | ||