]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Library/SmbusLib.h
MdePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdePkg / Include / Library / SmbusLib.h
index b6ca54bb2ccaa10cf8d851ec418608535912c91a..35b1ff9751548b627a628afb9b7e10144eb052af 100644 (file)
@@ -1,25 +1,15 @@
 /** @file\r
-  SMBUS Functions\r
+  Provides library functions to access SMBUS devices. Libraries of this class\r
+  must be ported to a specific SMBUS controller.\r
 \r
-  Copyright (c) 2006, Intel Corporation\r
-  All rights reserved. This program and the accompanying materials\r
-  are licensed and made available under the terms and conditions of the BSD License\r
-  which accompanies this distribution.  The full text of the license may be found at\r
-  http://opensource.org/licenses/bsd-license.php\r
-\r
-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
 #ifndef __SMBUS_LIB__\r
 #define __SMBUS_LIB__\r
 \r
-//\r
-// PEC BIT is bit 22 in SMBUS address\r
-//\r
-#define SMBUS_LIB_PEC_BIT   (1 << 22)\r
-\r
 /**\r
   Macro that converts SMBUS slave address, SMBUS command, SMBUS data length,\r
   and PEC to a value that can be passed to the SMBUS Library functions.\r
@@ -27,7 +17,7 @@
   Computes an address that is compatible with the SMBUS Library functions.\r
   The unused upper bits of SlaveAddress, Command, and Length are stripped\r
   prior to the generation of the address.\r
-  \r
+\r
   @param  SlaveAddress    SMBUS Slave Address.  Range 0..127.\r
   @param  Command         SMBUS Command.  Range 0..255.\r
   @param  Length          SMBUS Data Length.  Range 0..32.\r
 \r
 **/\r
 #define SMBUS_LIB_ADDRESS(SlaveAddress,Command,Length,Pec)  \\r
