From: "Chiu, Chasel" <chasel.chiu@intel.com>
To: "Kinney, Michael D" <michael.d.kinney@intel.com>,
"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: "Chaganty, Rangasai V" <rangasai.v.chaganty@intel.com>
Subject: Re: [edk2-platforms][Patch 1/3] CoffeelakeSiliconPkg/BaseSmbusLib: Fix SmBusSendByte value
Date: Fri, 11 Jun 2021 00:32:23 +0000 [thread overview]
Message-ID: <BN9PR11MB548354D6E871A2851744343AE6349@BN9PR11MB5483.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20210610224550.855-2-michael.d.kinney@intel.com>
Reviewed-by: Chasel Chiu <chasel.chiu@intel.com>
> -----Original Message-----
> From: Kinney, Michael D <michael.d.kinney@intel.com>
> Sent: Friday, June 11, 2021 6:46 AM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel <chasel.chiu@intel.com>; Chaganty, Rangasai V
> <rangasai.v.chaganty@intel.com>
> Subject: [edk2-platforms][Patch 1/3] CoffeelakeSiliconPkg/BaseSmbusLib: Fix
> SmBusSendByte value
>
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3450
>
> Update SmBusSendByte() to write value to Command Register instead of Host
> Data registers.
>
> Cc: Chasel Chiu <chasel.chiu@intel.com>
> Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
> ---
> .../Pch/Library/BaseSmbusLib/BaseSmbusLib.c | 24 +++++++++++++------
> 1 file changed, 17 insertions(+), 7 deletions(-)
>
> diff --git
> a/Silicon/Intel/CoffeelakeSiliconPkg/Pch/Library/BaseSmbusLib/BaseSmbusLib.c
> b/Silicon/Intel/CoffeelakeSiliconPkg/Pch/Library/BaseSmbusLib/BaseSmbusLib.c
> index 3d6386d433..dacf9d03b2 100644
> ---
> a/Silicon/Intel/CoffeelakeSiliconPkg/Pch/Library/BaseSmbusLib/BaseSmbusLib.c
> +++ b/Silicon/Intel/CoffeelakeSiliconPkg/Pch/Library/BaseSmbusLib/BaseSm
> +++ busLib.c
> @@ -203,14 +203,24 @@ InternalSmBusNonBlock (
> AuxiliaryControl |= B_SMBUS_IO_AAC;
> }
> //
> - // Set Host Commond Register.
> + // We do not need Data Register for SendByte Command
> //
> - IoWrite8 (IoPortBaseAddress + R_SMBUS_IO_HCMD, (UINT8)
> SMBUS_LIB_COMMAND (SmBusAddress));
> - //
> - // Write value to Host Data 0 and Host Data 1 Registers.
> - //
> - IoWrite8 (IoPortBaseAddress + R_SMBUS_IO_HD0, (UINT8) Value);
> - IoWrite8 (IoPortBaseAddress + R_SMBUS_IO_HD1, (UINT8) (Value >> 8));
> + if ((HostControl == V_SMBUS_IO_SMB_CMD_BYTE) && ((SmBusAddress &
> BIT0) == B_SMBUS_IO_WRITE)) {
> + //
> + // Set Host Command Register.
> + //
> + IoWrite8 (IoPortBaseAddress + R_SMBUS_IO_HCMD, (UINT8)Value); }
> + else {
> + //
> + // Set Host Command Register.
> + //
> + IoWrite8 (IoPortBaseAddress + R_SMBUS_IO_HCMD, (UINT8)
> SMBUS_LIB_COMMAND (SmBusAddress));
> + //
> + // Write value to Host Data 0 and Host Data 1 Registers.
> + //
> + IoWrite8 (IoPortBaseAddress + R_SMBUS_IO_HD0, (UINT8) Value);
> + IoWrite8 (IoPortBaseAddress + R_SMBUS_IO_HD1, (UINT8) (Value >>
> + 8)); }
> //
> // Set Auxiliary Control Regiester.
> //
> --
> 2.31.1.windows.1
next prev parent reply other threads:[~2021-06-11 0:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-10 22:45 [edk2-platforms][Patch 0/3] Fix SmBusSendByte value Michael D Kinney
2021-06-10 22:45 ` [edk2-platforms][Patch 1/3] CoffeelakeSiliconPkg/BaseSmbusLib: " Michael D Kinney
2021-06-11 0:32 ` Chiu, Chasel [this message]
2021-06-10 22:45 ` [edk2-platforms][Patch 2/3] KabylakeSiliconPkg/BaseSmbusLib: " Michael D Kinney
2021-06-11 0:33 ` Chiu, Chasel
2021-06-10 22:45 ` [edk2-platforms][Patch 3/3] QuarkSocPkg/SmbusLib: " Michael D Kinney
2021-06-11 0:16 ` [edk2-platforms][Patch 0/3] " Nate DeSimone
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=BN9PR11MB548354D6E871A2851744343AE6349@BN9PR11MB5483.namprd11.prod.outlook.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox