summaryrefslogtreecommitdiffstats
path: root/src/soc/mediatek/mt8183/memory.c
diff options
context:
space:
mode:
authorHuayang Duan <huayang.duan@mediatek.com>2018-09-26 14:24:02 +0800
committerPatrick Georgi <pgeorgi@google.com>2018-10-18 15:01:02 +0000
commitc2ef1029fabfccbdd3e86c5f659f83109313c9f9 (patch)
tree0d1208ef6a4074b0ea1bf773b1abac6627a2c290 /src/soc/mediatek/mt8183/memory.c
parent91a580308ced877813a1a38c1ec1d16e0d397887 (diff)
downloadcoreboot-c2ef1029fabfccbdd3e86c5f659f83109313c9f9.tar.gz
coreboot-c2ef1029fabfccbdd3e86c5f659f83109313c9f9.tar.bz2
coreboot-c2ef1029fabfccbdd3e86c5f659f83109313c9f9.zip
mediatek/mt8183: Add EMI init for DDR driver init
Add EMI config to initialize memory. BRANCH=none TEST=Boots correctly on Kukui, and inits DRAM successfully with related patches. Signed-off-by: Huayang Duan <huayang.duan@mediatek.com> Change-Id: I945181aa1c901fe78ec1f4478a928c600c1b1dea Reviewed-on: https://review.coreboot.org/28835 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Diffstat (limited to 'src/soc/mediatek/mt8183/memory.c')
-rw-r--r--src/soc/mediatek/mt8183/memory.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/soc/mediatek/mt8183/memory.c b/src/soc/mediatek/mt8183/memory.c
new file mode 100644
index 000000000000..643ca6bb2f88
--- /dev/null
+++ b/src/soc/mediatek/mt8183/memory.c
@@ -0,0 +1,22 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2018 MediaTek Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#include <soc/emi.h>
+
+void mt_mem_init(const struct sdram_params *params)
+{
+ /* memory calibration */
+ mt_set_emi(params);
+}