summaryrefslogtreecommitdiff
path: root/src/soc/mediatek/mt8183/emi.c
diff options
context:
space:
mode:
authorYu-Ping Wu <yupingso@chromium.org>2019-10-07 16:57:24 +0800
committerPatrick Georgi <pgeorgi@google.com>2019-10-09 22:24:00 +0000
commit0e5b196cb6f03eba70756d246d86c25270f7b4f2 (patch)
treec5c15a3d3406298b8e0b4f09fb64077a2e447599 /src/soc/mediatek/mt8183/emi.c
parent078332e4d82a9a2edfa4e3fbcdc8b0b78356f989 (diff)
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>
Diffstat (limited to 'src/soc/mediatek/mt8183/emi.c')
-rw-r--r--src/soc/mediatek/mt8183/emi.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/soc/mediatek/mt8183/emi.c b/src/soc/mediatek/mt8183/emi.c
index 3b5b2a7631..52baeb1688 100644
--- a/src/soc/mediatek/mt8183/emi.c
+++ b/src/soc/mediatek/mt8183/emi.c
@@ -14,10 +14,11 @@
*/
#include <device/mmio.h>
-#include <soc/emi.h>
-#include <soc/infracfg.h>
+#include <soc/dramc_param.h>
#include <soc/dramc_pi_api.h>
#include <soc/dramc_register.h>
+#include <soc/emi.h>
+#include <soc/infracfg.h>
static const u8 freq_shuffle[DRAM_DFS_SHUFFLE_MAX] = {
[DRAM_DFS_SHUFFLE_1] = LP4X_DDR3200,
@@ -355,7 +356,7 @@ static void after_calib(void)
dramc_runtime_config();
}
-void mt_set_emi(const struct sdram_params *freq_params)
+void mt_set_emi(const struct dramc_param *dparam)
{
const u8 *freq_tbl;
const int shuffle = DRAM_DFS_SHUFFLE_1;
@@ -368,7 +369,7 @@ void mt_set_emi(const struct sdram_params *freq_params)
freq_tbl = freq_shuffle;
current_freqsel = freq_tbl[shuffle];
- params = &freq_params[shuffle];
+ params = &dparam->freq_params[shuffle];
init_dram(params, current_freqsel);
do_calib(params, current_freqsel);