|
|
1.1 root 1: /*
2: * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
3: *
4: * @APPLE_LICENSE_HEADER_START@
5: *
6: * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
7: * Reserved. This file contains Original Code and/or Modifications of
8: * Original Code as defined in and that are subject to the Apple Public
9: * Source License Version 1.1 (the "License"). You may not use this file
10: * except in compliance with the License. Please obtain a copy of the
11: * License at http://www.apple.com/publicsource and read it before using
12: * this file.
13: *
14: * The Original Code and all software distributed under the License are
15: * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
16: * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
17: * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
18: * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
19: * License for the specific language governing rights and limitations
20: * under the License.
21: *
22: * @APPLE_LICENSE_HEADER_END@
23: */
24:
25: #ifndef _POWERMAC_INTERRUPTS_H_
26: #define _POWERMAC_INTERRUPTS_H_
27:
28: #include <mach/ppc/boolean.h>
29: #include <mach/ppc/thread_status.h> /* for struct ppc_saved_state */
30: #include <machdep/ppc/machspl.h>
31:
32: /*
33: * Generic Power Macintosh Interrupts
34: * (Things common across all systems)
35: *
36: */
37:
38: /* DMA Interrupts */
39: #define PMAC_DMA_SCSI0 0
40: #define PMAC_DMA_SCSI1 1
41: #define PMAC_DMA_AUDIO_OUT 2
42: #define PMAC_DMA_AUDIO_IN 3
43: #define PMAC_DMA_FLOPPY 4
44: #define PMAC_DMA_ETHERNET_TX 5
45: #define PMAC_DMA_ETHERNET_RX 6
46: #define PMAC_DMA_SCC_A_TX 7
47: #define PMAC_DMA_SCC_A_RX 8
48: #define PMAC_DMA_SCC_B_TX 9
49: #define PMAC_DMA_SCC_B_RX 10
50: #define PMAC_DMA_IDE0 11
51: #define PMAC_DMA_IDE1 12
52:
53: #define PMAC_DMA_START 0
54: #define PMAC_DMA_END 125
55:
56: /* Device Interrupts */
57:
58: #define PMAC_DEV_SCSI0 128
59: #define PMAC_DEV_SCSI1 129
60: #define PMAC_DEV_ETHERNET 130
61: #define PMAC_DEV_SCC_A 131
62: #define PMAC_DEV_SCC_B 132
63: #define PMAC_DEV_AUDIO 134
64: #define PMAC_DEV_VIA1 135
65: #define PMAC_DEV_FLOPPY 136
66: #define PMAC_DEV_NMI 137
67: #define PMAC_DEV_IDE0 138
68: #define PMAC_DEV_IDE1 139
69: #define PMAC_DEV_IN 140
70: #define PMAC_DEV_ADB 141
71: #define PMAC_DEV_VIA2 142
72: #define PMAC_DEV_VIA3 143
73:
74: #define PMAC_DEV_SCC PMAC_DEV_SCC_A /* Older SCC chip. */
75:
76: /* Add-on cards */
77:
78: #define PMAC_DEV_CARD0 256
79: #define PMAC_DEV_CARD1 257
80: #define PMAC_DEV_CARD2 258
81: #define PMAC_DEV_CARD3 259
82: #define PMAC_DEV_CARD4 260
83: #define PMAC_DEV_CARD5 261
84: #define PMAC_DEV_CARD6 262
85: #define PMAC_DEV_CARD7 263
86: #define PMAC_DEV_CARD8 264
87: #define PMAC_DEV_CARD9 265
88: #define PMAC_DEV_CARD10 266
89: #define PMAC_DEV_CARD11 267
90:
91: #define PMAC_DEV_PDS 270 /* Processor Direct Slot - Nubus only */
92:
93: /* Some NuBus aliases.. */
94: #define PMAC_DEV_NUBUS0 PMAC_DEV_CARD0
95: #define PMAC_DEV_NUBUS1 PMAC_DEV_CARD1
96: #define PMAC_DEV_NUBUS2 PMAC_DEV_CARD2
97: #define PMAC_DEV_NUBUS3 PMAC_DEV_CARD3
98:
99: #define PMAC_DEV_HZTICK 300
100: #define PMAC_DEV_TIMER1 301
101: #define PMAC_DEV_TIMER2 302
102: #define PMAC_DEV_VBL 303 /* VBL Interrupt */
103:
104: #define PMAC_DEV_START 128
105: #define PMAC_DEV_END 511
106:
107: /* Macro for accessing VIA registers */
108: #define via_reg(X) reg8(X)
109:
110: struct powermac_interrupt {
111: void (*i_handler)(int, void *, void *);
112: spl_t i_level;
113: void * i_arg;
114: int i_device;
115: };
116:
117: extern unsigned int (*pmac_int_to_number)(int index);
118:
119: extern void (*pmac_register_int)(int interrupt, spl_t level,
120: void (*handler)(int, void *, void *),
121: void *);
122:
123: extern void (*pmac_interrupt)(int type, struct ppc_saved_state *ssp,
124: unsigned int dsisr, unsigned int dar);
125:
126: extern boolean_t (*pmac_enable_irq)(int irq);
127: extern boolean_t (*pmac_disable_irq)(int irq);
128:
129: #endif /* !POWERMAC_INTERRUPTS_H_ */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.