From a6bc494e234a9325016696fd9692d84b838c059f Mon Sep 17 00:00:00 2001 From: Angel Pons Date: Sat, 8 Jan 2022 12:41:51 +0100 Subject: [PATCH] mb/google/brya: Restructure PMC descriptor update Restructure the code in the `configure_pmc_descriptor()` so that it matches the code for the `intel/adlrvp` mainboard. This change does not reindent the contents of the original if-block intentionally as this will be taken care of in a reproducible follow-up. Change-Id: I8c9d9087cb2d0668f6a4afbb566d830bb9febd89 Signed-off-by: Angel Pons Reviewed-on: https://review.coreboot.org/c/coreboot/+/60937 Tested-by: build bot (Jenkins) Reviewed-by: Subrata Banik Reviewed-by: Sheng Lean Tan --- src/mainboard/google/brya/bootblock.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/mainboard/google/brya/bootblock.c b/src/mainboard/google/brya/bootblock.c index d391cd1de5..d293c5855d 100644 --- a/src/mainboard/google/brya/bootblock.c +++ b/src/mainboard/google/brya/bootblock.c @@ -29,7 +29,12 @@ static void configure_pmc_descriptor(void) return; } - if (si_desc_buf[PMC_DESC_7_BYTE3] == 0x40) { + if (si_desc_buf[PMC_DESC_7_BYTE3] != 0x40) { + printk(BIOS_DEBUG, "Update of PMC Descriptor is not required!\n"); + return; + } + + { si_desc_buf[PMC_DESC_7_BYTE3] = 0x44; if (rdev_eraseat(&desc_rdev, 0, SI_DESC_REGION_SZ) != SI_DESC_REGION_SZ) { @@ -49,8 +54,6 @@ static void configure_pmc_descriptor(void) do_full_reset(); die("Failed to trigger GLOBAL RESET\n"); } - - printk(BIOS_DEBUG, "Update of PMC Descriptor is not required!\n"); } void bootblock_mainboard_early_init(void) -- 2.11.4.GIT