QuarkSocPkg: Spi/Common: remove set but unused variables
authorLaszlo Ersek <lersek@redhat.com>
Fri, 18 Mar 2016 20:39:59 +0000 (21:39 +0100)
committerLaszlo Ersek <lersek@redhat.com>
Fri, 25 Mar 2016 09:52:46 +0000 (10:52 +0100)
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Kelly Steele <kelly.steele@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
QuarkSocPkg/QuarkNorthCluster/Spi/Common/SpiCommon.c

index e3d9b8f7def35ec7de492e360b001e0d58c93781..3a14c9837d01503f26e58a71269e696dc86bd631 100644 (file)
@@ -165,14 +165,12 @@ Returns:
   EFI_STATUS    Status;\r
   SPI_INSTANCE  *SpiInstance;\r
   UINT8         SpiStatus;\r
-  UINTN         PchRootComplexBar;\r
 \r
   if (UnlockCmdOpcodeIndex >= SPI_NUM_OPCODE) {\r
     return EFI_UNSUPPORTED;\r
   }\r
 \r
   SpiInstance = SPI_INSTANCE_FROM_SPIPROTOCOL (This);\r
-  PchRootComplexBar = SpiInstance->PchRootComplexBar;\r
 \r
   //\r
   // Issue unlock command to disable block protection, this only needs to be done once per SPI power on\r
@@ -230,11 +228,8 @@ Returns:
   UINT8         Index;\r
   UINT16        OpcodeType;\r
   SPI_INSTANCE  *SpiInstance;\r
-  BOOLEAN       MultiPartitionIsSupported;\r
   UINTN         PchRootComplexBar;\r
-  UINT8         SFDPCmdOpcodeIndex;\r
   UINT8         UnlockCmdOpcodeIndex;\r
-  UINT8         ReadDataCmdOpcodeIndex;\r
   UINT8         FlashPartId[3];\r
 \r
   SpiInstance       = SPI_INSTANCE_FROM_SPIPROTOCOL (This);\r
@@ -302,8 +297,6 @@ Returns:
   //\r
   // Setup the Opcode Menu registers.\r
   //\r
-  ReadDataCmdOpcodeIndex = SPI_NUM_OPCODE;\r
-  SFDPCmdOpcodeIndex = SPI_NUM_OPCODE;\r
   UnlockCmdOpcodeIndex = SPI_NUM_OPCODE;\r
   for (Index = 0; Index < SPI_NUM_OPCODE; Index++) {\r
     MmioWrite8 (\r
@@ -334,23 +327,11 @@ Returns:
       }\r
     }\r
 \r
-    if (SpiInstance->SpiInitTable.OpcodeMenu[Index].Operation == EnumSpiOperationReadData ||\r
-        SpiInstance->SpiInitTable.OpcodeMenu[Index].Operation == EnumSpiOperationFastRead ||\r
-        SpiInstance->SpiInitTable.OpcodeMenu[Index].Operation == EnumSpiOperationDualOutputFastRead) {\r
-      ReadDataCmdOpcodeIndex = Index;\r
-    }\r
-\r
-    if (SpiInstance->SpiInitTable.OpcodeMenu[Index].Operation == EnumSpiOperationDiscoveryParameters) {\r
-      SFDPCmdOpcodeIndex = Index;\r
-    }\r
-\r
     if (SpiInstance->SpiInitTable.OpcodeMenu[Index].Operation == EnumSpiOperationWriteStatus) {\r
       UnlockCmdOpcodeIndex = Index;\r
     }\r
   }\r
 \r
-  MultiPartitionIsSupported = FALSE;\r
-\r
   Status = UnlockFlashComponents (\r
             This,\r
             UnlockCmdOpcodeIndex\r
@@ -630,10 +611,8 @@ Returns:
 --*/\r
 {\r
   SPI_INSTANCE  *SpiInstance;\r
-  UINTN         PchRootComplexBar;\r
 \r
   SpiInstance       = SPI_INSTANCE_FROM_SPIPROTOCOL (This);\r
-  PchRootComplexBar = SpiInstance->PchRootComplexBar;\r
 \r
   if (SpiRegionType == EnumSpiRegionAll) {\r
     //\r
@@ -714,13 +693,11 @@ Returns:
   UINTN         LimitAddress;\r
   UINT32        SpiDataCount;\r
   UINT8         OpCode;\r
-  SPI_OPERATION Operation;\r
   UINTN         PchRootComplexBar;\r
 \r
   SpiInstance       = SPI_INSTANCE_FROM_SPIPROTOCOL (This);\r
   PchRootComplexBar = SpiInstance->PchRootComplexBar;\r
   SpiBiosSize       = SpiInstance->SpiInitTable.BiosSize;\r
-  Operation         = SpiInstance->SpiInitTable.OpcodeMenu[OpcodeIndex].Operation;\r
   OpCode            = MmioRead8 (PchRootComplexBar + R_QNC_RCRB_SPIOPMENU + OpcodeIndex);\r
 \r
   //\r