Richard Spiegel has uploaded this change for review. ( https://review.coreboot.org/28083
Change subject: vendorcode/amd/pi/00670F00/Lib: Remove read modify write functions ......................................................................
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 --- M src/vendorcode/amd/pi/00670F00/Lib/amdlib.c M src/vendorcode/amd/pi/00670F00/Lib/amdlib.h 2 files changed, 4 insertions(+), 117 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/83/28083/1
diff --git a/src/vendorcode/amd/pi/00670F00/Lib/amdlib.c b/src/vendorcode/amd/pi/00670F00/Lib/amdlib.c index b400bca..784ba46 100644 --- a/src/vendorcode/amd/pi/00670F00/Lib/amdlib.c +++ b/src/vendorcode/amd/pi/00670F00/Lib/amdlib.c @@ -61,6 +61,7 @@ IN AMD_CONFIG_PARAMS *StdHeader );
+#if IS_ENABLED(CONFIG_VENDORCODE_FULL_SUPPORT) VOID STATIC LibAmdGetDataFromPtr ( @@ -70,6 +71,8 @@ OUT UINT32 *TemData, OUT UINT32 *TempDataMask ); +#endif /* IS_ENABLED(CONFIG_VENDORCODE_FULL_SUPPORT) */ + VOID IdsOutPort ( IN UINT32 Addr, @@ -579,36 +582,6 @@ } }
-/*---------------------------------------------------------------------------------------*/ -/** - * 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 @@ 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 @@ } }
-/*---------------------------------------------------------------------------------------*/ -/** - * 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 @@ } #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 @@ } }
-#if IS_ENABLED(CONFIG_VENDORCODE_FULL_SUPPORT) /*---------------------------------------------------------------------------------------*/ /** * Returns the package type mask for the processor diff --git a/src/vendorcode/amd/pi/00670F00/Lib/amdlib.h b/src/vendorcode/amd/pi/00670F00/Lib/amdlib.h index 3f7fbbd..f41e0c4 100644 --- a/src/vendorcode/amd/pi/00670F00/Lib/amdlib.h +++ b/src/vendorcode/amd/pi/00670F00/Lib/amdlib.h @@ -164,15 +164,6 @@ );
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, IN UINT16 IoAddress, @@ -200,15 +191,6 @@ );
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, IN UINT64 MemAddress, @@ -236,15 +218,6 @@ );
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, IN PCI_ADDR PciAddress,