mb/google/guybrush: Move variant_has_fpmcu() after eSPI init

Currently variant_has_fpmcu() is called very early in bootblock, before
eSPI is initialized.  When checking CBI for its presence, that causes
an error and nothing else can be read from CBI in bootblock.

Moving it slightly later in bootblock doesn't hurt anything from a
timing standpoint, and allows CBI to be read.

BUG=None
TEST=See CBI get read and the FPMCU field read correctly.

Signed-off-by: Martin Roth <martinroth@chromium.org>
Change-Id: I6de44119e92c8820b266f9f07287706c7d4eb505
Reviewed-on: https://review.coreboot.org/c/coreboot/+/54740
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
This commit is contained in:
Martin Roth 2021-05-20 17:22:28 -06:00 committed by Martin Roth
parent 494a5dd7f5
commit 455e07e7f3
1 changed files with 4 additions and 0 deletions

View File

@ -34,7 +34,11 @@ void bootblock_mainboard_early_init(void)
dword = pm_read32(0x74);
dword |= 3 << 10;
pm_write32(0x74, dword);
}
void bootblock_mainboard_init(void)
{
/* Put FPMCU check after EC initialization */
if (variant_has_fpmcu())
variant_fpmcu_reset();
}