1
0
Fork 0
mirror of https://github.com/CTCaer/hekate.git synced 2024-11-10 04:21:45 +00:00

hos/mtc: Add FSP WAR and boost HOS booting times

By implementing FSP WAR we can allow HOS to boot in 1600MHz and be able to switch frequency without hanging.
This commit is contained in:
CTCaer 2019-12-04 21:59:58 +02:00
parent 84328aa676
commit 641a57a4f6
4 changed files with 12 additions and 4 deletions

View file

@ -745,7 +745,7 @@ int hos_launch(ini_sec_t *cfg)
// Flush cache and disable MMU.
bpmp_mmu_disable();
bpmp_clk_rate_set(BPMP_CLK_NORMAL);
minerva_change_freq(FREQ_800);
minerva_change_freq(FREQ_1600);
// emuMMC: Some cards (Sandisk U1), do not like a fast power cycle. Wait min 100ms.
sdmmc_storage_init_wait_sd();

View file

@ -1265,7 +1265,6 @@ void ipl_main()
// Train DRAM and switch to max frequency.
minerva_init();
minerva_change_freq(FREQ_1600);
display_init();

View file

@ -80,6 +80,15 @@ void minerva_init()
minerva_cfg(mtc_cfg, NULL);
mtc_cfg->rate_to = 1600000;
minerva_cfg(mtc_cfg, NULL);
// FSP WAR.
mtc_cfg->train_mode = OP_SWITCH;
mtc_cfg->rate_to = 800000;
minerva_cfg(mtc_cfg, NULL);
// Switch to max.
mtc_cfg->rate_to = 1600000;
minerva_cfg(mtc_cfg, NULL);
}
void minerva_change_freq(minerva_freq_t freq)
@ -102,7 +111,7 @@ void minerva_periodic_training()
return;
mtc_config_t *mtc_cfg = (mtc_config_t *)&nyx_str->mtc_cfg;
if (minerva_cfg && mtc_cfg->rate_from == FREQ_1600)
if (mtc_cfg->rate_from == FREQ_1600)
{
mtc_cfg->train_mode = OP_PERIODIC_TRAIN;
minerva_cfg(mtc_cfg, NULL);

View file

@ -374,8 +374,8 @@ void nyx_init_load_res()
sd_mount();
// Train DRAM and switch to max frequency.
minerva_init();
minerva_change_freq(FREQ_1600);
load_saved_configuration();