openpicreg.h revision 1.3.88.2 1 /* $NetBSD: openpicreg.h,v 1.3.88.2 2007/05/04 14:26:30 nisimura Exp $ */
2
3 /*
4 * Copyright 2001 Wasabi Systems, Inc.
5 * All rights reserved.
6 *
7 * Written by Allen Briggs for Wasabi Systems, Inc.
8 *
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions
11 * are met:
12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in the
16 * documentation and/or other materials provided with the distribution.
17 * 3. All advertising materials mentioning features or use of this software
18 * must display the following acknowledgement:
19 * This product includes software developed for the NetBSD Project by
20 * Wasabi Systems, Inc.
21 * 4. The name of Wasabi Systems, Inc. may not be used to endorse
22 * or promote products derived from this software without specific prior
23 * written permission.
24 *
25 * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND
26 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
27 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL WASABI SYSTEMS, INC
29 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
30 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
31 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35 * POSSIBILITY OF SUCH DAMAGE.
36 */
37
38 /*
39 * consult machdep.c to see interrupt source definition and register
40 * location.
41 */
42
43 #include "opt_openpic.h"
44
45 #if defined(OPENPIC_SERIAL_MODE)
46 #define SANDPOINT_INTR_SIOINT 0
47 #define SANDPOINT_INTR_ISA SANDPOINT_INTR_SIOINT
48 #define SANDPOINT_INTR_SIOINT2 1 /* unknown... */
49 #define SANDPOINT_INTR_PCI0 2
50 #define SANDPOINT_INTR_PCI1 3
51 #define SANDPOINT_INTR_PCI2 4
52 #define SANDPOINT_INTR_PCI3 5
53 #define SANDPOINT_INTR_WINBOND_A 6
54 #define SANDPOINT_INTR_WINBOND_B 7
55 #define SANDPOINT_INTR_WINBOND_C 8
56 #define SANDPOINT_INTR_IDE0 SANDPOINT_INTR_WINBOND_C
57 #define SANDPOINT_INTR_WINBOND_D 9
58 #define SANDPOINT_INTR_IDE1 SANDPOINT_INTR_WINBOND_D
59 #define SANDPOINT_INTR_RESERVED_10 10
60 #define SANDPOINT_INTR_RESERVED_11 11
61 #define SANDPOINT_INTR_RESERVED_12 12
62 #define SANDPOINT_INTR_RESERVED_13 13
63 #define SANDPOINT_INTR_RESERVED_14 14
64 #define SANDPOINT_INTR_RESERVED_15 15
65 #define SANDPOINT_INTR_I2C 16
66 #define SANDPOINT_INTR_DMA0 17
67 #define SANDPOINT_INTR_DMA1 18
68 #define SANDPOINT_INTR_I2O 19
69 #define SANDPOINT_INTR_TIMER0 20
70 #define SANDPOINT_INTR_TIMER1 21
71 #define SANDPOINT_INTR_TIMER2 22
72 #define SANDPOINT_INTR_TIMER3 23
73 #endif
74
75 /* XXX XXX XXX */
76 extern unsigned epicsteer[];
77
78 #define OPENPIC_SRC_VECTOR(irq) (epicsteer[(irq)])
79 #define OPENPIC_IDEST(irq) (epicsteer[(irq)] + 0x10)
80
81 #include <powerpc/openpicreg.h>
82