summaryrefslogtreecommitdiff
path: root/src/vendorcode/amd
diff options
context:
space:
mode:
authorRichard Spiegel <richard.spiegel@amd.corp-partner.google.com>2018-08-13 19:53:40 -0700
committerMartin Roth <martinroth@google.com>2018-08-15 18:32:45 +0000
commite4d46689b3505c721b28a798ce34f8d2951588be (patch)
tree7aefd18e5adb63eb8732c742d850636b38cf0fb9 /src/vendorcode/amd
parentd8b34e41dcf291ea517cd4749b111efee8307665 (diff)
downloadcoreboot-e4d46689b3505c721b28a798ce34f8d2951588be.tar.xz
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>
Diffstat (limited to 'src/vendorcode/amd')
-rw-r--r--src/vendorcode/amd/pi/00670F00/Lib/amdlib.c94
-rw-r--r--src/vendorcode/amd/pi/00670F00/Lib/amdlib.h27
2 files changed, 4 insertions, 117 deletions
diff --git a/src/vendorcode/amd/pi/00670F00/Lib/amdlib.c b/src/vendorcode/amd/pi/00670F00/Lib/amdlib.c
index b400bca513..784ba46f5a 100644
--- a/src/vendorcode/amd/pi/00670F00/Lib/amdlib.c
+++ b/src/vendorcode/amd/pi/00670F00/Lib/amdlib.c
@@ -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
diff --git a/src/vendorcode/amd/pi/00670F00/Lib/amdlib.h b/src/vendorcode/amd/pi/00670F00/Lib/amdlib.h
index 3f7fbbde26..f41e0c42e9 100644
--- a/src/vendorcode/amd/pi/00670F00/Lib/amdlib.h
+++ b/src/vendorcode/amd/pi/00670F00/Lib/amdlib.h
@@ -164,15 +164,6 @@ LibAmdIoWrite (
);
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 @@ LibAmdMemWrite (
);
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 @@ LibAmdPciWrite (
);
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,