Add #include guards to all Super I/O header files (trivial).
[coreboot.git] / src / superio / nsc / pc87417 / pc87417.h
1 /*
2  * This file is part of the coreboot project.
3  *
4  * Copyright (C) 2000 AG Electronics Ltd.
5  * Copyright (C) 2003-2004 Linux Networx
6  * Copyright (C) 2004 Tyan by yhlu
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
21  */
22
23 #ifndef SUPERIO_NSC_PC87417_PC87417_H
24 #define SUPERIO_NSC_PC87417_PC87417_H
25
26 #define PC87417_FDC  0x00 /* Floppy */
27 #define PC87417_PP   0x01 /* Parallel Port */
28 #define PC87417_SP2  0x02 /* Com2 */
29 #define PC87417_SP1  0x03 /* Com1 */
30 #define PC87417_SWC  0x04 /* System Wake-Up Controller (SWC) */
31 #define PC87417_KBCM 0x05 /* Mouse */
32 #define PC87417_KBCK 0x06 /* Keyboard */
33 #define PC87417_GPIO 0x07
34 #define PC87417_XBUS 0x0F
35 #define PC87417_RTC  0x10
36
37 #define PC87417_GPIO_DEV PNP_DEV(0x2e, PC87417_GPIO)
38 /* This is to get around a romcc bug */
39 /* #define PC87417_XBUS_DEV PNP_DEV(0x2e, PC87417_XBUS) */
40 #define PC87417_XBUS_DEV PNP_DEV(0x2e, 0x0f)
41
42 #define PC87417_GPSEL           0xf0
43 #define PC87417_GPCFG1          0xf1
44 #define PC87417_GPEVR           0xf2
45 #define PC87417_GPCFG2          0xf3
46 #define PC87417_EXTCFG          0xf4
47 #define PC87417_IOEXT1A         0xf5
48 #define PC87417_IOEXT1B         0xf6
49 #define PC87417_IOEXT2A         0xf7
50 #define PC87417_IOEXT2B         0xf8
51
52 #define PC87417_GPDO_0          0x00
53 #define PC87417_GPDI_0          0x01
54 #define PC87417_GPDO_1          0x02
55 #define PC87417_GPDI_1          0x03
56 #define PC87417_GPEVEN_1        0x04
57 #define PC87417_GPEVST_1        0x05
58 #define PC87417_GPDO_2          0x06
59 #define PC87417_GPDI_2          0x07
60 #define PC87417_GPDO_3          0x08
61 #define PC87417_GPDI_3          0x09
62 #define PC87417_GPDO_4          0x0a
63 #define PC87417_GPDI_4          0x0b
64 #define PC87417_GPEVEN_4        0x0c
65 #define PC87417_GPEVST_4        0x0d
66 #define PC87417_GPDO_5          0x0e
67 #define PC87417_GPDI_5          0x0f
68 #define PC87417_GPDO_6          0x10
69 #define PC87417_GPDO_7A         0x11
70 #define PC87417_GPDO_7B         0x12
71 #define PC87417_GPDO_7C         0x13
72 #define PC87417_GPDO_7D         0x14
73 #define PC87417_GPDI_7A         0x15
74 #define PC87417_GPDI_7B         0x16
75 #define PC87417_GPDI_7C         0x17
76 #define PC87417_GPDI_7D         0x18
77
78 #define PC87417_XIOCNF          0xf0
79 #define PC87417_XIOBA1H         0xf1
80 #define PC87417_XIOBA1L         0xf2
81 #define PC87417_XIOSIZE1        0xf3
82 #define PC87417_XIOBA2H         0xf4
83 #define PC87417_XIOBA2L         0xf5
84 #define PC87417_XIOSIZE2        0xf6
85 #define PC87417_XMEMCNF1        0xf7
86 #define PC87417_XMEMCNF2        0xf8
87 #define PC87417_XMEMBAH         0xf9
88 #define PC87417_XMEMBAL         0xfa
89 #define PC87417_XMEMSIZE        0xfb
90 #define PC87417_XIRQMAP1        0xfc
91 #define PC87417_XIRQMAP2        0xfd
92 #define PC87417_XBIMM           0xfe
93 #define PC87417_XBBSL           0xff
94
95 #define PC87417_XBCNF           0x00
96 #define PC87417_XZCNF0          0x01
97 #define PC87417_XZCNF1          0x02
98 #define PC87417_XIRQC0          0x04
99 #define PC87417_XIRQC1          0x05
100 #define PC87417_XIRQC2          0x06
101 #define PC87417_XIMA0           0x08
102 #define PC87417_XIMA1           0x09
103 #define PC87417_XIMA2           0x0a
104 #define PC87417_XIMA3           0x0b
105 #define PC87417_XIMD            0x0c
106 #define PC87417_XZCNF2          0x0d
107 #define PC87417_XZCNF3          0x0e
108 #define PC87417_XZM0            0x0f
109 #define PC87417_XZM1            0x10
110 #define PC87417_XZM2            0x11
111 #define PC87417_XZM3            0x12
112 #define PC87417_HAP0            0x13
113 #define PC87417_HAP1            0x14
114 #define PC87417_XSCNF           0x15
115 #define PC87417_XWBCNF          0x16
116
117 #if defined(__PRE_RAM__) && !defined(__ROMCC__)
118 void pc87417_enable_serial(device_t dev, unsigned iobase);
119 void pc87417_enable_dev(device_t dev);
120 #endif
121
122 #endif