|
|
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: #ifndef _POWERMAC_INTERRUPTS_H_
25: #define _POWERMAC_INTERRUPTS_H_
26:
27: #include <mach/ppc/boolean.h>
28: #include <mach/ppc/thread_status.h> /* for struct ppc_saved_state */
29: #include <machdep/ppc/machspl.h>
30:
31: /*
32: * Generic Power Macintosh Interrupts
33: * (Things common across all systems)
34: *
35: */
36:
37: /* DMA Interrupts */
38: #define PMAC_DMA_SCSI0 0
39: #define PMAC_DMA_SCSI1 1
40: #define PMAC_DMA_AUDIO_OUT 2
41: #define PMAC_DMA_AUDIO_IN 3
42: #define PMAC_DMA_FLOPPY 4
43: #define PMAC_DMA_ETHERNET_TX 5
44: #define PMAC_DMA_ETHERNET_RX 6
45: #define PMAC_DMA_SCC_A_TX 7
46: #define PMAC_DMA_SCC_A_RX 8
47: #define PMAC_DMA_SCC_B_TX 9
48: #define PMAC_DMA_SCC_B_RX 10
49: #define PMAC_DMA_IDE0 11
50: #define PMAC_DMA_IDE1 12
1.1.1.2 ! root 51: #define PMAC_DMA_UIDE 13
1.1 root 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
1.1.1.2 ! root 73: #define PMAC_DEV_UIDE 144
! 74: #define PMAC_DEV_USB0 145
! 75: #define PMAC_DEV_USB1 146
1.1 root 76:
77: #define PMAC_DEV_SCC PMAC_DEV_SCC_A /* Older SCC chip. */
78:
79: /* Add-on cards */
80:
81: #define PMAC_DEV_CARD0 256
82: #define PMAC_DEV_CARD1 257
83: #define PMAC_DEV_CARD2 258
84: #define PMAC_DEV_CARD3 259
85: #define PMAC_DEV_CARD4 260
86: #define PMAC_DEV_CARD5 261
87: #define PMAC_DEV_CARD6 262
88: #define PMAC_DEV_CARD7 263
89: #define PMAC_DEV_CARD8 264
90: #define PMAC_DEV_CARD9 265
91: #define PMAC_DEV_CARD10 266
92: #define PMAC_DEV_CARD11 267
1.1.1.2 ! root 93: #define PMAC_DEV_CARD12 268
! 94: #define PMAC_DEV_CARD13 269
! 95: #define PMAC_DEV_CARD14 270
! 96: #define PMAC_DEV_CARD15 271
! 97: #define PMAC_DEV_CARD16 272
! 98: #define PMAC_DEV_CARD17 273
1.1 root 99:
1.1.1.2 ! root 100: #define PMAC_DEV_PDS 280 /* Processor Direct Slot - Nubus only */
1.1 root 101:
102: /* Some NuBus aliases.. */
103: #define PMAC_DEV_NUBUS0 PMAC_DEV_CARD0
104: #define PMAC_DEV_NUBUS1 PMAC_DEV_CARD1
105: #define PMAC_DEV_NUBUS2 PMAC_DEV_CARD2
106: #define PMAC_DEV_NUBUS3 PMAC_DEV_CARD3
107:
108: #define PMAC_DEV_HZTICK 300
109: #define PMAC_DEV_TIMER1 301
110: #define PMAC_DEV_TIMER2 302
111: #define PMAC_DEV_VBL 303 /* VBL Interrupt */
112:
113: #define PMAC_DEV_START 128
114: #define PMAC_DEV_END 511
115:
116: /* Macro for accessing VIA registers */
117: #define via_reg(X) reg8(X)
118:
119: struct powermac_interrupt {
120: void (*i_handler)(int, void *, void *);
121: spl_t i_level;
122: void * i_arg;
123: int i_device;
124: };
125:
126: extern unsigned int (*pmac_int_to_number)(int index);
127:
128: extern void (*pmac_register_int)(int interrupt, spl_t level,
129: void (*handler)(int, void *, void *),
130: void *);
131:
132: extern void (*pmac_interrupt)(int type, struct ppc_saved_state *ssp,
133: unsigned int dsisr, unsigned int dar);
134:
135: extern boolean_t (*pmac_enable_irq)(int irq);
136: extern boolean_t (*pmac_disable_irq)(int irq);
137:
138: #endif /* !POWERMAC_INTERRUPTS_H_ */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.