soc/amd/stoneyridge: Add new function sb_program_gpio()

Add new function sb_program_gpio to be called after AGESA init_reset
and some point within ramstage. For AGESA init_reset, change
amd/stoneyridge/bootblock/bootblock.c function bootblock_soc_init
(add the function after the call to AGESA function).

BUG=b:64140392
TEST=Build kahlee, grunt, gardenia.

Change-Id: I38da26cd1e20617958a6b17d55b7d7c08b8a0230
Signed-off-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
Reviewed-on: https://review.coreboot.org/22987
Reviewed-by: Martin Roth <martinroth@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Richard Spiegel 2018-01-03 16:10:30 -07:00 committed by Martin Roth
parent e539c85386
commit 843f3abcbd
2 changed files with 10 additions and 0 deletions

View File

@ -123,6 +123,8 @@ void bootblock_soc_init(void)
post_code(0x37); post_code(0x37);
do_agesawrapper(agesawrapper_amdinitreset, "amdinitreset"); do_agesawrapper(agesawrapper_amdinitreset, "amdinitreset");
sb_program_gpio();
post_code(0x38); post_code(0x38);
/* APs will not exit amdinitearly */ /* APs will not exit amdinitearly */
do_agesawrapper(agesawrapper_amdinitearly, "amdinitearly"); do_agesawrapper(agesawrapper_amdinitearly, "amdinitearly");

View File

@ -181,6 +181,14 @@ void sb_program_gpio(void)
printk(BIOS_SPEW, "End GPIO programming\n"); printk(BIOS_SPEW, "End GPIO programming\n");
} }
static void sb_program_gpio_ram(void *unused)
{
sb_program_gpio();
}
BOOT_STATE_INIT_ENTRY(BS_WRITE_TABLES, BS_ON_ENTRY,
sb_program_gpio_ram, NULL);
/** /**
* @brief Find the size of a particular wide IO * @brief Find the size of a particular wide IO
* *