summaryrefslogtreecommitdiff
path: root/src/mainboard/bap
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2019-08-19 08:41:50 +0300
committerKyösti Mälkki <kyosti.malkki@gmail.com>2019-08-20 12:47:44 +0000
commit5be75d5311695316f0d34448b98299cbe8b91ea5 (patch)
tree4c51d81915c6575fc169ac51635f4875d212ed4e /src/mainboard/bap
parent830e0de40187183c34a1f558d83b65068b649e2a (diff)
downloadcoreboot-5be75d5311695316f0d34448b98299cbe8b91ea5.tar.xz
AGESA,binaryPI: Replace use of __PRE_RAM__
Change-Id: Id878fd33ec3d2de640d9a488058a805be3ccd223 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/34997 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Diffstat (limited to 'src/mainboard/bap')
-rw-r--r--src/mainboard/bap/ode_e20XX/BiosCallOuts.c9
-rw-r--r--src/mainboard/bap/ode_e21XX/BiosCallOuts.c9
2 files changed, 8 insertions, 10 deletions
diff --git a/src/mainboard/bap/ode_e20XX/BiosCallOuts.c b/src/mainboard/bap/ode_e20XX/BiosCallOuts.c
index 4f5ab88232..abe300e731 100644
--- a/src/mainboard/bap/ode_e20XX/BiosCallOuts.c
+++ b/src/mainboard/bap/ode_e20XX/BiosCallOuts.c
@@ -191,11 +191,12 @@ void board_FCH_InitEnv(struct sysinfo *cb_NA, FCH_DATA_BLOCK *FchParams_env)
static AGESA_STATUS board_ReadSpd_from_cbfs(UINT32 Func, UINTN Data, VOID *ConfigPtr)
{
- AGESA_STATUS Status = AGESA_UNSUPPORTED;
-#ifdef __PRE_RAM__
AGESA_READ_SPD_PARAMS *info = ConfigPtr;
u8 index;
+ if (!ENV_ROMSTAGE)
+ return AGESA_UNSUPPORTED;
+
if (CONFIG(BAP_E20_DDR3_1066))
index = 1;
else /* CONFIG_BAP_E20_DDR3_800 */
@@ -212,7 +213,5 @@ static AGESA_STATUS board_ReadSpd_from_cbfs(UINT32 Func, UINTN Data, VOID *Confi
if (read_ddr3_spd_from_cbfs((u8 *)info->Buffer, index) < 0)
die("No SPD data\n");
- Status = AGESA_SUCCESS;
-#endif
- return Status;
+ return AGESA_SUCCESS;
}
diff --git a/src/mainboard/bap/ode_e21XX/BiosCallOuts.c b/src/mainboard/bap/ode_e21XX/BiosCallOuts.c
index 6458b974ff..6ff38cbe77 100644
--- a/src/mainboard/bap/ode_e21XX/BiosCallOuts.c
+++ b/src/mainboard/bap/ode_e21XX/BiosCallOuts.c
@@ -299,11 +299,12 @@ static AGESA_STATUS Fch_Oem_config(UINT32 Func, UINTN FchData, VOID *ConfigPtr)
static AGESA_STATUS board_ReadSpd_from_cbfs(UINT32 Func, UINTN Data, VOID *ConfigPtr)
{
- AGESA_STATUS Status = AGESA_UNSUPPORTED;
-#ifdef __PRE_RAM__
AGESA_READ_SPD_PARAMS *info = ConfigPtr;
u8 index;
+ if (!ENV_ROMSTAGE)
+ return AGESA_UNSUPPORTED;
+
if (CONFIG(BAP_E21_DDR3_1066))
index = 1;
else if (CONFIG(BAP_E21_DDR3_1333))
@@ -322,7 +323,5 @@ static AGESA_STATUS board_ReadSpd_from_cbfs(UINT32 Func, UINTN Data, VOID *Confi
if (read_ddr3_spd_from_cbfs((u8 *)info->Buffer, index) < 0)
die("No SPD data\n");
- Status = AGESA_SUCCESS;
-#endif
- return Status;
+ return AGESA_SUCCESS;
}