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