]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Vlv2DeviceRefCodePkg/ValleyView2Soc: Remove the unused code
authorGary Lin <glin@suse.com>
Fri, 29 Jul 2016 03:25:30 +0000 (11:25 +0800)
committerdavid wei <david.wei@intel.com>
Wed, 3 Aug 2016 03:02:19 +0000 (11:02 +0800)
The code in _S3SUPPORT_ in PchAccess.h wasn't used in anywhere. Also,
The declaration of MCRX and MCR made gcc generate the error of
"multiple definition". Just remove the unused code to avoid any
potential issue.

Cc: David Wei <david.wei@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gary Lin <glin@suse.com>
Vlv2DeviceRefCodePkg/ValleyView2Soc/SouthCluster/Include/PchAccess.h

index 3f44d2bfa97ea81d914870de344c2790dc809f07..d080e1be7168997b68c8071a979dc0279d4a488e 100644 (file)
@@ -474,53 +474,4 @@ typedef struct _PCH_MSG_BUS_TABLE_STRUCT {
   UINT32      WriteOpCode;\r
 } PCH_MSG_BUS_TABLE_STRUCT_TABLE_STRUCT;\r
 \r
   UINT32      WriteOpCode;\r
 } PCH_MSG_BUS_TABLE_STRUCT_TABLE_STRUCT;\r
 \r
-#ifndef _S3SUPPORT_\r
-#define _S3SUPPORT_\r
-UINTN MCRX;\r
-UINTN MCR;\r
-//\r
-// In S3 execute, we should follow the MSG BUS access procedure to restore the saving data.\r
-// To do so, we adopt READ ->> SAVE\r
-// Indirect IO access: (According BayTrail-M EDS chapter 3.6)\r
-// 1. Write Index port into MSG BUS_MCRX first.\r
-// 2. Write content to data register which is called MSG BUS_MDR.\r
-// 3. Send "message bus control" to complete the procedure.\r
-//\r
-#define S3BootScriptSaveMsgBusToMemWrite(PortId, Register, Dbuff, ReadOpCode, WriteOpCode) \\r
-{ \\r
-  MCRX = (UINTN) Register & MSGBUS_MASKHI; \\r
-  MCR = (UINTN) ((ReadOpCode << 24) | (PortId << 16) | ((Register & MSGBUS_MASKLO) << 8) | MESSAGE_DWORD_EN); \\r
-  MmioWrite32 ((UINTN) (PatchPcdGet64 (PcdPciExpressBaseAddress) + MC_MCRX), (UINT32) MCRX); \\r
-  S3BootScriptSaveMemWrite(EfiBootScriptWidthUint32, (UINTN) (PatchPcdGet64 (PcdPciExpressBaseAddress) + MC_MCRX),1, (VOID *) (UINTN) &MCRX); \\r
-  MmioWrite32 ((UINTN) (PatchPcdGet64 (PcdPciExpressBaseAddress) + MC_MCR ), (UINT32) MCR); \\r
-  (Dbuff) = (UINT32) MmioRead32 ((UINTN) (PatchPcdGet64 (PcdPciExpressBaseAddress) + MC_MDR)); \\r
-  S3BootScriptSaveMemWrite(EfiBootScriptWidthUint32, (UINTN) (PatchPcdGet64 (PcdPciExpressBaseAddress) + MC_MDR),1, (VOID *) &Dbuff); \\r
-  MCR = (UINTN) ((WriteOpCode << 24) | (PortId << 16) | ((Register & MSGBUS_MASKLO) << 8) | MESSAGE_DWORD_EN); \\r
-  S3BootScriptSaveMemWrite(EfiBootScriptWidthUint32, (UINTN) (PatchPcdGet64 (PcdPciExpressBaseAddress) + MC_MCR),1, (VOID *) (UINTN) &MCR); \\r
-}\r
-\r
-//\r
-// This macro combines two function:  1. PchMsgBusAndThenOr32 ()  2. S3 boot script save\r
-//\r
-#define PchMsgBusAndThenOr32AddToS3Save(PortId, Register, Dbuff, AndData, OrData, ReadOpCode, WriteOpCode) \\r
-{ \\r
-  MmioWrite32 ((UINTN) (PatchPcdGet64 (PcdPciExpressBaseAddress) + MC_MCRX), (UINT32) (Register & MSGBUS_MASKHI)); \\r
-  MmioWrite32 ((UINTN) (PatchPcdGet64 (PcdPciExpressBaseAddress) + MC_MCR ), (UINT32) ((ReadOpCode << 24) | (PortId << 16) | ((Register & MSGBUS_MASKLO) << 8) | MESSAGE_DWORD_EN)); \\r
-  (Dbuff) = (UINT32) MmioRead32 ((UINTN) (PatchPcdGet64 (PcdPciExpressBaseAddress) + MC_MDR)); \\r
-  MmioWrite32 ((UINTN) (PatchPcdGet64 (PcdPciExpressBaseAddress) + MC_MCRX), (UINT32) (Register & MSGBUS_MASKHI)); \\r
-  MmioWrite32 ((UINTN) (PatchPcdGet64 (PcdPciExpressBaseAddress) + MC_MDR ), (UINT32) ((Dbuff & AndData) | OrData)); \\r
-  MmioWrite32 ((UINTN) (PatchPcdGet64 (PcdPciExpressBaseAddress) + MC_MCR ), (UINT32) ((WriteOpCode << 24) | (PortId << 16) | ((Register & MSGBUS_MASKLO) << 8) | MESSAGE_DWORD_EN)); \\r
-  MCRX = (UINTN) Register & MSGBUS_MASKHI; \\r
-  MCR = (UINTN) ((ReadOpCode << 24) | (PortId << 16) | ((Register & MSGBUS_MASKLO) << 8) | MESSAGE_DWORD_EN); \\r
-  MmioWrite32 ((UINTN) (PatchPcdGet64 (PcdPciExpressBaseAddress) + MC_MCRX), (UINT32) MCRX); \\r
-  S3BootScriptSaveMemWrite(EfiBootScriptWidthUint32, (UINTN) (PatchPcdGet64 (PcdPciExpressBaseAddress) + MC_MCRX),1,(VOID *) (UINTN) &MCRX); \\r
-  MmioWrite32 ((UINTN) (PatchPcdGet64 (PcdPciExpressBaseAddress) + MC_MCR ), (UINT32) MCR); \\r
-  (Dbuff) = (UINT32) MmioRead32 ((UINTN) (PatchPcdGet64 (PcdPciExpressBaseAddress) + MC_MDR)); \\r
-  S3BootScriptSaveMemWrite(EfiBootScriptWidthUint32, (UINTN) (PatchPcdGet64 (PcdPciExpressBaseAddress) + MC_MDR),1,(VOID *) &Dbuff); \\r
-  MCR = (UINTN) ((WriteOpCode << 24) | (PortId << 16) | ((Register & MSGBUS_MASKLO) << 8) | MESSAGE_DWORD_EN); \\r
-  S3BootScriptSaveMemWrite(EfiBootScriptWidthUint32, (UINTN) (PatchPcdGet64 (PcdPciExpressBaseAddress) + MC_MCR),1,(VOID *) (UINTN) &MCR); \\r
-}\r
-\r
-#endif\r
-\r
 #endif\r
 #endif\r