From nobody Sat May 4 06:39:03 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+76342+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+76342+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1623365189; cv=none; d=zohomail.com; s=zohoarc; b=G4RrvXZ0n5phAVAyRv3Kkb0fYBdehOHhLgfjNJg7c8cpAlgHYCDBmHz9EMOKz5wGVu1f2ZDlkGtTSdlkHUG9jq9NmqfnsWsR4RESw9WSH1MFnD32m2UQDnOF/pHXl78TVX50k3v9qMZPwioZFzTZrWADkDREa3DbcknuLzgTslo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1623365189; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=4Z+VL/2WpJ7YwO6NhRpqlVL1YwQm+ynZ9WbH8ymwLo0=; b=PW9omFSfKcFtkmUCttpk17si86pH9loF5C3mvM7sTDS7XAy8IXFsFj9JQ9x0hmyt/9YzBOy99ELfCLkLWXuBLLMUCfYU2FbF3U5RSs2MME5xuFWmgcEcAShG+Z4L25R2hz333bH/BF74vJr808OHEqBnTf1O0MTndAMv99B3B/E= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+76342+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1623365189533164.79581723218337; Thu, 10 Jun 2021 15:46:29 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id lavfYY1788612xCaPAHRffH2; Thu, 10 Jun 2021 15:46:29 -0700 X-Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web10.1057.1623365182124167839 for ; Thu, 10 Jun 2021 15:46:22 -0700 IronPort-SDR: /8Cy3AIBCiwYu+xWpOkL5N0dJSAFevVCpBjhr7YQyFubSj/2q0/qJ6PRVFw7IwvJZIcEkC0zxx uSdcl4oHJ/AQ== X-IronPort-AV: E=McAfee;i="6200,9189,10011"; a="291051492" X-IronPort-AV: E=Sophos;i="5.83,264,1616482800"; d="scan'208";a="291051492" X-Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jun 2021 15:46:08 -0700 IronPort-SDR: Oky8VvoaecCOToYAIC9scEAXuTMiwkZlw+4mHPYVL+XQHuBITg+GWXk1QxOah2RPUaw7waICoZ VJFq1op5rVDQ== X-IronPort-AV: E=Sophos;i="5.83,264,1616482800"; d="scan'208";a="419883426" X-Received: from mdkinney-mobl2.amr.corp.intel.com ([10.209.9.161]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jun 2021 15:46:08 -0700 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Chasel Chiu , Sai Chaganty Subject: [edk2-devel] [edk2-platforms][Patch 1/3] CoffeelakeSiliconPkg/BaseSmbusLib: Fix SmBusSendByte value Date: Thu, 10 Jun 2021 15:45:48 -0700 Message-Id: <20210610224550.855-2-michael.d.kinney@intel.com> In-Reply-To: <20210610224550.855-1-michael.d.kinney@intel.com> References: <20210610224550.855-1-michael.d.kinney@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,michael.d.kinney@intel.com X-Gm-Message-State: 9cHphOstUCzYnFe21cd1RTYnx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1623365189; bh=gMfvi1ari3ZFjD7EIdFTRHF2gq/NZ2V6K8IJ80vgUM4=; h=Cc:Date:From:Reply-To:Subject:To; b=sj9VhdtNQP8Mri6iizBS4jC+cKZpvxDjbfvi4eEYdD3hmTPdhQPF+v4fxt/c6eJw5c0 mohck3LUJfrwNf+zeMFpsNliaaNO4vk5uyUE1OnrRPKiIw/AyKZbTcTSnMOBobKPUP7b8 KCF7rZRCIJEhejvGynx8hkRkfLPVo4/+Ebs= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3450 Update SmBusSendByte() to write value to Command Register instead of Host Data registers. Cc: Chasel Chiu Cc: Sai Chaganty Signed-off-by: Michael D Kinney Reviewed-by: Chasel Chiu Reviewed-by: Nate DeSimone --- .../Pch/Library/BaseSmbusLib/BaseSmbusLib.c | 24 +++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/Silicon/Intel/CoffeelakeSiliconPkg/Pch/Library/BaseSmbusLib/Ba= seSmbusLib.c b/Silicon/Intel/CoffeelakeSiliconPkg/Pch/Library/BaseSmbusLib/= BaseSmbusLib.c index 3d6386d433..dacf9d03b2 100644 --- a/Silicon/Intel/CoffeelakeSiliconPkg/Pch/Library/BaseSmbusLib/BaseSmbus= Lib.c +++ b/Silicon/Intel/CoffeelakeSiliconPkg/Pch/Library/BaseSmbusLib/BaseSmbus= Lib.c @@ -203,14 +203,24 @@ InternalSmBusNonBlock ( AuxiliaryControl |=3D 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 =3D=3D V_SMBUS_IO_SMB_CMD_BYTE) && ((SmBusAddress & BIT= 0) =3D=3D 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_COMMA= ND (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. // --=20 2.31.1.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#76342): https://edk2.groups.io/g/devel/message/76342 Mute This Topic: https://groups.io/mt/83456848/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Sat May 4 06:39:03 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+76345+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+76345+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1623365189; cv=none; d=zohomail.com; s=zohoarc; b=VYRZsEsBwtFl20PCwh9IWZYXli2XVnjzN//ag3VzNEXKQ1BjZ6xCb0khPbJAHFos+lVMEurnECgj5ZP4BiepPZqiFm0BLXU/GlsBGiV+ugIEDjHJmzgtVBGo5o99AFJXFrpwz/w8ixCLtNHUcrZFqewkZ9vzOLAm7ckM1jRRybc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1623365189; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=L0j0VOxqbQUngsPMv1fBk8XVoL2MtO+7gp5S2SHc8ms=; b=aLvmj5KW/ekoWEzSblp96zBrKPbIVDWCGErWeFgMX+L0RVmdeXt7I+O2zoFcwynwxsc1j7NKRXMY5sWlJjFZ7B4pQn2qPPlguXlGzS1bqdciI2dx+zloyESVt2ozk3DqfW2LbwGZKZFDJgSxnHW1R/TfwmITcEv4OBAfx89AANg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+76345+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1623365189149381.1010138386205; Thu, 10 Jun 2021 15:46:29 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id VZiwYY1788612xA2c1L7R1Gd; Thu, 10 Jun 2021 15:46:28 -0700 X-Received: from mga05.intel.com (mga05.intel.com []) by mx.groups.io with SMTP id smtpd.web10.1057.1623365182124167839 for ; Thu, 10 Jun 2021 15:46:22 -0700 IronPort-SDR: witH/TXGxCguUr/V+sKyVuGpvwTn9/DIwnU1E0scNT3xU2Xrh2is4pQXgSrZLMvhkjrWhVEurI WAhQXXsm6N6g== X-IronPort-AV: E=McAfee;i="6200,9189,10011"; a="291051494" X-IronPort-AV: E=Sophos;i="5.83,264,1616482800"; d="scan'208";a="291051494" X-Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jun 2021 15:46:09 -0700 IronPort-SDR: nz4U6abkWRozlJH9NXdE6t9OwFqErBw4mEMsPOFMJ8xmxPbShYa8oLFGEM3n/MF3Proe/cpeYp evR8DCGzcQaw== X-IronPort-AV: E=Sophos;i="5.83,264,1616482800"; d="scan'208";a="419883431" X-Received: from mdkinney-mobl2.amr.corp.intel.com ([10.209.9.161]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jun 2021 15:46:08 -0700 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Chasel Chiu , Nate DeSimone Subject: [edk2-devel] [edk2-platforms][Patch 2/3] KabylakeSiliconPkg/BaseSmbusLib: Fix SmBusSendByte value Date: Thu, 10 Jun 2021 15:45:49 -0700 Message-Id: <20210610224550.855-3-michael.d.kinney@intel.com> In-Reply-To: <20210610224550.855-1-michael.d.kinney@intel.com> References: <20210610224550.855-1-michael.d.kinney@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,michael.d.kinney@intel.com X-Gm-Message-State: NPr6cEnt3Vda0HSQMONi3o54x1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1623365188; bh=38LS7bKlxG/+8bp4kDeE8W+CxOK5fYh0CAZS83Jm/lU=; h=Cc:Date:From:Reply-To:Subject:To; b=vJo9ttbpm3lWEY74vf0l0yZDX1uHxzvq7Afn9tZOkvLQNAGpkBFlfHqy0vs0xwiVZ7W le1WhXlLqOy0xNsde6DmerzjHxA0n205WW/Qj7FNIKpGSrUXKWRBgr6QOq0bWZ5E7vpRG kYtgB63G6vHQYd/dHJhIayAYMJAQYqld8e8= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3451 Update SmBusSendByte() to write value to Command Register instead of Host Data registers. Cc: Chasel Chiu Cc: Nate DeSimone Signed-off-by: Michael D Kinney Reviewed-by: Chasel Chiu Reviewed-by: Nate DeSimone --- .../Pch/Library/BaseSmbusLib/BaseSmbusLib.c | 24 +++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/BaseSmbusLib/Base= SmbusLib.c b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/BaseSmbusLib/Base= SmbusLib.c index 5d09e18613..68dc698aaf 100644 --- a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/BaseSmbusLib/BaseSmbusLi= b.c +++ b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/BaseSmbusLib/BaseSmbusLi= b.c @@ -201,14 +201,24 @@ InternalSmBusNonBlock ( HostControl |=3D B_PCH_SMBUS_PEC_EN; } // - // Set Host Commond Register. + // We do not need Data Register for SendByte Command // - IoWrite8 (IoPortBaseAddress + R_PCH_SMBUS_HCMD, (UINT8) SMBUS_LIB_COMMAN= D (SmBusAddress)); - // - // Write value to Host Data 0 and Host Data 1 Registers. - // - IoWrite8 (IoPortBaseAddress + R_PCH_SMBUS_HD0, (UINT8) Value); - IoWrite8 (IoPortBaseAddress + R_PCH_SMBUS_HD1, (UINT8) (Value >> 8)); + if ((HostControl =3D=3D V_PCH_SMBUS_SMB_CMD_BYTE) && ((SmBusAddress & BI= T0) =3D=3D B_PCH_SMBUS_WRITE)) { + // + // Set Host Command Register. + // + IoWrite8 (IoPortBaseAddress + R_PCH_SMBUS_HCMD, (UINT8)Value); + } else { + // + // Set Host Command Register. + // + IoWrite8 (IoPortBaseAddress + R_PCH_SMBUS_HCMD, (UINT8) SMBUS_LIB_COMM= AND (SmBusAddress)); + // + // Write value to Host Data 0 and Host Data 1 Registers. + // + IoWrite8 (IoPortBaseAddress + R_PCH_SMBUS_HD0, (UINT8) Value); + IoWrite8 (IoPortBaseAddress + R_PCH_SMBUS_HD1, (UINT8) (Value >> 8)); + } // // Set Auxiliary Control Regiester. // --=20 2.31.1.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#76345): https://edk2.groups.io/g/devel/message/76345 Mute This Topic: https://groups.io/mt/83456851/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Sat May 4 06:39:03 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+76344+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+76344+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1623365189; cv=none; d=zohomail.com; s=zohoarc; b=JS0/Uccd/9osAHxEj/BK/RxtmcbS+I/V2JHoc7ZcM4EBpRUXNsMgSRT+goSx1ksIhuBKtZHSGlIYNPxexgju/dodeQicl3YNzW6Q4XUoLJN0w/xH4m8JOXOFWuW3B1DW1rhF7LMHpcJv1OT1cT42sURWZhXplefMkWHFlJh7m88= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1623365189; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=5a7Wbxv7usBhhtfAW44eL+Ov7IC6keuxwCmcLFeFgfI=; b=SyllQNgZmg4KrXw5cXK+HXd7BTFYDSEGw4cHnIADrApf2NuO1U7/2e6WHCZLJ+33wKvmEkx+bnEBHcqmeTz2+V1RazfxRM2l72nT5JMCD6VKKQL9aQm5C3PV9WDLRKkcANDgOiBfZpSbzCOssc2gRtVNS41zqLD0QjYrwCVoBKE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+76344+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1623365189968943.011267505054; Thu, 10 Jun 2021 15:46:29 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id SkBfYY1788612x0tYbrVT9Qz; Thu, 10 Jun 2021 15:46:29 -0700 X-Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web12.1043.1623365182622647901 for ; Thu, 10 Jun 2021 15:46:22 -0700 IronPort-SDR: pHOOr/NKxLP661T67oxLS/QnJ5BZ/lkT3qBPh7rqJ9BQGMg7PaECMtSO/tYV2XEqbTIUts0SPW tAZ6/EaF/HCg== X-IronPort-AV: E=McAfee;i="6200,9189,10011"; a="291051496" X-IronPort-AV: E=Sophos;i="5.83,264,1616482800"; d="scan'208";a="291051496" X-Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jun 2021 15:46:09 -0700 IronPort-SDR: NZ1lsj7homwRCCGPTfkZD8ZTSav0B6A2rCxRmbrpjFhYUY8vZe/uIqBKyi3SkArlOICDYoLIkY PzndYzAPHAtg== X-IronPort-AV: E=Sophos;i="5.83,264,1616482800"; d="scan'208";a="419883435" X-Received: from mdkinney-mobl2.amr.corp.intel.com ([10.209.9.161]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jun 2021 15:46:08 -0700 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Nate DeSimone Subject: [edk2-devel] [edk2-platforms][Patch 3/3] QuarkSocPkg/SmbusLib: Fix SmBusSendByte value Date: Thu, 10 Jun 2021 15:45:50 -0700 Message-Id: <20210610224550.855-4-michael.d.kinney@intel.com> In-Reply-To: <20210610224550.855-1-michael.d.kinney@intel.com> References: <20210610224550.855-1-michael.d.kinney@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,michael.d.kinney@intel.com X-Gm-Message-State: kryG1vqYpNGpOu8P1DmAWGTRx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1623365189; bh=UnQBzWEji2WPN/wRV37sRkSWE+qQjJJrDLD3wC5nAL4=; h=Cc:Date:From:Reply-To:Subject:To; b=th4fplc6A3JvyyLnaIGUkV8IYxcK/67oFfFyTVtOyhI5530ZG/HhYH2bKYorvP4sCDi QejQeNcSDTOEuKiWw/qSd7fUQEQRf6cpxflIXQ0WH+W71g0F9acyWxP3JTFPnuQZom1vi Mo/LYpAXKmN61sZBoL7QjgvjxUaelVmUhB8= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3452 Update SmBusSendByte() to write value to Command Register instead of Host Data registers. Cc: Nate DeSimone Signed-off-by: Michael D Kinney Reviewed-by: Nate DeSimone --- .../Library/SmbusLib/SmbusLib.c | 27 ++++++++++++------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/Silicon/Intel/QuarkSocPkg/QuarkNorthCluster/Library/SmbusLib/S= mbusLib.c b/Silicon/Intel/QuarkSocPkg/QuarkNorthCluster/Library/SmbusLib/Sm= busLib.c index 319e103cf4..34437582d4 100644 --- a/Silicon/Intel/QuarkSocPkg/QuarkNorthCluster/Library/SmbusLib/SmbusLib= .c +++ b/Silicon/Intel/QuarkSocPkg/QuarkNorthCluster/Library/SmbusLib/SmbusLib= .c @@ -165,15 +165,24 @@ InternalSmBusNonBlock ( } =20 // - // Set Host Commond Register. + // We do not need Data Register for SendByte Command // - IoWrite8 (IoPortBaseAddress + R_QNC_SMBUS_HCMD, (UINT8) SMBUS_LIB_COMMAN= D (SmBusAddress)); - // - // Write value to Host Data 0 and Host Data 1 Registers. - // - IoWrite8 (IoPortBaseAddress + R_QNC_SMBUS_HD0, (UINT8) Value); - IoWrite8 (IoPortBaseAddress + R_QNC_SMBUS_HD1, (UINT8) (Value >> 8)); - + if ((HostControl =3D=3D V_QNC_SMBUS_HCTL_CMD_BYTE) && ((SmBusAddress & B= IT0) =3D=3D V_QNC_SMBUS_RW_SEL_WRITE)) { + // + // Set Host Command Register. + // + IoWrite8 (IoPortBaseAddress + R_QNC_SMBUS_HCMD, (UINT8)Value); + } else { + // + // Set Host Command Register. + // + IoWrite8 (IoPortBaseAddress + R_QNC_SMBUS_HCMD, (UINT8) SMBUS_LIB_COMM= AND (SmBusAddress)); + // + // Write value to Host Data 0 and Host Data 1 Registers. + // + IoWrite8 (IoPortBaseAddress + R_QNC_SMBUS_HD0, (UINT8) Value); + IoWrite8 (IoPortBaseAddress + R_QNC_SMBUS_HD1, (UINT8) (Value >> 8)); + } =20 // // Set SMBUS slave address for the device to send/receive from. @@ -351,7 +360,7 @@ SmBusSendByte ( =20 return (UINT8) InternalSmBusNonBlock ( V_QNC_SMBUS_HCTL_CMD_BYTE, - SmBusAddress & V_QNC_SMBUS_RW_SEL_WRITE, + SmBusAddress | V_QNC_SMBUS_RW_SEL_WRITE, Value, Status ); --=20 2.31.1.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#76344): https://edk2.groups.io/g/devel/message/76344 Mute This Topic: https://groups.io/mt/83456850/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-