soc/mediatek/mt8196: Move DPM and SPM initialization
Move dpm_init() and spm_init() from mainboard_init() in rauru to soc_init() in mt8196. This centralizes the power management initialization within the SoC-specific code. BUG=none TEST=Build pass, boot ok. Change-Id: Ic2914fd0fc85032c96ce076416e9b9c46fe19e0d Signed-off-by: Yidi Lin <yidilin@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/90550 Reviewed-by: Yu-Ping Wu <yupingso@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Chen-Tsung Hsieh <chentsung@google.com>
This commit is contained in:
parent
206025754f
commit
ba5b5ea406
2 changed files with 13 additions and 9 deletions
|
|
@ -7,13 +7,11 @@
|
|||
#include <soc/addressmap.h>
|
||||
#include <soc/bl31.h>
|
||||
#include <soc/display.h>
|
||||
#include <soc/dpm_v2.h>
|
||||
#include <soc/gpio_common.h>
|
||||
#include <soc/i2c.h>
|
||||
#include <soc/msdc.h>
|
||||
#include <soc/mt6373.h>
|
||||
#include <soc/pcie.h>
|
||||
#include <soc/spm_common.h>
|
||||
#include <soc/storage.h>
|
||||
#include <soc/usb.h>
|
||||
#include <variants.h>
|
||||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
#include <device/pci.h>
|
||||
#include <soc/booker.h>
|
||||
#include <soc/dcc.h>
|
||||
#include <soc/dpm_v2.h>
|
||||
#include <soc/dramc_info.h>
|
||||
#include <soc/emi.h>
|
||||
#include <soc/gpueb.h>
|
||||
|
|
@ -14,6 +15,7 @@
|
|||
#include <soc/mtk_fsp.h>
|
||||
#include <soc/pcie.h>
|
||||
#include <soc/pi_image.h>
|
||||
#include <soc/spm.h>
|
||||
#include <soc/sspm.h>
|
||||
#include <soc/storage.h>
|
||||
#include <soc/symbols.h>
|
||||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue