From a5d99a814a802aba6ed3331f8836f5453f3828c3 Mon Sep 17 00:00:00 2001 From: Subrata Banik Date: Tue, 27 May 2025 08:06:28 +0000 Subject: [PATCH] soc/qc/x1p42100: Perform `soc_mmu_init` inside early bootblock init This commit introduces `bootblock_soc_early_init` API for early SoC initialization sequence in the bootblock. - `bootblock_soc_early_init()`: This function now handles very early initialization steps (before console init), specifically `soc_mmu_init()` when the bootblock is not compressed. - `bootblock_soc_init()`: This function retains the subsequent initialization tasks including `clock_init()`, `quadspi_init()`, and `qupv3_fw_init()`. This change ensures MMU setup to occur before other peripheral and clock initializations. TEST=Able to get bootblock console log in proper. Change-Id: I8bbcdb9c39e13fac81ef6a34647c4f343a619561 Signed-off-by: Subrata Banik Reviewed-on: https://review.coreboot.org/c/coreboot/+/87857 Reviewed-by: Kapil Porwal Tested-by: build bot (Jenkins) Reviewed-by: Pranava Y N Reviewed-by: Paul Menzel --- src/soc/qualcomm/x1p42100/bootblock.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/soc/qualcomm/x1p42100/bootblock.c b/src/soc/qualcomm/x1p42100/bootblock.c index c6d8b9e4c5..d106912de7 100644 --- a/src/soc/qualcomm/x1p42100/bootblock.c +++ b/src/soc/qualcomm/x1p42100/bootblock.c @@ -7,11 +7,15 @@ #define SPI_BUS_CLOCK_FREQ (50 * MHz) +void bootblock_soc_early_init(void) +{ + if (!CONFIG(COMPRESS_BOOTBLOCK)) + soc_mmu_init(); +} + void bootblock_soc_init(void) { clock_init(); - if (!CONFIG(COMPRESS_BOOTBLOCK)) - soc_mmu_init(); quadspi_init(SPI_BUS_CLOCK_FREQ); qupv3_fw_init();