diff options
Diffstat (limited to 'MdePkg/Library/BaseS3SmbusLib/S3SmbusLib.c')
-rw-r--r-- | MdePkg/Library/BaseS3SmbusLib/S3SmbusLib.c | 33 |
1 files changed, 13 insertions, 20 deletions
diff --git a/MdePkg/Library/BaseS3SmbusLib/S3SmbusLib.c b/MdePkg/Library/BaseS3SmbusLib/S3SmbusLib.c index dfb10e5bfa4a..0cc877c28c1b 100644 --- a/MdePkg/Library/BaseS3SmbusLib/S3SmbusLib.c +++ b/MdePkg/Library/BaseS3SmbusLib/S3SmbusLib.c @@ -1,18 +1,11 @@ /** @file Smbus Library Services that do SMBus transactions and also enable the operatation to be replayed during an S3 resume. This library class maps directly on top - of the SmbusLib class. + of the SmbusLib class. - Copyright (c) 2007, Intel Corporation. All rights reserved.<BR> + Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR> - 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. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -25,7 +18,7 @@ #include <Library/S3SmbusLib.h> /** - Saves an SMBus operation to S3 script to be replayed on S3 resume. + Saves an SMBus operation to S3 script to be replayed on S3 resume. This function provides a standard way to save SMBus operation to S3 boot Script. The data can either be of the Length byte, word, or a block of data. @@ -86,7 +79,7 @@ S3SmBusQuickRead ( ) { SmBusQuickRead (SmBusAddress, Status); - + InternalSaveSmBusExecToBootScript (EfiSmbusQuickRead, SmBusAddress, 0, NULL); } @@ -119,7 +112,7 @@ S3SmBusQuickWrite ( InternalSaveSmBusExecToBootScript (EfiSmbusQuickWrite, SmBusAddress, 0, NULL); } - + /** Executes an SMBUS receive byte command and saves the value in the S3 script to be replayed on S3 resume. @@ -277,7 +270,7 @@ S3SmBusWriteDataByte ( If Status is not NULL, then the status of the executed command is returned in Status. If Length in SmBusAddress is not zero, then ASSERT(). If any reserved bits of SmBusAddress are set, then ASSERT(). - + @param SmBusAddress Address that encodes the SMBUS Slave Address, SMBUS Command, SMBUS Data Length, and PEC. @param Status Return status for the executed command. @@ -294,7 +287,7 @@ S3SmBusReadDataWord ( ) { UINT16 Word; - + Word = SmBusReadDataWord (SmBusAddress, Status); InternalSaveSmBusExecToBootScript (EfiSmbusReadWord, SmBusAddress, 2, &Word); @@ -375,7 +368,7 @@ S3SmBusProcessCall ( InternalSaveSmBusExecToBootScript (EfiSmbusProcessCall, SmBusAddress, 2, &Value); - return Word; + return Word; } /** @@ -427,7 +420,7 @@ S3SmBusReadBlock ( The SMBUS slave address, SMBUS command, and SMBUS length fields of SmBusAddress are required. Bytes are written to the SMBUS from Buffer. The number of bytes written is returned, and will never return a value larger than 32-bytes. - If Status is not NULL, then the status of the executed command is returned in Status. + If Status is not NULL, then the status of the executed command is returned in Status. If Length in SmBusAddress is zero or greater than 32, then ASSERT(). If Buffer is NULL, then ASSERT(). If any reserved bits of SmBusAddress are set, then ASSERT(). @@ -454,7 +447,7 @@ S3SmBusWriteBlock ( Length = SmBusWriteBlock (SmBusAddress, Buffer, Status); InternalSaveSmBusExecToBootScript (EfiSmbusWriteBlock, SmBusAddress, SMBUS_LIB_LENGTH (SmBusAddress), Buffer); - + return Length; } @@ -493,9 +486,9 @@ S3SmBusBlockProcessCall ( ) { UINTN Length; - + Length = SmBusBlockProcessCall (SmBusAddress, WriteBuffer, ReadBuffer, Status); - + InternalSaveSmBusExecToBootScript (EfiSmbusBWBRProcessCall, SmBusAddress, SMBUS_LIB_LENGTH (SmBusAddress), ReadBuffer); return Length; |