vendorcode/amd/pi/00670F00/Lib: Remove read modify write functions

Now that the functions that used them were safely removed, remove
LibAmdIoRMW(), LibAmdMemRMW() and LibAmdPciRMW().

BUG=b:112541697
TEST=Build grunt and gardenia

Change-Id: I570bd91cd9eba7798ea39d9685e214fee10824be
Signed-off-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
Reviewed-on: https://review.coreboot.org/28083
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
This commit is contained in:
Richard Spiegel 2018-08-13 19:53:40 -07:00 committed by Martin Roth
parent d8b34e41dc
commit e4d46689b3
2 changed files with 4 additions and 117 deletions

View File

@ -61,6 +61,7 @@ GetPciMmioAddress (
IN AMD_CONFIG_PARAMS *StdHeader
);
#if IS_ENABLED(CONFIG_VENDORCODE_FULL_SUPPORT)
VOID
STATIC
LibAmdGetDataFromPtr (
@ -70,6 +71,8 @@ LibAmdGetDataFromPtr (
OUT UINT32 *TemData,
OUT UINT32 *TempDataMask
);
#endif /* IS_ENABLED(CONFIG_VENDORCODE_FULL_SUPPORT) */
VOID
IdsOutPort (
IN UINT32 Addr,
@ -579,36 +582,6 @@ LibAmdIoWrite (
}
}
/*---------------------------------------------------------------------------------------*/
/**
* IO read modify write
*
*
* @param[in] AccessWidth Access width
* @param[in] IoAddress IO address
* @param[in] Data OR data
* @param[in] DataMask Mask to be used before data write back to register.
* @param[in] StdHeader Standard configuration header
*
*/
VOID
LibAmdIoRMW (
IN ACCESS_WIDTH AccessWidth,
IN UINT16 IoAddress,
IN CONST VOID *Data,
IN CONST VOID *DataMask,
IN OUT AMD_CONFIG_PARAMS *StdHeader
)
{
UINT32 TempData;
UINT32 TempMask;
UINT32 Value;
LibAmdGetDataFromPtr (AccessWidth, Data, DataMask, &TempData, &TempMask);
LibAmdIoRead (AccessWidth, IoAddress, &Value, NULL);
Value = (Value & (~TempMask)) | TempData;
LibAmdIoWrite (AccessWidth, IoAddress, &Value, NULL);
}
#if IS_ENABLED(CONFIG_VENDORCODE_FULL_SUPPORT)
/*---------------------------------------------------------------------------------------*/
/**
@ -720,35 +693,6 @@ LibAmdMemWrite (
break;
}
}
/*---------------------------------------------------------------------------------------*/
/**
* Memory/MMIO read modify write
*
*
* @param[in] AccessWidth Access width
* @param[in] MemAddress Memory address
* @param[in] Data OR data
* @param[in] DataMask Mask to be used before data write back to register.
* @param[in] StdHeader Standard configuration header
*
*/
VOID
LibAmdMemRMW (
IN ACCESS_WIDTH AccessWidth,
IN UINT64 MemAddress,
IN CONST VOID *Data,
IN CONST VOID *DataMask,
IN OUT AMD_CONFIG_PARAMS *StdHeader
)
{
UINT32 TempData;
UINT32 TempMask;
UINT32 Value;
LibAmdGetDataFromPtr (AccessWidth, Data, DataMask, &TempData, &TempMask);
LibAmdMemRead (AccessWidth, MemAddress, &Value, NULL);
Value = (Value & (~TempMask)) | TempData;
LibAmdMemWrite (AccessWidth, MemAddress, &Value, NULL);
}
#if IS_ENABLED(CONFIG_VENDORCODE_FULL_SUPPORT)
/*---------------------------------------------------------------------------------------*/
@ -891,36 +835,6 @@ LibAmdPciWrite (
}
}
/*---------------------------------------------------------------------------------------*/
/**
* PCI read modify write
*
*
* @param[in] AccessWidth Access width
* @param[in] PciAddress Pci address
* @param[in] Data OR Data
* @param[in] DataMask Mask to be used before data write back to register.
* @param[in] StdHeader Standard configuration header
*
*/
VOID
LibAmdPciRMW (
IN ACCESS_WIDTH AccessWidth,
IN PCI_ADDR PciAddress,
IN CONST VOID *Data,
IN CONST VOID *DataMask,
IN OUT AMD_CONFIG_PARAMS *StdHeader
)
{
UINT32 TempData = 0;
UINT32 TempMask = 0;
UINT32 Value;
LibAmdGetDataFromPtr (AccessWidth, Data, DataMask, &TempData, &TempMask);
LibAmdPciRead (AccessWidth, PciAddress, &Value, NULL);
Value = (Value & (~TempMask)) | TempData;
LibAmdPciWrite (AccessWidth, PciAddress, &Value, NULL);
}
#if IS_ENABLED(CONFIG_VENDORCODE_FULL_SUPPORT)
/*---------------------------------------------------------------------------------------*/
/**
@ -1297,6 +1211,7 @@ LibAmdGetPackageType (
}
#endif /* IS_ENABLED(CONFIG_VENDORCODE_FULL_SUPPORT) */
#if IS_ENABLED(CONFIG_VENDORCODE_FULL_SUPPORT)
/*---------------------------------------------------------------------------------------*/
/**
* Returns the package type mask for the processor
@ -1341,7 +1256,6 @@ LibAmdGetDataFromPtr (
}
}
#if IS_ENABLED(CONFIG_VENDORCODE_FULL_SUPPORT)
/*---------------------------------------------------------------------------------------*/
/**
* Returns the package type mask for the processor

View File

@ -163,15 +163,6 @@ LibAmdIoWrite (
IN OUT AMD_CONFIG_PARAMS *StdHeader
);
VOID
LibAmdIoRMW (
IN ACCESS_WIDTH AccessWidth,
IN UINT16 IoAddress,
IN CONST VOID *Data,
IN CONST VOID *DataMask,
IN OUT AMD_CONFIG_PARAMS *StdHeader
);
VOID
LibAmdIoPoll (
IN ACCESS_WIDTH AccessWidth,
@ -199,15 +190,6 @@ LibAmdMemWrite (
IN OUT AMD_CONFIG_PARAMS *StdHeader
);
VOID
LibAmdMemRMW (
IN ACCESS_WIDTH AccessWidth,
IN UINT64 MemAddress,
IN CONST VOID *Data,
IN CONST VOID *DataMask,
IN OUT AMD_CONFIG_PARAMS *StdHeader
);
VOID
LibAmdMemPoll (
IN ACCESS_WIDTH AccessWidth,
@ -235,15 +217,6 @@ LibAmdPciWrite (
IN OUT AMD_CONFIG_PARAMS *StdHeader
);
VOID
LibAmdPciRMW (
IN ACCESS_WIDTH AccessWidth,
IN PCI_ADDR PciAddress,
IN CONST VOID *Data,
IN CONST VOID *DataMask,
IN OUT AMD_CONFIG_PARAMS *StdHeader
);
VOID
LibAmdPciPoll (
IN ACCESS_WIDTH AccessWidth,