soc/mediatek/mt8196: Call fsp_init via boot state
Refactor fsp_init to be called as a boot state entry (BS_DEV_INIT, BS_ON_ENTRY) instead of directly from soc_init. This ensures fsp initialization occurs at the appropriate boot stage. This change is necessary for FW logo rendering in the ramstage. fsp_init must be run before FW display starts rendering the logo. BUG=b:471111147 TEST=Check FW logo Change-Id: I41b32229d4c582d84afac5c336eb98b1b1274ba8 Signed-off-by: Yidi Lin <yidilin@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/90686 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@mailbox.org> Reviewed-by: Yu-Ping Wu <yupingso@google.com> Reviewed-by: Chen-Tsung Hsieh <chentsung@google.com>
This commit is contained in:
parent
82f9c593ab
commit
14a7a2315e
1 changed files with 4 additions and 2 deletions
|
|
@ -1,6 +1,7 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
|
||||
#include <bootmem.h>
|
||||
#include <bootstate.h>
|
||||
#include <device/device.h>
|
||||
#include <device/pci.h>
|
||||
#include <soc/booker.h>
|
||||
|
|
@ -56,7 +57,7 @@ static void mte_setup(void)
|
|||
booker_mte_init(mte_start);
|
||||
}
|
||||
|
||||
static void fsp_init(void)
|
||||
static void fsp_init(void *arg)
|
||||
{
|
||||
uint32_t storage_type = mainboard_get_storage_type();
|
||||
|
||||
|
|
@ -67,6 +68,8 @@ static void fsp_init(void)
|
|||
mtk_fsp_load_and_run();
|
||||
}
|
||||
|
||||
BOOT_STATE_INIT_ENTRY(BS_DEV_INIT, BS_ON_ENTRY, fsp_init, NULL);
|
||||
|
||||
static void soc_init(struct device *dev)
|
||||
{
|
||||
mtk_mmu_disable_l2c_sram();
|
||||
|
|
@ -76,7 +79,6 @@ static void soc_init(struct device *dev)
|
|||
if (spm_init())
|
||||
printk(BIOS_ERR, "spm init failed, Suspend may not work\n");
|
||||
|
||||
fsp_init();
|
||||
sspm_init();
|
||||
gpueb_init();
|
||||
mcupm_init();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue