viapcibreg.h revision 1.1.14.3 1 1.1.14.3 yamt /* $NetBSD: viapcibreg.h,v 1.1.14.3 2008/03/17 09:14:20 yamt Exp $ */
2 1.1.14.2 yamt
3 1.1.14.2 yamt /*-
4 1.1.14.2 yamt * Copyright (c) 2005, 2006 Jared D. McNeill <jmcneill (at) invisible.ca>
5 1.1.14.2 yamt * All rights reserved.
6 1.1.14.2 yamt *
7 1.1.14.2 yamt * Redistribution and use in source and binary forms, with or without
8 1.1.14.2 yamt * modification, are permitted provided that the following conditions
9 1.1.14.2 yamt * are met:
10 1.1.14.2 yamt * 1. Redistributions of source code must retain the above copyright
11 1.1.14.2 yamt * notice, this list of conditions and the following disclaimer.
12 1.1.14.2 yamt * 2. Redistributions in binary form must reproduce the above copyright
13 1.1.14.2 yamt * notice, this list of conditions, and the following disclaimer in the
14 1.1.14.2 yamt * documentation and/or other materials provided with the distribution.
15 1.1.14.2 yamt * 3. The name of the author may not be used to endorse or promote products
16 1.1.14.2 yamt * derived from this software without specific prior written permission.
17 1.1.14.2 yamt *
18 1.1.14.2 yamt * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
19 1.1.14.2 yamt * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 1.1.14.2 yamt * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 1.1.14.2 yamt * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
22 1.1.14.2 yamt * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
23 1.1.14.2 yamt * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 1.1.14.2 yamt * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
25 1.1.14.2 yamt * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
26 1.1.14.2 yamt * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 1.1.14.2 yamt * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 1.1.14.2 yamt * SUCH DAMAGE.
29 1.1.14.2 yamt */
30 1.1.14.2 yamt
31 1.1.14.2 yamt #ifndef _SYS_ARCH_I386_PCI_VIAPCIBREG_H
32 1.1.14.2 yamt #define _SYS_ARCH_I386_PCI_VIAPCIBREG_H
33 1.1.14.2 yamt
34 1.1.14.2 yamt /* PCI configuration registers for SMB base address; chip dependent */
35 1.1.14.2 yamt #define SMB_BASE1 0x90
36 1.1.14.2 yamt #define SMB_BASE2 0x80
37 1.1.14.2 yamt #define SMB_BASE3 0xd0
38 1.1.14.2 yamt
39 1.1.14.3 yamt #define SMB_HOST_CONFIG 0xd0 /* Lower word, actually */
40 1.1.14.2 yamt #define SMB_REVISION (SMB_HOST_CONFIG + 4)
41 1.1.14.2 yamt
42 1.1.14.2 yamt /* SMBus register offsets; from Linux and FreeBSD */
43 1.1.14.2 yamt #define SMBHSTSTS 0x00
44 1.1.14.2 yamt #define SMBHSTSTS_BUSY 0x01
45 1.1.14.2 yamt #define SMBHSTSTS_INTR 0x02
46 1.1.14.2 yamt #define SMBHSTSTS_ERROR 0x04
47 1.1.14.2 yamt #define SMBHSTSTS_COLLISION 0x08
48 1.1.14.2 yamt #define SMBHSTSTS_FAILED 0x10
49 1.1.14.2 yamt #define SMBHSLVSTS 0x01
50 1.1.14.2 yamt #define SMBHSTCNT 0x02
51 1.1.14.2 yamt #define SMBHSTCNT_QUICK 0x00
52 1.1.14.2 yamt #define SMBHSTCNT_KILL 0x02
53 1.1.14.2 yamt #define SMBHSTCNT_SENDRECV 0x04
54 1.1.14.2 yamt #define SMBHSTCNT_BYTE 0x08
55 1.1.14.2 yamt #define SMBHSTCNT_WORD 0x0c
56 1.1.14.2 yamt #define SMBHSTCNT_BLOCK 0x14
57 1.1.14.2 yamt #define SMBHSTCNT_START 0x40
58 1.1.14.2 yamt #define SMBHSTCMD 0x03
59 1.1.14.2 yamt #define SMBHSTADD 0x04
60 1.1.14.2 yamt #define SMBHSTDAT0 0x05
61 1.1.14.2 yamt #define SMBHSTDAT1 0x06
62 1.1.14.2 yamt #define SMBBLKDAT 0x07
63 1.1.14.2 yamt #define SMBSLVCNT 0x08
64 1.1.14.2 yamt #define SMBSHDWCMD 0x09
65 1.1.14.2 yamt #define SMBSLVEVT 0x0a
66 1.1.14.2 yamt #define SMBSLVDAT 0x0c
67 1.1.14.2 yamt
68 1.1.14.2 yamt #endif /* !_SYS_ARCH_I386_PCI_VIAPCIBREG_H */
69