X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdePkg%2FLibrary%2FBaseS3SmbusLib%2FS3SmbusLib.c;h=899d5886d2b9bb81ba59c1a3384b8eb3c48f23b8;hp=1a7e0aef6461da290b64a3c28bc860b45288137c;hb=9095d37b8fe5bfc3d02adad6ba7fd7359ebc0107;hpb=d1102dba7210b95e41d06c2338a22ba6af248645 diff --git a/MdePkg/Library/BaseS3SmbusLib/S3SmbusLib.c b/MdePkg/Library/BaseS3SmbusLib/S3SmbusLib.c index 1a7e0aef64..899d5886d2 100644 --- a/MdePkg/Library/BaseS3SmbusLib/S3SmbusLib.c +++ b/MdePkg/Library/BaseS3SmbusLib/S3SmbusLib.c @@ -1,9 +1,9 @@ /** @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.
+ Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions @@ -25,7 +25,7 @@ #include /** - 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 +86,7 @@ S3SmBusQuickRead ( ) { SmBusQuickRead (SmBusAddress, Status); - + InternalSaveSmBusExecToBootScript (EfiSmbusQuickRead, SmBusAddress, 0, NULL); } @@ -119,7 +119,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 +277,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 +294,7 @@ S3SmBusReadDataWord ( ) { UINT16 Word; - + Word = SmBusReadDataWord (SmBusAddress, Status); InternalSaveSmBusExecToBootScript (EfiSmbusReadWord, SmBusAddress, 2, &Word); @@ -375,7 +375,7 @@ S3SmBusProcessCall ( InternalSaveSmBusExecToBootScript (EfiSmbusProcessCall, SmBusAddress, 2, &Value); - return Word; + return Word; } /** @@ -427,7 +427,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 +454,7 @@ S3SmBusWriteBlock ( Length = SmBusWriteBlock (SmBusAddress, Buffer, Status); InternalSaveSmBusExecToBootScript (EfiSmbusWriteBlock, SmBusAddress, SMBUS_LIB_LENGTH (SmBusAddress), Buffer); - + return Length; } @@ -493,9 +493,9 @@ S3SmBusBlockProcessCall ( ) { UINTN Length; - + Length = SmBusBlockProcessCall (SmBusAddress, WriteBuffer, ReadBuffer, Status); - + InternalSaveSmBusExecToBootScript (EfiSmbusBWBRProcessCall, SmBusAddress, SMBUS_LIB_LENGTH (SmBusAddress), ReadBuffer); return Length;