Linux v2.6.13-rc3
[pohmelfs.git] / include / asm-ppc / amigaints.h
blobaa3ff6349e8137dcda31450deb5732f97e374040
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
13 #ifdef __KERNEL__
14 #ifndef _ASMm68k_AMIGAINTS_H_
15 #define _ASMm68k_AMIGAINTS_H_
18 ** Amiga Interrupt sources.
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 */
27 /* vertical blanking interrupt */
28 #define IRQ_AMIGA_VERTB 0
30 /* copper interrupt */
31 #define IRQ_AMIGA_COPPER 1
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
39 /* Blitter done interrupt */
40 #define IRQ_AMIGA_BLIT 6
42 /* floppy disk interrupts */
43 #define IRQ_AMIGA_DSKSYN 7
44 #define IRQ_AMIGA_DSKBLK 8
46 /* builtin serial port interrupts */
47 #define IRQ_AMIGA_RBF 9
48 #define IRQ_AMIGA_TBE 10
50 /* software interrupts */
51 #define IRQ_AMIGA_SOFT 11
53 /* interrupts from external hardware */
54 #define IRQ_AMIGA_PORTS 12
55 #define IRQ_AMIGA_EXTER 13
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
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
82 #define IRQ_FLOPPY IRQ_AMIGA_DSKBLK
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 */
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 */
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);
113 /* CIA interrupt control register bits */
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
123 /* to access the interrupt control registers of CIA's use only
124 ** these functions, they behave exactly like the amiga os routines
127 extern struct ciabase ciaa_base, ciab_base;
129 extern unsigned char cia_set_irq(unsigned int irq, int set);
130 extern unsigned char cia_able_irq(unsigned int irq, int enable);
132 #endif /* asm-m68k/amigaints.h */
133 #endif /* __KERNEL__ */