[PATCH v6 45/52] KabylakeSiliconPkg: Update for SPI2 PPI and Protocol


Michael Kubacki
 

From: Michael Kubacki <michael.kubacki@...>

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D3307

Updates references to the "PCH_SPI_PROTOCOL" and "PCH_SPI_PPI" to
instead refer to "PCH_SPI2_PROTOCOL" and "PCH_SPI2_PPI".

Cc: Chasel Chiu <chasel.chiu@...>
Cc: Rangasai V Chaganty <rangasai.v.chaganty@...>
Cc: Nate DeSimone <nathaniel.l.desimone@...>
Signed-off-by: Michael Kubacki <michael.kubacki@...>
---
Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiSpiLib/PeiSpiLib.c | 1=
0 +++++-----
Silicon/Intel/KabylakeSiliconPkg/Pch/Spi/Smm/PchSpi.c | =
8 ++++----
Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiSpiLib/PeiSpiLib.inf | =
2 +-
Silicon/Intel/KabylakeSiliconPkg/Pch/Spi/Smm/PchSpi.h | =
2 +-
Silicon/Intel/KabylakeSiliconPkg/Pch/Spi/Smm/PchSpiSmm.inf | =
2 +-
5 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiSpiLib/PeiSp=
iLib.c b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiSpiLib/PeiSpiLib=
.c
index c34c378de2eb..d8388f10a0d6 100644
--- a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiSpiLib/PeiSpiLib.c
+++ b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiSpiLib/PeiSpiLib.c
@@ -8,7 +8,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
=20
#include <PchReservedResources.h>
#include <IndustryStandard/Pci30.h>
-#include <Ppi/Spi.h>
+#include <Ppi/Spi2.h>
#include <Register/PchRegsLpc.h>
#include <Register/PchRegsSpi.h>
#include <Library/DebugLib.h>
@@ -65,16 +65,16 @@ SpiServiceInit (
EFI_STATUS Status;
PEI_SPI_INSTANCE *PeiSpiInstance;
SPI_INSTANCE *SpiInstance;
- PCH_SPI_PPI *SpiPpi;
+ PCH_SPI2_PPI *Spi2Ppi;
UINT16 AcpiBase;
=20
AcpiBase =3D 0;
=20
Status =3D PeiServicesLocatePpi (
- &gPchSpiPpiGuid,
+ &gPchSpi2PpiGuid,
0,
NULL,
- (VOID **) &SpiPpi
+ (VOID **) &Spi2Ppi
);
=20
if (Status !=3D EFI_SUCCESS) {
@@ -102,7 +102,7 @@ SpiServiceInit (
SpiProtocolConstructor (SpiInstance);
=20
PeiSpiInstance->PpiDescriptor.Flags =3D EFI_PEI_PPI_DESCRIPTOR_PPI |=
EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST;
- PeiSpiInstance->PpiDescriptor.Guid =3D &gPchSpiPpiGuid;
+ PeiSpiInstance->PpiDescriptor.Guid =3D &gPchSpi2PpiGuid;
PeiSpiInstance->PpiDescriptor.Ppi =3D &(SpiInstance->SpiProtocol);
=20
Status =3D PeiServicesInstallPpi (&PeiSpiInstance->PpiDescriptor);
diff --git a/Silicon/Intel/KabylakeSiliconPkg/Pch/Spi/Smm/PchSpi.c b/Sili=
con/Intel/KabylakeSiliconPkg/Pch/Spi/Smm/PchSpi.c
index 1d84d0613454..60a3ffe8ecc6 100644
--- a/Silicon/Intel/KabylakeSiliconPkg/Pch/Spi/Smm/PchSpi.c
+++ b/Silicon/Intel/KabylakeSiliconPkg/Pch/Spi/Smm/PchSpi.c
@@ -28,8 +28,8 @@ GLOBAL_REMOVE_IF_UNREFERENCED UINT32 mSp=
iResvMmioAddr;
- Documented in System Management Mode Core Interface Specificatio=
n .
=20
- @result
- The SPI SMM driver produces @link _PCH_SPI_PROTOCOL PCH_SPI_PROTOCOL=
@endlink with GUID
- gPchSmmSpiProtocolGuid which is different from SPI RUNTIME driver.
+ The SPI SMM driver produces @link _PCH_SPI2_PROTOCOL PCH_SPI2_PROTOC=
OL @endlink with GUID
+ gPchSmmSpi2ProtocolGuid which is different from SPI RUNTIME driver.
=20
- <b>Integration Check List</b>\n
- This driver supports Descriptor Mode only.
@@ -91,11 +91,11 @@ InstallPchSpi (
return Status;
}
///
- /// Install the SMM PCH_SPI_PROTOCOL interface
+ /// Install the SMM PCH_SPI2_PROTOCOL interface
///
Status =3D gSmst->SmmInstallProtocolInterface (
&(mSpiInstance->Handle),
- &gPchSmmSpiProtocolGuid,
+ &gPchSmmSpi2ProtocolGuid,
EFI_NATIVE_INTERFACE,
&(mSpiInstance->SpiProtocol)
);
diff --git a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiSpiLib/PeiSp=
iLib.inf b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiSpiLib/PeiSpiL=
ib.inf
index c6bc1ad406c8..ba57c44e1e12 100644
--- a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiSpiLib/PeiSpiLib.in=
f
+++ b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiSpiLib/PeiSpiLib.in=
f
@@ -42,4 +42,4 @@ [Pcd]
gSiPkgTokenSpaceGuid.PcdAcpiBaseAddress ## CONSUMES
=20
[Ppis]
- gPchSpiPpiGuid ## PRODUCES
+ gPchSpi2PpiGuid ## PRODUCES
diff --git a/Silicon/Intel/KabylakeSiliconPkg/Pch/Spi/Smm/PchSpi.h b/Sili=
con/Intel/KabylakeSiliconPkg/Pch/Spi/Smm/PchSpi.h
index 43e158b60425..46e2d35c0ee0 100644
--- a/Silicon/Intel/KabylakeSiliconPkg/Pch/Spi/Smm/PchSpi.h
+++ b/Silicon/Intel/KabylakeSiliconPkg/Pch/Spi/Smm/PchSpi.h
@@ -17,7 +17,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#include <Library/SmmServicesTableLib.h>
#include <Library/MmPciLib.h>
#include <PchAccess.h>
-#include <Protocol/Spi.h>
+#include <Protocol/Spi2.h>
#include <Library/PchSpiCommonLib.h>
#include <Library/CpuCommonLib.h>
=20
diff --git a/Silicon/Intel/KabylakeSiliconPkg/Pch/Spi/Smm/PchSpiSmm.inf b=
/Silicon/Intel/KabylakeSiliconPkg/Pch/Spi/Smm/PchSpiSmm.inf
index 819dc2439f30..85eb7b91fa3c 100644
--- a/Silicon/Intel/KabylakeSiliconPkg/Pch/Spi/Smm/PchSpiSmm.inf
+++ b/Silicon/Intel/KabylakeSiliconPkg/Pch/Spi/Smm/PchSpiSmm.inf
@@ -41,7 +41,7 @@ [Sources]
=20
=20
[Protocols]
-gPchSmmSpiProtocolGuid ## PRODUCES
+gPchSmmSpi2ProtocolGuid ## PRODUCES
=20
=20
[Depex]
--=20
2.28.0.windows.1

Join devel@edk2.groups.io to automatically receive all group messages.