diff options
author | qhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-05-11 07:19:55 +0000 |
---|---|---|
committer | qhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-05-11 07:19:55 +0000 |
commit | 5f10fa0140f7100aa04c12f87d63a66755d20d58 (patch) | |
tree | 2339541698bfe4926b4d0fa976d9054f011ee9f8 /MdePkg/Library/BaseSmbusLib/SmbusLibRegisters.h | |
parent | cfb190d9f49ebb67b0c2a8fd6585713151bcd728 (diff) | |
download | edk2-platforms-5f10fa0140f7100aa04c12f87d63a66755d20d58.tar.xz |
*BaseSmbusLib: (new version)
Complete function header, detailed description, ASSERT()s & pass smoke test in MRC of Lakeport package by replacing Smbus PPI.
*Device Patch Lib
Fix a bug in AppendDevicePathNode() (Solve Track #44 in Remodel PVCS). The original logic failed if the first device path was NULL.
*Performance Lib
Add PeiPerformanceHob & Performance protocol in spd file in EdkModule Package (Solve Tracker #41, #42 in Remodel PVCS).
*Hob Lib
Add detailed description for each Hob function.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@126 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Library/BaseSmbusLib/SmbusLibRegisters.h')
-rw-r--r-- | MdePkg/Library/BaseSmbusLib/SmbusLibRegisters.h | 120 |
1 files changed, 120 insertions, 0 deletions
diff --git a/MdePkg/Library/BaseSmbusLib/SmbusLibRegisters.h b/MdePkg/Library/BaseSmbusLib/SmbusLibRegisters.h new file mode 100644 index 0000000000..6eb14faefb --- /dev/null +++ b/MdePkg/Library/BaseSmbusLib/SmbusLibRegisters.h @@ -0,0 +1,120 @@ +/** @file
+ Base SMBUS library implementation built upon I/O library.
+
+ Copyright (c) 2006, Intel Corporation<BR>
+ All rights reserved. This program and the accompanying materials
+ are licensed and made available under the terms and conditions of the BSD License
+ which accompanies this distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php
+
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+ Module Name: SmbusLib.h
+
+**/
+
+#ifndef __SMBUS_LIB_REGISTER_H
+#define __SMBUS_LIB_REGISTER_H
+
+#define SMBUS_R_HST_STS 0x00 // Host Status Register
+#define SMBUS_B_HOST_BUSY 0x01 // RO
+#define SMBUS_B_INTR 0x02 // R/WC
+#define SMBUS_B_DEV_ERR 0x04 // R/WC
+#define SMBUS_B_BUS_ERR 0x08 // R/WC
+#define SMBUS_B_FAILED 0x10 // R/WC
+#define SMBUS_B_SMBALERT_STS 0x20 // R/WC
+#define SMBUS_B_INUSE_STS 0x40 // R/WC
+#define SMBUS_B_BYTE_DONE_STS 0x80 // R/WC
+#define SMBUS_B_ERROR (SMBUS_B_DEV_ERR | SMBUS_B_BUS_ERR | SMBUS_B_FAILED)
+#define SMBUS_B_HSTS_ALL 0xFF // R/WC
+
+
+#define SMBUS_R_HST_CTL 0x02 // Host Control Register R/W
+#define SMBUS_B_INTREN 0x01 // RW
+#define SMBUS_B_KILL 0x02 // RW
+#define SMBUS_B_CMD (7 << 2) // RW
+#define SMBUS_V_SMB_CMD_QUICK (0 << 2)
+#define SMBUS_V_SMB_CMD_BYTE (1 << 2)
+#define SMBUS_V_SMB_CMD_BYTE_DATA (2 << 2)
+#define SMBUS_V_SMB_CMD_WORD_DATA (3 << 2)
+#define SMBUS_V_SMB_CMD_PROCESS_CALL (4 << 2)
+#define SMBUS_V_SMB_CMD_BLOCK (5 << 2)
+#define SMBUS_V_SMB_CMD_IIC_READ (6 << 2)
+#define SMBUS_V_SMB_CMD_BLOCK_PROCESS (7 << 2)
+#define SMBUS_B_LAST_BYTE 0x20 // WO
+#define SMBUS_B_START 0x40 // WO
+#define SMBUS_B_PEC_EN 0x80 // RW
+
+
+#define SMBUS_R_HST_CMD 0x03 // Host Command Register R/W
+
+
+#define SMBUS_R_XMIT_SLVA 0x04 // Transmit Slave Address Register R/W
+#define SMBUS_B_RW 0x01 // RW
+#define SMBUS_B_READ 0x01 // RW
+#define SMBUS_B_WRITE 0x00 // RW
+#define SMBUS_B_ADDRESS 0xFE // RW
+
+
+#define SMBUS_R_HST_D0 0x05 // Data 0 Register R/W
+
+
+#define SMBUS_R_HST_D1 0x06 // Data 1 Register R/W
+
+
+#define SMBUS_R_HOST_BLOCK_DB 0x07 // Host Block Data Register R/W
+
+
+#define SMBUS_R_PEC 0x08 // Packet Error Check Data Register R/W
+
+
+#define SMBUS_R_RCV_SLVA 0x09 // Receive Slave Address Register R/W
+#define SMBUS_B_SLAVE_ADDR 0x7F // RW
+
+
+#define SMBUS_R_SLV_DATA 0x0A // Receive Slave Data Register R/W
+
+
+#define SMBUS_R_AUX_STS 0x0C // Auxiliary Status Register R/WC
+#define SMBUS_B_CRCE 0x01 // R/WC
+
+
+#define SMBUS_R_AUX_CTL 0x0D // Auxiliary Control Register R/W
+#define SMBUS_B_AAC 0x01 // R/W
+#define SMBUS_B_E32B 0x02 // R/W
+
+
+#define SMBUS_R_SMLINK_PIN_CTL 0x0E // SMLINK Pin Control Register R/W
+#define SMBUS_B_SMLINK0_CUR_STS 0x01 // RO
+#define SMBUS_B_SMLINK1_CUR_STS 0x02 // RO
+#define SMBUS_B_SMLINK_CLK_CTL 0x04 // RW
+
+
+#define SMBUS_R_SMBUS_PIN_CTL 0x0F // SMBus Pin Control Register R/W
+#define SMBUS_B_SMBCLK_CUR_STS 0x01 // RO
+#define SMBUS_B_SMBDATA_CUR_STS 0x02 // RO
+#define SMBUS_B_SMBCLK_CTL 0x04 // RW
+
+
+#define SMBUS_R_SLV_STS 0x10 // Slave Status Register R/WC
+#define SMBUS_B_HOST_NOTIFY_STS 0x01 // R/WC
+
+
+#define SMBUS_R_SLV_CMD 0x11 // Slave Command Register R/W
+#define SMBUS_B_HOST_NOTIFY_INTREN 0x01 // R/W
+#define SMBUS_B_HOST_NOTIFY_WKEN 0x02 // R/W
+#define SMBUS_B_SMBALERT_DIS 0x04 // R/W
+
+
+#define SMBUS_R_NOTIFY_DADDR 0x14 // Notify Device Address Register RO
+#define SMBUS_B_DEVICE_ADDRESS 0xFE // RO
+
+
+#define SMBUS_R_NOTIFY_DLOW 0x16 // Notify Data Low Byte Register RO
+
+
+#define SMBUS_R_NOTIFY_DHIGH 0x17 // Notify Data High Byte Register RO
+
+
+#endif
|