1098ca2bdSWarner Losh /*- 23c5656bfSArchie Cobbs * ichsmb_reg.h 33c5656bfSArchie Cobbs * 43c5656bfSArchie Cobbs * Copyright (c) 2000 Whistle Communications, Inc. 53c5656bfSArchie Cobbs * All rights reserved. 63c5656bfSArchie Cobbs * 73c5656bfSArchie Cobbs * Subject to the following obligations and disclaimer of warranty, use and 83c5656bfSArchie Cobbs * redistribution of this software, in source or object code forms, with or 93c5656bfSArchie Cobbs * without modifications are expressly permitted by Whistle Communications; 103c5656bfSArchie Cobbs * provided, however, that: 113c5656bfSArchie Cobbs * 1. Any and all reproductions of the source or object code must include the 123c5656bfSArchie Cobbs * copyright notice above and the following disclaimer of warranties; and 133c5656bfSArchie Cobbs * 2. No rights are granted, in any manner or form, to use Whistle 143c5656bfSArchie Cobbs * Communications, Inc. trademarks, including the mark "WHISTLE 153c5656bfSArchie Cobbs * COMMUNICATIONS" on advertising, endorsements, or otherwise except as 163c5656bfSArchie Cobbs * such appears in the above copyright notice or in the software. 173c5656bfSArchie Cobbs * 183c5656bfSArchie Cobbs * THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND 193c5656bfSArchie Cobbs * TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO 203c5656bfSArchie Cobbs * REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE, 213c5656bfSArchie Cobbs * INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF 223c5656bfSArchie Cobbs * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. 233c5656bfSArchie Cobbs * WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY 243c5656bfSArchie Cobbs * REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS 253c5656bfSArchie Cobbs * SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE. 263c5656bfSArchie Cobbs * IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES 273c5656bfSArchie Cobbs * RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING 283c5656bfSArchie Cobbs * WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 293c5656bfSArchie Cobbs * PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR 303c5656bfSArchie Cobbs * SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY 313c5656bfSArchie Cobbs * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 323c5656bfSArchie Cobbs * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 333c5656bfSArchie Cobbs * THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY 343c5656bfSArchie Cobbs * OF SUCH DAMAGE. 353c5656bfSArchie Cobbs * 363c5656bfSArchie Cobbs * Author: Archie Cobbs <archie@freebsd.org> 373c5656bfSArchie Cobbs */ 383c5656bfSArchie Cobbs 393c5656bfSArchie Cobbs #ifndef _DEV_ICHSMB_ICHSMB_REG_H_ 403c5656bfSArchie Cobbs #define _DEV_ICHSMB_ICHSMB_REG_H_ 413c5656bfSArchie Cobbs 423c5656bfSArchie Cobbs /* 433c5656bfSArchie Cobbs * Definitions for the SMBus controller logical device which is part of the 443c5656bfSArchie Cobbs * Intel 81801AA (ICH) and 81801AB (ICH0) I/O controller hub chips. 453c5656bfSArchie Cobbs */ 463c5656bfSArchie Cobbs 473c5656bfSArchie Cobbs /* 483c5656bfSArchie Cobbs * PCI configuration registers 493c5656bfSArchie Cobbs */ 503c5656bfSArchie Cobbs #define ICH_SMB_BASE 0x20 /* base address register */ 513c5656bfSArchie Cobbs #define ICH_HOSTC 0x40 /* host config register */ 523c5656bfSArchie Cobbs #define ICH_HOSTC_I2C_EN 0x04 /* enable i2c mode */ 533c5656bfSArchie Cobbs #define ICH_HOSTC_SMB_SMI_EN 0x02 /* SMI# instead of irq */ 543c5656bfSArchie Cobbs #define ICH_HOSTC_HST_EN 0x01 /* enable host cntrlr */ 553c5656bfSArchie Cobbs 563c5656bfSArchie Cobbs /* 573c5656bfSArchie Cobbs * I/O registers 583c5656bfSArchie Cobbs */ 593c5656bfSArchie Cobbs #define ICH_HST_STA 0x00 /* host status */ 603c5656bfSArchie Cobbs #define ICH_HST_STA_BYTE_DONE_STS 0x80 /* byte send/rec'd */ 613c5656bfSArchie Cobbs #define ICH_HST_STA_INUSE_STS 0x40 /* device access mutex */ 623c5656bfSArchie Cobbs #define ICH_HST_STA_SMBALERT_STS 0x20 /* SMBALERT# signal */ 633c5656bfSArchie Cobbs #define ICH_HST_STA_FAILED 0x10 /* failed bus transaction */ 643c5656bfSArchie Cobbs #define ICH_HST_STA_BUS_ERR 0x08 /* transaction collision */ 653c5656bfSArchie Cobbs #define ICH_HST_STA_DEV_ERR 0x04 /* misc. smb device error */ 663c5656bfSArchie Cobbs #define ICH_HST_STA_INTR 0x02 /* command completed ok */ 673c5656bfSArchie Cobbs #define ICH_HST_STA_HOST_BUSY 0x01 /* command is running */ 683c5656bfSArchie Cobbs #define ICH_HST_CNT 0x02 /* host control */ 693c5656bfSArchie Cobbs #define ICH_HST_CNT_START 0x40 /* start command */ 703c5656bfSArchie Cobbs #define ICH_HST_CNT_LAST_BYTE 0x20 /* indicate last byte */ 713c5656bfSArchie Cobbs #define ICH_HST_CNT_SMB_CMD_QUICK 0x00 /* command: quick */ 723c5656bfSArchie Cobbs #define ICH_HST_CNT_SMB_CMD_BYTE 0x04 /* command: byte */ 733c5656bfSArchie Cobbs #define ICH_HST_CNT_SMB_CMD_BYTE_DATA 0x08 /* command: byte data */ 743c5656bfSArchie Cobbs #define ICH_HST_CNT_SMB_CMD_WORD_DATA 0x0c /* command: word data */ 753c5656bfSArchie Cobbs #define ICH_HST_CNT_SMB_CMD_PROC_CALL 0x10 /* command: process call */ 763c5656bfSArchie Cobbs #define ICH_HST_CNT_SMB_CMD_BLOCK 0x14 /* command: block */ 773c5656bfSArchie Cobbs #define ICH_HST_CNT_SMB_CMD_I2C_READ 0x18 /* command: i2c read */ 783c5656bfSArchie Cobbs #define ICH_HST_CNT_KILL 0x02 /* kill current transaction */ 793c5656bfSArchie Cobbs #define ICH_HST_CNT_INTREN 0x01 /* enable interrupt */ 803c5656bfSArchie Cobbs #define ICH_HST_CMD 0x03 /* host command */ 813c5656bfSArchie Cobbs #define ICH_XMIT_SLVA 0x04 /* transmit slave address */ 823c5656bfSArchie Cobbs #define ICH_XMIT_SLVA_READ 0x01 /* direction: read */ 833c5656bfSArchie Cobbs #define ICH_XMIT_SLVA_WRITE 0x00 /* direction: write */ 843c5656bfSArchie Cobbs #define ICH_D0 0x05 /* host data 0 */ 853c5656bfSArchie Cobbs #define ICH_D1 0x06 /* host data 1 */ 863c5656bfSArchie Cobbs #define ICH_BLOCK_DB 0x07 /* block data byte */ 873c5656bfSArchie Cobbs 883c5656bfSArchie Cobbs #endif /* _DEV_ICHSMB_ICHSMB_REG_H_ */ 893c5656bfSArchie Cobbs 90