diff --git a/src/mainboard/google/rauru/mainboard.c b/src/mainboard/google/rauru/mainboard.c index d0ed3ad7f7..93489426b8 100644 --- a/src/mainboard/google/rauru/mainboard.c +++ b/src/mainboard/google/rauru/mainboard.c @@ -7,13 +7,11 @@ #include #include #include -#include #include #include #include #include #include -#include #include #include #include @@ -128,12 +126,6 @@ static void mainboard_init(struct device *dev) if (CONFIG(RAURU_SDCARD_INIT)) mtk_msdc_configure_sdcard(); - if (dpm_init()) - printk(BIOS_ERR, "dpm init failed, DVFS may not work\n"); - - if (spm_init()) - printk(BIOS_ERR, "spm init failed, Suspend may not work\n"); - if (CONFIG(ARM64_USE_ARM_TRUSTED_FIRMWARE)) register_reset_to_bl31(GPIO_AP_EC_WARM_RST_REQ.id, true); } diff --git a/src/soc/mediatek/mt8196/soc.c b/src/soc/mediatek/mt8196/soc.c index bacbe0c2c5..24077a0fbc 100644 --- a/src/soc/mediatek/mt8196/soc.c +++ b/src/soc/mediatek/mt8196/soc.c @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include @@ -14,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -54,7 +56,7 @@ static void mte_setup(void) booker_mte_init(mte_start); } -static void soc_init(struct device *dev) +static void fsp_init(void) { uint32_t storage_type = mainboard_get_storage_type(); @@ -63,8 +65,18 @@ static void soc_init(struct device *dev) mtk_fsp_add_param(FSP_PARAM_TYPE_STORAGE, sizeof(storage_type), &storage_type); pi_image_add_mtk_fsp_params(); mtk_fsp_load_and_run(); +} +static void soc_init(struct device *dev) +{ mtk_mmu_disable_l2c_sram(); + + if (dpm_init()) + printk(BIOS_ERR, "dpm init failed, DVFS may not work\n"); + if (spm_init()) + printk(BIOS_ERR, "spm init failed, Suspend may not work\n"); + + fsp_init(); sspm_init(); gpueb_init(); mcupm_init();