soc/mediatek/mt8183: Change argument type of mt_set_emi
Since struct dramc_param has been defined, we can pass the struct
directly from mt_mem_init().
BUG=b:139099592
BRANCH=none
TEST=emerge-kukui coreboot
Change-Id: If7333fb579eff76dd9d1c2bf6fdfe7eccb22050f
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/35846
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
diff --git a/src/soc/mediatek/mt8183/memory.c b/src/soc/mediatek/mt8183/memory.c
index c2ddb99..19f7326 100644
--- a/src/soc/mediatek/mt8183/memory.c
+++ b/src/soc/mediatek/mt8183/memory.c
@@ -137,7 +137,6 @@
void mt_mem_init(struct dramc_param_ops *dparam_ops)
{
struct dramc_param *dparam = dparam_ops->param;
- struct sdram_params *freq_params = dparam->freq_params;
u16 config = 0;
if (CONFIG(MT8183_DRAM_EMCP))
@@ -148,7 +147,7 @@
if (dram_run_fast_calibration(dparam, config) == 0) {
printk(BIOS_INFO,
"DRAM calibraion params loaded from flash\n");
- mt_set_emi(freq_params);
+ mt_set_emi(dparam);
mt_mem_test();
return;
}
@@ -174,7 +173,7 @@
"falling back to load default sdram param\n", err);
/* Init params from sdram configs and run partial calibration */
- init_sdram_params(freq_params, get_sdram_config());
- mt_set_emi(freq_params);
+ init_sdram_params(dparam->freq_params, get_sdram_config());
+ mt_set_emi(dparam);
mt_mem_test();
}