summaryrefslogtreecommitdiff
path: root/src/soc/amd/common/block/include
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2018-06-14 06:57:05 +0300
committerPatrick Georgi <pgeorgi@google.com>2019-04-23 10:10:34 +0000
commit6e512c4d7a4faa68bf64b37c68bae8141d9e4518 (patch)
tree2e26cc89cf7f26d46a0cc370c62c5801786d6a1f /src/soc/amd/common/block/include
parentba851170fba9157b45bfdc74fe60873c187cac96 (diff)
soc/amd/common: Introduce agesa_execute_state()
Each entrypoint to AGESA goes through the same sequence and have same the function signature. To avoid introducing bunch of preprocessor magic, rename all the agesawrapper_amdXXX() functions that are actual entrypoints to AGESA API, make them static, and provide a single exposed entry function agesa_execute_state(). Change-Id: I96ae1874132da3843aa42c2f4e8a59ec771d3893 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/31483 Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/amd/common/block/include')
-rw-r--r--src/soc/amd/common/block/include/amdblocks/agesawrapper.h13
-rw-r--r--src/soc/amd/common/block/include/amdblocks/agesawrapper_call.h4
2 files changed, 3 insertions, 14 deletions
diff --git a/src/soc/amd/common/block/include/amdblocks/agesawrapper.h b/src/soc/amd/common/block/include/amdblocks/agesawrapper.h
index 2f3b8a6268..04db4242cf 100644
--- a/src/soc/amd/common/block/include/amdblocks/agesawrapper.h
+++ b/src/soc/amd/common/block/include/amdblocks/agesawrapper.h
@@ -34,22 +34,11 @@ enum {
/* Return current dispatcher or NULL on error. */
MODULE_ENTRY agesa_get_dispatcher(void);
+AGESA_STATUS agesa_execute_state(AGESA_STRUCT_NAME func);
AGESA_STATUS amd_late_run_ap_task(AP_EXE_PARAMS *ApExeParams);
-AGESA_STATUS agesawrapper_amdinitreset(void);
-AGESA_STATUS agesawrapper_amdinitearly(void);
-AGESA_STATUS agesawrapper_amdinitenv(void);
-AGESA_STATUS agesawrapper_amdinitlate(void);
-AGESA_STATUS agesawrapper_amdinitpost(void);
-AGESA_STATUS agesawrapper_amdinitmid(void);
void *agesawrapper_getlateinitptr(int pick);
-AGESA_STATUS agesawrapper_amdinitrtb(void);
-AGESA_STATUS agesawrapper_amdinitresume(void);
-AGESA_STATUS agesawrapper_amds3laterestore(void);
-AGESA_STATUS agesawrapper_amds3finalrestore(void);
-AGESA_STATUS agesawrapper_fchs3earlyrestore(void);
-AGESA_STATUS agesawrapper_fchs3laterestore(void);
void OemCustomizeInitEarly(AMD_EARLY_PARAMS *InitEarly);
void amd_initcpuio(void);
diff --git a/src/soc/amd/common/block/include/amdblocks/agesawrapper_call.h b/src/soc/amd/common/block/include/amdblocks/agesawrapper_call.h
index 1188f054f5..86e32aff79 100644
--- a/src/soc/amd/common/block/include/amdblocks/agesawrapper_call.h
+++ b/src/soc/amd/common/block/include/amdblocks/agesawrapper_call.h
@@ -42,11 +42,11 @@ static const char *decodeAGESA_STATUS(AGESA_STATUS sret)
return statusStrings[sret];
}
-static inline u32 do_agesawrapper(AGESA_STATUS (*func)(void), const char *name)
+static inline u32 do_agesawrapper(AGESA_STRUCT_NAME func, const char *name)
{
AGESA_STATUS ret;
printk(BIOS_DEBUG, "agesawrapper_%s() entry\n", name);
- ret = func();
+ ret = agesa_execute_state(func);
printk(BIOS_DEBUG, "agesawrapper_%s() returned %s\n",
name, decodeAGESA_STATUS(ret));
return (u32)ret;