summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAngel Pons <th3fanbus@gmail.com>2022-01-08 12:49:04 +0100
committerFelix Held <felix-coreboot@felixheld.de>2022-01-11 14:02:11 +0000
commitc7fc9d6c4cdef96998393f6fb461431f8580e0a2 (patch)
tree0552a77e21d73fb4ad4088544e21fb01756d8858 /src
parenta6bc494e234a9325016696fd9692d84b838c059f (diff)
downloadcoreboot-c7fc9d6c4cdef96998393f6fb461431f8580e0a2.tar.gz
coreboot-c7fc9d6c4cdef96998393f6fb461431f8580e0a2.tar.bz2
coreboot-c7fc9d6c4cdef96998393f6fb461431f8580e0a2.zip
mb/google/brya/bootblock.c: Sync cosmetics with adlrvp
Adjust the cosmetics of the `configure_pmc_descriptor()` function to match the code for the `intel/adlrvp` mainboard. The only difference is that adlrvp checks if the descriptor is writable. Tested with BUILD_TIMELESS=1, Google Brya0 remains identical. Change-Id: I9c524d5c422c765db200a15f484c2b8827ebd40b Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/60938 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Subrata Banik <subratabanik@google.com> Reviewed-by: Sheng Lean Tan <sheng.tan@9elements.com>
Diffstat (limited to 'src')
-rw-r--r--src/mainboard/google/brya/bootblock.c30
1 files changed, 14 insertions, 16 deletions
diff --git a/src/mainboard/google/brya/bootblock.c b/src/mainboard/google/brya/bootblock.c
index d293c5855de5..1651337c4968 100644
--- a/src/mainboard/google/brya/bootblock.c
+++ b/src/mainboard/google/brya/bootblock.c
@@ -34,26 +34,24 @@ static void configure_pmc_descriptor(void)
return;
}
- {
- si_desc_buf[PMC_DESC_7_BYTE3] = 0x44;
+ si_desc_buf[PMC_DESC_7_BYTE3] = 0x44;
- if (rdev_eraseat(&desc_rdev, 0, SI_DESC_REGION_SZ) != SI_DESC_REGION_SZ) {
- printk(BIOS_ERR, "Failed to erase Descriptor Region area\n");
- return;
- }
+ if (rdev_eraseat(&desc_rdev, 0, SI_DESC_REGION_SZ) != SI_DESC_REGION_SZ) {
+ printk(BIOS_ERR, "Failed to erase Descriptor Region area\n");
+ return;
+ }
- if (rdev_writeat(&desc_rdev, si_desc_buf, 0, SI_DESC_REGION_SZ)
- != SI_DESC_REGION_SZ) {
- printk(BIOS_ERR, "Failed to update Descriptor Region\n");
- return;
- }
+ if (rdev_writeat(&desc_rdev, si_desc_buf, 0, SI_DESC_REGION_SZ)
+ != SI_DESC_REGION_SZ) {
+ printk(BIOS_ERR, "Failed to update Descriptor Region\n");
+ return;
+ }
- printk(BIOS_DEBUG, "Update of PMC Descriptor successful, trigger GLOBAL RESET\n");
+ printk(BIOS_DEBUG, "Update of PMC Descriptor successful, trigger GLOBAL RESET\n");
- pmc_global_reset_enable(1);
- do_full_reset();
- die("Failed to trigger GLOBAL RESET\n");
- }
+ pmc_global_reset_enable(true);
+ do_full_reset();
+ die("Failed to trigger GLOBAL RESET\n");
}
void bootblock_mainboard_early_init(void)