Random Winbond Super I/O cosmetic and coding-style fixes.
[coreboot.git] / src / superio / winbond / w83627hf / w83627hf.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
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_WINBOND_W83627HF_W83627HF_H
24 #define SUPERIO_WINBOND_W83627HF_W83627HF_H
25
26 #define W83627HF_FDC              0   /* Floppy */
27 #define W83627HF_PP               1   /* Parallel port */
28 #define W83627HF_SP1              2   /* Com1 */
29 #define W83627HF_SP2              3   /* Com2 */
30 #define W83627HF_KBC              5   /* PS/2 keyboard & mouse */
31 #define W83627HF_CIR              6
32 #define W83627HF_GAME_MIDI_GPIO1  7
33 #define W83627HF_GPIO2            8
34 #define W83627HF_GPIO3            9
35 #define W83627HF_ACPI            10
36 #define W83627HF_HWM             11   /* Hardware monitor */
37
38 /* #define W83627HF_GPIO_DEV PNP_DEV(0x2e, W83627HF_GPIO) */
39 /* #define W83627HF_XBUS_DEV PNP_DEV(0x2e, W83627HF_XBUS) */
40
41 #define W83627HF_GPSEL          0xf0
42 #define W83627HF_GPCFG1         0xf1
43 #define W83627HF_GPEVR          0xf2
44 #define W83627HF_GPCFG2         0xf3
45 #define W83627HF_EXTCFG         0xf4
46 #define W83627HF_IOEXT1A        0xf5
47 #define W83627HF_IOEXT1B        0xf6
48 #define W83627HF_IOEXT2A        0xf7
49 #define W83627HF_IOEXT2B        0xf8
50
51 #define W83627HF_GPDO_0         0x00
52 #define W83627HF_GPDI_0         0x01
53 #define W83627HF_GPDO_1         0x02
54 #define W83627HF_GPDI_1         0x03
55 #define W83627HF_GPEVEN_1       0x04
56 #define W83627HF_GPEVST_1       0x05
57 #define W83627HF_GPDO_2         0x06
58 #define W83627HF_GPDI_2         0x07
59 #define W83627HF_GPDO_3         0x08
60 #define W83627HF_GPDI_3         0x09
61 #define W83627HF_GPDO_4         0x0a
62 #define W83627HF_GPDI_4         0x0b
63 #define W83627HF_GPEVEN_4       0x0c
64 #define W83627HF_GPEVST_4       0x0d
65 #define W83627HF_GPDO_5         0x0e
66 #define W83627HF_GPDI_5         0x0f
67 #define W83627HF_GPDO_6         0x10
68 #define W83627HF_GPDO_7A        0x11
69 #define W83627HF_GPDO_7B        0x12
70 #define W83627HF_GPDO_7C        0x13
71 #define W83627HF_GPDO_7D        0x14
72 #define W83627HF_GPDI_7A        0x15
73 #define W83627HF_GPDI_7B        0x16
74 #define W83627HF_GPDI_7C        0x17
75 #define W83627HF_GPDI_7D        0x18
76
77 #define W83627HF_XIOCNF         0xf0
78 #define W83627HF_XIOBA1H        0xf1
79 #define W83627HF_XIOBA1L        0xf2
80 #define W83627HF_XIOSIZE1       0xf3
81 #define W83627HF_XIOBA2H        0xf4
82 #define W83627HF_XIOBA2L        0xf5
83 #define W83627HF_XIOSIZE2       0xf6
84 #define W83627HF_XMEMCNF1       0xf7
85 #define W83627HF_XMEMCNF2       0xf8
86 #define W83627HF_XMEMBAH        0xf9
87 #define W83627HF_XMEMBAL        0xfa
88 #define W83627HF_XMEMSIZE       0xfb
89 #define W83627HF_XIRQMAP1       0xfc
90 #define W83627HF_XIRQMAP2       0xfd
91 #define W83627HF_XBIMM          0xfe
92 #define W83627HF_XBBSL          0xff
93
94 #define W83627HF_XBCNF          0x00
95 #define W83627HF_XZCNF0         0x01
96 #define W83627HF_XZCNF1         0x02
97 #define W83627HF_XIRQC0         0x04
98 #define W83627HF_XIRQC1         0x05
99 #define W83627HF_XIRQC2         0x06
100 #define W83627HF_XIMA0          0x08
101 #define W83627HF_XIMA1          0x09
102 #define W83627HF_XIMA2          0x0a
103 #define W83627HF_XIMA3          0x0b
104 #define W83627HF_XIMD           0x0c
105 #define W83627HF_XZCNF2         0x0d
106 #define W83627HF_XZCNF3         0x0e
107 #define W83627HF_XZM0           0x0f
108 #define W83627HF_XZM1           0x10
109 #define W83627HF_XZM2           0x11
110 #define W83627HF_XZM3           0x12
111 #define W83627HF_HAP0           0x13
112 #define W83627HF_HAP1           0x14
113 #define W83627HF_XSCNF          0x15
114 #define W83627HF_XWBCNF         0x16
115
116 #if defined(__PRE_RAM__) && !defined(__ROMCC__)
117 void w83627hf_disable_dev(device_t dev);
118 void w83627hf_enable_dev(device_t dev, u16 iobase);
119 void w83627hf_enable_serial(device_t dev, u16 iobase);
120 void w83627hf_set_clksel_48(device_t dev);
121 #endif
122
123 #endif