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>
This commit is contained in:
Kyösti Mälkki
2018-06-14 06:57:05 +03:00
committed by Patrick Georgi
parent ba851170fb
commit 6e512c4d7a
9 changed files with 78 additions and 38 deletions

View File

@@ -391,7 +391,7 @@ void domain_enable_resources(struct device *dev)
{
/* Must be called after PCI enumeration and resource allocation */
if (!romstage_handoff_is_resume())
do_agesawrapper(agesawrapper_amdinitmid, "amdinitmid");
do_agesawrapper(AMD_INIT_MID, "amdinitmid");
}
void domain_set_resources(struct device *dev)