Yu-Ping Wu has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/35555 )
Change subject: mediatek/mt8183: Save DRAM calibration result to shuffle for DVFS switch ......................................................................
Patch Set 7:
(1 comment)
https://review.coreboot.org/c/coreboot/+/35555/7/src/soc/mediatek/mt8183/emi... File src/soc/mediatek/mt8183/emi.c:
https://review.coreboot.org/c/coreboot/+/35555/7/src/soc/mediatek/mt8183/emi... PS7, Line 345: emi_init2(params); In the current implementation, dfs_init_for_calibration() will be called 3 times (for 3 frequencies) and emi_init2() will be called only once in the following order:
dfs_init_for_calibration(params, SHUFFLE3); emi_init2(params); dfs_init_for_calibration(params, SHUFFLE2); dfs_init_for_calibration(params, SHUFFLE1);
I'm wondering if we could change the order of dfs_init_for_calibration() and emi_init2(). If the answer is yes, then we could move dfs_init_for_calibration() out of init_dram() so that mt_set_emi() could be simplified:
init_dram(params);
dram_dual_freq_calibration(freq_params, DRAM_DFS_SHUFFLE_3)
if (CONFIG(MT8183_DRAM_DUAL_FREQ_K)) { dramc_save_result_to_shuffle(DRAM_DFS_SHUFFLE_1, DRAM_DFS_SHUFFLE_3); dram_dual_freq_calibration(freq_params, DRAM_DFS_SHUFFLE_2); dramc_save_result_to_shuffle(DRAM_DFS_SHUFFLE_1, DRAM_DFS_SHUFFLE_2); dram_dual_freq_calibration(freq_params, DRAM_DFS_SHUFFLE_1); }