summaryrefslogtreecommitdiffstats
path: root/src/soc/mediatek/mt8183/memory.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/mediatek/mt8183/memory.c')
-rw-r--r--src/soc/mediatek/mt8183/memory.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/soc/mediatek/mt8183/memory.c b/src/soc/mediatek/mt8183/memory.c
index c2ddb999de78..19f732609fc5 100644
--- a/src/soc/mediatek/mt8183/memory.c
+++ b/src/soc/mediatek/mt8183/memory.c
@@ -137,7 +137,6 @@ static void init_sdram_params(struct sdram_params *dst,
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 @@ void mt_mem_init(struct dramc_param_ops *dparam_ops)
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 @@ void mt_mem_init(struct dramc_param_ops *dparam_ops)
"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();
}