-  ( ((Pec) ? SMBUS_LIB_PEC_BIT: 0)      | \\r
+  ( ((Pec) ? BIT22: 0)                  | \\r
     (((SlaveAddress) & 0x7f) << 1)      | \\r
     (((Command)      & 0xff) << 8)      | \\r
     (((Length)       & 0x3f) << 16)       \\r
   )\r
 \r
+/**\r
+  Macro that returns the SMBUS Slave Address value from an SmBusAddress Parameter value.\r
+\r
+  @param SmBusAddress   Address that encodes the SMBUS Slave Address, SMBUS Command, SMBUS Data Length, and PEC\r
+**/\r
+#define SMBUS_LIB_SLAVE_ADDRESS(SmBusAddress)      (((SmBusAddress) >> 1)  & 0x7f)\r
+\r
+/**\r
+  Macro that returns the SMBUS Command value from an SmBusAddress Parameter value.\r
+\r
+  @param SmBusAddress   Address that encodes the SMBUS Slave Address, SMBUS Command, SMBUS Data Length, and PEC\r
+**/\r
+#define SMBUS_LIB_COMMAND(SmBusAddress)            (((SmBusAddress) >> 8)  & 0xff)\r
+\r
+/**\r
+  Macro that returns the SMBUS Data Length value from an SmBusAddress Parameter value.\r
+\r
+  @param SmBusAddress Address that encodes the SMBUS Slave Address, SMBUS Command, SMBUS Data Length, and PEC\r
+**/\r
+#define SMBUS_LIB_LENGTH(SmBusAddress)             (((SmBusAddress) >> 16) & 0x3f)\r
+\r
+/**\r
+  Macro that returns the SMBUS PEC value from an SmBusAddress Parameter value.\r
+\r
+  @param SmBusAddress Address that encodes the SMBUS Slave Address, SMBUS Command, SMBUS Data Length, and PEC\r
+**/\r
+#define SMBUS_LIB_PEC(SmBusAddress)                ((BOOLEAN) (((SmBusAddress) & BIT22) != 0))\r
+\r
+/**\r
+  Macro that returns the set of reserved bits from an SmBusAddress Parameter value.\r
+\r
+  @param SmBusAddress Address that encodes the SMBUS Slave Address, SMBUS Command, SMBUS Data Length, and PEC\r
+**/\r
+#define SMBUS_LIB_RESERVED(SmBusAddress)           ((SmBusAddress) & ~(BIT23 - 2))\r
+\r
 /**\r
   Executes an SMBUS quick read command.\r
 \r
   If Length in SmBusAddress is not zero, then ASSERT().\r
   If any reserved bits of SmBusAddress are set, then ASSERT().\r
 \r
-  @param  SmBusAddress    Address that encodes the SMBUS Slave Address,\r
-                          SMBUS Command, SMBUS Data Length, and PEC.\r
-  @param  Status          Return status for the executed command.\r
-                          This is an optional parameter and may be NULL.\r
+  @param  SmBusAddress  Address that encodes the SMBUS Slave Address,\r
+                        SMBUS Command, SMBUS Data Length, and PEC.\r
+  @param  Status        Return status for the executed command.\r
+                        This is an optional parameter and may be NULL.\r
+                        RETURN_SUCCESS  The SMBUS command was executed.\r
+                        RETURN_TIMEOUT  A timeout occurred while executing the SMBUS command.\r
+                        RETURN_DEVICE_ERROR The request was not completed because a failure\r
+                        reflected in the Host Status Register bit.  Device errors are a result\r
+                        of a transaction collision, illegal command field, unclaimed cycle\r
+                        (host initiated), or bus errors (collisions).\r
+                        RETURN_UNSUPPORTED  The SMBus operation is not supported.\r
 \r
 **/\r
 VOID\r
@@ -63,8 +95,7 @@ EFIAPI
 SmBusQuickRead (\r
   IN  UINTN                     SmBusAddress,\r
   OUT RETURN_STATUS             *Status       OPTIONAL\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Executes an SMBUS quick write command.\r
@@ -77,10 +108,17 @@ SmBusQuickRead (
   If Length in SmBusAddress is not zero, then ASSERT().\r
   If any reserved bits of SmBusAddress are set, then ASSERT().\r
 \r
-  @param  SmBusAddress    Address that encodes the SMBUS Slave Address,\r
-                          SMBUS Command, SMBUS Data Length, and PEC.\r
-  @param  Status          Return status for the executed command.\r
-                          This is an optional parameter and may be NULL.\r
+  @param  SmBusAddress  Address that encodes the SMBUS Slave Address,\r
+                        SMBUS Command, SMBUS Data Length, and PEC.\r
+  @param  Status        Return status for the executed command.\r
+                        This is an optional parameter and may be NULL.\r
+                        RETURN_SUCCESS The SMBUS command was executed.\r
+                        RETURN_TIMEOUT A timeout occurred while executing the SMBUS command.\r
+                        RETURN_DEVICE_ERROR  The request was not completed because a failure\r
+                        reflected in the Host Status Register bit.  Device errors are a result\r
+                        of a transaction collision, illegal command field, unclaimed cycle\r
+                        (host initiated), or bus errors (collisions).\r
+                        RETURN_UNSUPPORTED  The SMBus operation is not supported.\r
 \r
 **/\r
 VOID\r
@@ -88,8 +126,7 @@ EFIAPI
 SmBusQuickWrite (\r
   IN  UINTN                     SmBusAddress,\r
   OUT RETURN_STATUS             *Status       OPTIONAL\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Executes an SMBUS receive byte command.\r
@@ -102,10 +139,18 @@ SmBusQuickWrite (
   If Length in SmBusAddress is not zero, then ASSERT().\r
   If any reserved bits of SmBusAddress are set, then ASSERT().\r
 \r
-  @param  SmBusAddress    Address that encodes the SMBUS Slave Address,\r
-                          SMBUS Command, SMBUS Data Length, and PEC.\r
-  @param  Status          Return status for the executed command.\r
-                          This is an optional parameter and may be NULL.\r
+  @param  SmBusAddress  Address that encodes the SMBUS Slave Address,\r
+                        SMBUS Command, SMBUS Data Length, and PEC.\r
+  @param  Status        Return status for the executed command.\r
+                        This is an optional parameter and may be NULL.\r
+                        RETURN_SUCCESS The SMBUS command was executed.\r
+                        RETURN_TIMEOUT A timeout occurred while executing the SMBUS command.\r
+                        RETURN_DEVICE_ERROR  The request was not completed because a failure\r
+                        reflected in the Host Status Register bit.  Device errors are a result\r
+                        of a transaction collision, illegal command field, unclaimed cycle\r
+                        (host initiated), or bus errors (collisions).\r
+                        RETURN_CRC_ERROR  The checksum is not correct (PEC is incorrect)\r
+                        RETURN_UNSUPPORTED  The SMBus operation is not supported.\r
 \r
   @return The byte received from the SMBUS.\r
 \r
@@ -115,8 +160,7 @@ EFIAPI
 SmBusReceiveByte (\r
   IN  UINTN          SmBusAddress,\r
   OUT RETURN_STATUS  *Status        OPTIONAL\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Executes an SMBUS send byte command.\r
@@ -129,11 +173,19 @@ SmBusReceiveByte (
   If Length in SmBusAddress is not zero, then ASSERT().\r
   If any reserved bits of SmBusAddress are set, then ASSERT().\r
 \r
-  @param  SmBusAddress    Address that encodes the SMBUS Slave Address,\r
-                          SMBUS Command, SMBUS Data Length, and PEC.\r
-  @param  Value           The 8-bit value to send.\r
-  @param  Status          Return status for the executed command.\r
-                          This is an optional parameter and may be NULL.\r
+  @param  SmBusAddress  Address that encodes the SMBUS Slave Address,\r
+                        SMBUS Command, SMBUS Data Length, and PEC.\r
+  @param  Value         The 8-bit value to send.\r
+  @param  Status        Return status for the executed command.\r
+                        This is an optional parameter and may be NULL.\r
+                        RETURN_SUCCESS The SMBUS command was executed.\r
+                        RETURN_TIMEOUT A timeout occurred while executing the SMBUS command.\r
+                        RETURN_DEVICE_ERROR  The request was not completed because a failure\r
+                        reflected in the Host Status Register bit.  Device errors are a result\r
+                        of a transaction collision, illegal command field, unclaimed cycle\r
+                        (host initiated), or bus errors (collisions).\r
+                        RETURN_CRC_ERROR  The checksum is not correct (PEC is incorrect)\r
+                        RETURN_UNSUPPORTED  The SMBus operation is not supported.\r
 \r
   @return The parameter of Value.\r
 \r
@@ -144,8 +196,7 @@ SmBusSendByte (
   IN  UINTN          SmBusAddress,\r
   IN  UINT8          Value,\r
   OUT RETURN_STATUS  *Status        OPTIONAL\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Executes an SMBUS read data byte command.\r
@@ -159,8 +210,16 @@ SmBusSendByte (
 \r
   @param  SmBusAddress    Address that encodes the SMBUS Slave Address,\r
                           SMBUS Command, SMBUS Data Length, and PEC.\r
-  @param  Status          Return status for the executed command.\r
-                          This is an optional parameter and may be NULL.\r
+  @param  Status        Return status for the executed command.\r
+                        This is an optional parameter and may be NULL.\r
+                        RETURN_SUCCESS The SMBUS command was executed.\r
+                        RETURN_TIMEOUT A timeout occurred while executing the SMBUS command.\r
+                        RETURN_DEVICE_ERROR  The request was not completed because a failure\r
+                        reflected in the Host Status Register bit.  Device errors are a result\r
+                        of a transaction collision, illegal command field, unclaimed cycle\r
+                        (host initiated), or bus errors (collisions).\r
+                        RETURN_CRC_ERROR  The checksum is not correct (PEC is incorrect)\r
+                        RETURN_UNSUPPORTED  The SMBus operation is not supported.\r
 \r
   @return The byte read from the SMBUS.\r
 \r
@@ -170,8 +229,7 @@ EFIAPI
 SmBusReadDataByte (\r
   IN  UINTN          SmBusAddress,\r
   OUT RETURN_STATUS  *Status        OPTIONAL\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Executes an SMBUS write data byte command.\r
@@ -184,11 +242,19 @@ SmBusReadDataByte (
   If Length in SmBusAddress is not zero, then ASSERT().\r
   If any reserved bits of SmBusAddress are set, then ASSERT().\r
 \r
-  @param  SmBusAddress    Address that encodes the SMBUS Slave Address,\r
-                          SMBUS Command, SMBUS Data Length, and PEC.\r
-  @param  Value           The 8-bit value to write.\r
-  @param  Status          Return status for the executed command.\r
-                          This is an optional parameter and may be NULL.\r
+  @param  SmBusAddress  Address that encodes the SMBUS Slave Address,\r
+                        SMBUS Command, SMBUS Data Length, and PEC.\r
+  @param  Value         The 8-bit value to write.\r
+  @param  Status        Return status for the executed command.\r
+                        This is an optional parameter and may be NULL.\r
+                        RETURN_SUCCESS The SMBUS command was executed.\r
+                        RETURN_TIMEOUT A timeout occurred while executing the SMBUS command.\r
+                        RETURN_DEVICE_ERROR  The request was not completed because a failure\r
+                        reflected in the Host Status Register bit.  Device errors are a result\r
+                        of a transaction collision, illegal command field, unclaimed cycle\r
+                        (host initiated), or bus errors (collisions).\r
+                        RETURN_CRC_ERROR  The checksum is not correct (PEC is incorrect)\r
+                        RETURN_UNSUPPORTED  The SMBus operation is not supported.\r
 \r
   @return The parameter of Value.\r
 \r
@@ -199,8 +265,7 @@ SmBusWriteDataByte (
   IN  UINTN          SmBusAddress,\r
   IN  UINT8          Value,\r
   OUT RETURN_STATUS  *Status        OPTIONAL\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Executes an SMBUS read data word command.\r
@@ -211,11 +276,19 @@ SmBusWriteDataByte (
   If Status is not NULL, then the status of the executed command is returned in Status.\r
   If Length in SmBusAddress is not zero, then ASSERT().\r
   If any reserved bits of SmBusAddress are set, then ASSERT().\r
-  \r
-  @param  SmBusAddress    Address that encodes the SMBUS Slave Address,\r
-                          SMBUS Command, SMBUS Data Length, and PEC.\r
-  @param  Status          Return status for the executed command.\r
-                          This is an optional parameter and may be NULL.\r
+\r
+  @param  SmBusAddress  Address that encodes the SMBUS Slave Address,\r
+                        SMBUS Command, SMBUS Data Length, and PEC.\r
+  @param  Status        Return status for the executed command.\r
+                        This is an optional parameter and may be NULL.\r
+                        RETURN_SUCCESS The SMBUS command was executed.\r
+                        RETURN_TIMEOUT A timeout occurred while executing the SMBUS command.\r
+                        RETURN_DEVICE_ERROR  The request was not completed because a failure\r
+                        reflected in the Host Status Register bit.  Device errors are a result\r
+                        of a transaction collision, illegal command field, unclaimed cycle\r
+                        (host initiated), or bus errors (collisions).\r
+                        RETURN_CRC_ERROR  The checksum is not correct (PEC is incorrect)\r
+                        RETURN_UNSUPPORTED  The SMBus operation is not supported.\r
 \r
   @return The byte read from the SMBUS.\r
 \r
@@ -225,8 +298,7 @@ EFIAPI
 SmBusReadDataWord (\r
   IN  UINTN          SmBusAddress,\r
   OUT RETURN_STATUS  *Status        OPTIONAL\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Executes an SMBUS write data word command.\r
@@ -239,11 +311,19 @@ SmBusReadDataWord (
   If Length in SmBusAddress is not zero, then ASSERT().\r
   If any reserved bits of SmBusAddress are set, then ASSERT().\r
 \r
-  @param  SmBusAddress    Address that encodes the SMBUS Slave Address,\r
-                          SMBUS Command, SMBUS Data Length, and PEC.\r
-  @param  Value           The 16-bit value to write.\r
-  @param  Status          Return status for the executed command.\r
-                          This is an optional parameter and may be NULL.\r
+  @param  SmBusAddress  Address that encodes the SMBUS Slave Address,\r
+                        SMBUS Command, SMBUS Data Length, and PEC.\r
+  @param  Value         The 16-bit value to write.\r
+  @param  Status        Return status for the executed command.\r
+                        This is an optional parameter and may be NULL.\r
+                        RETURN_SUCCESS The SMBUS command was executed.\r
+                        RETURN_TIMEOUT A timeout occurred while executing the SMBUS command.\r
+                        RETURN_DEVICE_ERROR  The request was not completed because a failure\r
+                        reflected in the Host Status Register bit.  Device errors are a result\r
+                        of a transaction collision, illegal command field, unclaimed cycle\r
+                        (host initiated), or bus errors (collisions).\r
+                        RETURN_CRC_ERROR  The checksum is not correct (PEC is incorrect)\r
+                        RETURN_UNSUPPORTED  The SMBus operation is not supported.\r
 \r
   @return The parameter of Value.\r
 \r
@@ -254,8 +334,7 @@ SmBusWriteDataWord (
   IN  UINTN          SmBusAddress,\r
   IN  UINT16         Value,\r
   OUT RETURN_STATUS  *Status        OPTIONAL\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Executes an SMBUS process call command.\r
@@ -268,11 +347,19 @@ SmBusWriteDataWord (
   If Length in SmBusAddress is not zero, then ASSERT().\r
   If any reserved bits of SmBusAddress are set, then ASSERT().\r
 \r
-  @param  SmBusAddress    Address that encodes the SMBUS Slave Address,\r
-                          SMBUS Command, SMBUS Data Length, and PEC.\r
-  @param  Value           The 16-bit value to write.\r
-  @param  Status          Return status for the executed command.\r
-                          This is an optional parameter and may be NULL.\r
+  @param  SmBusAddress  Address that encodes the SMBUS Slave Address,\r
+                        SMBUS Command, SMBUS Data Length, and PEC.\r
+  @param  Value         The 16-bit value to write.\r
+  @param  Status        Return status for the executed command.\r
+                        This is an optional parameter and may be NULL.\r
+                        RETURN_SUCCESS The SMBUS command was executed.\r
+                        RETURN_TIMEOUT A timeout occurred while executing the SMBUS command.\r
+                        RETURN_DEVICE_ERROR  The request was not completed because a failure\r
+                        reflected in the Host Status Register bit.  Device errors are a result\r
+                        of a transaction collision, illegal command field, unclaimed cycle\r
+                        (host initiated), or bus errors (collisions).\r
+                        RETURN_CRC_ERROR  The checksum is not correct (PEC is incorrect)\r
+                        RETURN_UNSUPPORTED  The SMBus operation is not supported.\r
 \r
   @return The 16-bit value returned by the process call command.\r
 \r
@@ -283,8 +370,7 @@ SmBusProcessCall (
   IN  UINTN          SmBusAddress,\r
   IN  UINT16         Value,\r
   OUT RETURN_STATUS  *Status        OPTIONAL\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Executes an SMBUS read block command.\r
@@ -300,11 +386,19 @@ SmBusProcessCall (
   If Buffer is NULL, then ASSERT().\r
   If any reserved bits of SmBusAddress are set, then ASSERT().\r
 \r
-  @param  SmBusAddress    Address that encodes the SMBUS Slave Address,\r
-                          SMBUS Command, SMBUS Data Length, and PEC.\r
-  @param  Buffer          Pointer to the buffer to store the bytes read from the SMBUS.\r
-  @param  Status          Return status for the executed command.\r
-                          This is an optional parameter and may be NULL.\r
+  @param  SmBusAddress  Address that encodes the SMBUS Slave Address,\r
+                        SMBUS Command, SMBUS Data Length, and PEC.\r
+  @param  Buffer        Pointer to the buffer to store the bytes read from the SMBUS.\r
+  @param  Status        Return status for the executed command.\r
+                        This is an optional parameter and may be NULL.\r
+                        RETURN_SUCCESS The SMBUS command was executed.\r
+                        RETURN_TIMEOUT A timeout occurred while executing the SMBUS command.\r
+                        RETURN_DEVICE_ERROR  The request was not completed because a failure\r
+                        reflected in the Host Status Register bit.  Device errors are a result\r
+                        of a transaction collision, illegal command field, unclaimed cycle\r
+                        (host initiated), or bus errors (collisions).\r
+                        RETURN_CRC_ERROR  The checksum is not correct (PEC is incorrect)\r
+                        RETURN_UNSUPPORTED  The SMBus operation is not supported.\r
 \r
   @return The number of bytes read.\r
 \r
@@ -315,8 +409,7 @@ SmBusReadBlock (
   IN  UINTN          SmBusAddress,\r
   OUT VOID           *Buffer,\r
   OUT RETURN_STATUS  *Status        OPTIONAL\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Executes an SMBUS write block command.\r
@@ -325,16 +418,23 @@ SmBusReadBlock (
   The SMBUS slave address, SMBUS command, and SMBUS length fields of SmBusAddress are required.\r
   Bytes are written to the SMBUS from Buffer.\r
   The number of bytes written is returned, and will never return a value larger than 32-bytes.\r
-  If Status is not NULL, then the status of the executed command is returned in Status.  \r
+  If Status is not NULL, then the status of the executed command is returned in Status.\r
   If Length in SmBusAddress is zero or greater than 32, then ASSERT().\r
   If Buffer is NULL, then ASSERT().\r
   If any reserved bits of SmBusAddress are set, then ASSERT().\r
 \r
-  @param  SmBusAddress    Address that encodes the SMBUS Slave Address,\r
-                          SMBUS Command, SMBUS Data Length, and PEC.\r
-  @param  Buffer          Pointer to the buffer to store the bytes read from the SMBUS.\r
-  @param  Status          Return status for the executed command.\r
-                          This is an optional parameter and may be NULL.\r
+  @param  SmBusAddress  Address that encodes the SMBUS Slave Address,\r
+                        SMBUS Command, SMBUS Data Length, and PEC.\r
+  @param  Buffer        Pointer to the buffer to store the bytes read from the SMBUS.\r
+  @param  Status        Return status for the executed command.\r
+                        This is an optional parameter and may be NULL.\r
+                        RETURN_TIMEOUT A timeout occurred while executing the SMBUS command.\r
+                        RETURN_DEVICE_ERROR  The request was not completed because a failure\r
+                        reflected in the Host Status Register bit.  Device errors are a result\r
+                        of a transaction collision, illegal command field, unclaimed cycle\r
+                        (host initiated), or bus errors (collisions).\r
+                        RETURN_CRC_ERROR  The checksum is not correct (PEC is incorrect)\r
+                        RETURN_UNSUPPORTED  The SMBus operation is not supported.\r
 \r
   @return The number of bytes written.\r
 \r
@@ -345,8 +445,7 @@ SmBusWriteBlock (
   IN  UINTN          SmBusAddress,\r
   OUT VOID           *Buffer,\r
   OUT RETURN_STATUS  *Status        OPTIONAL\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Executes an SMBUS block process call command.\r
@@ -362,12 +461,19 @@ SmBusWriteBlock (
   If ReadBuffer is NULL, then ASSERT().\r
   If any reserved bits of SmBusAddress are set, then ASSERT().\r
 \r
-  @param  SmBusAddress    Address that encodes the SMBUS Slave Address,\r
-                          SMBUS Command, SMBUS Data Length, and PEC.\r
-  @param  WriteBuffer     Pointer to the buffer of bytes to write to the SMBUS.\r
-  @param  ReadBuffer      Pointer to the buffer of bytes to read from the SMBUS.\r
-  @param  Status          Return status for the executed command.\r
-                          This is an optional parameter and may be NULL.\r
+  @param  SmBusAddress  Address that encodes the SMBUS Slave Address,\r
+                        SMBUS Command, SMBUS Data Length, and PEC.\r
+  @param  WriteBuffer   Pointer to the buffer of bytes to write to the SMBUS.\r
+  @param  ReadBuffer    Pointer to the buffer of bytes to read from the SMBUS.\r
+  @param  Status        Return status for the executed command.\r
+                        This is an optional parameter and may be NULL.\r
+                        RETURN_TIMEOUT A timeout occurred while executing the SMBUS command.\r
+                        RETURN_DEVICE_ERROR  The request was not completed because a failure\r
+                        reflected in the Host Status Register bit.  Device errors are a result\r
+                        of a transaction collision, illegal command field, unclaimed cycle\r
+                        (host initiated), or bus errors (collisions).\r
+                        RETURN_CRC_ERROR  The checksum is not correct (PEC is incorrect)\r
+                        RETURN_UNSUPPORTED  The SMBus operation is not supported.\r
 \r
   @return The number of bytes written.\r
 \r
@@ -379,8 +485,7 @@ SmBusBlockProcessCall (
   IN  VOID           *WriteBuffer,\r
   OUT VOID           *ReadBuffer,\r
   OUT RETURN_STATUS  *Status        OPTIONAL\r
-  )\r
-;\r
+  );\r
 \r
 \r
 #endif\r