From 5be75d5311695316f0d34448b98299cbe8b91ea5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Mon, 19 Aug 2019 08:41:50 +0300 Subject: AGESA,binaryPI: Replace use of __PRE_RAM__ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Id878fd33ec3d2de640d9a488058a805be3ccd223 Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/c/coreboot/+/34997 Tested-by: build bot (Jenkins) Reviewed-by: Marshall Dawson --- src/mainboard/pcengines/apu1/BiosCallOuts.c | 10 +++++----- src/mainboard/pcengines/apu2/BiosCallOuts.c | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'src/mainboard/pcengines') diff --git a/src/mainboard/pcengines/apu1/BiosCallOuts.c b/src/mainboard/pcengines/apu1/BiosCallOuts.c index df5f03731b..caaa1f421f 100644 --- a/src/mainboard/pcengines/apu1/BiosCallOuts.c +++ b/src/mainboard/pcengines/apu1/BiosCallOuts.c @@ -50,9 +50,11 @@ static AGESA_STATUS board_BeforeDramInit (UINT32 Func, UINTN Data, VOID *ConfigP 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; + + if (!ENV_ROMSTAGE) + return AGESA_UNSUPPORTED; + u8 index = get_spd_offset(); if (info->MemChannelId > 0) @@ -66,7 +68,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/pcengines/apu2/BiosCallOuts.c b/src/mainboard/pcengines/apu2/BiosCallOuts.c index edacb22bee..dff346e16a 100644 --- a/src/mainboard/pcengines/apu2/BiosCallOuts.c +++ b/src/mainboard/pcengines/apu2/BiosCallOuts.c @@ -130,9 +130,11 @@ 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; + + if (!ENV_ROMSTAGE) + return AGESA_UNSUPPORTED; + u8 index = get_spd_offset(); if (info->MemChannelId > 0) @@ -146,7 +148,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; } -- cgit v1.2.3