summaryrefslogtreecommitdiff
path: root/src/mainboard/google/kukui
diff options
context:
space:
mode:
authorTristan Shieh <tristan.shieh@mediatek.com>2018-06-19 16:07:54 +0800
committerPatrick Georgi <pgeorgi@google.com>2018-07-11 10:46:25 +0000
commitbb684e0c8d636b0f9753ddf6237880543a365f48 (patch)
tree24ab6309637b50861a2e83837cc502e596853ada /src/mainboard/google/kukui
parent0eb92dfbc7ceeec6af0e5f0e2ace6c389541838f (diff)
google/kukui: Update MMU table in romstage and ramstage
In order to get better performance, map dram as cached after dram ready in romstage. BUG=b:80501386 BRANCH=none TEST=Boots correctly on Kukui. Need a futher check after dram calibration code ready. Change-Id: Ie541fe08ee1d5b260abbabc0a5c18fb04e602b9c Signed-off-by: Tristan Shieh <tristan.shieh@mediatek.com> Reviewed-on: https://review.coreboot.org/27304 Reviewed-by: Julius Werner <jwerner@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/mainboard/google/kukui')
-rw-r--r--src/mainboard/google/kukui/Makefile.inc1
-rw-r--r--src/mainboard/google/kukui/mainboard.c31
-rw-r--r--src/mainboard/google/kukui/romstage.c3
3 files changed, 35 insertions, 0 deletions
diff --git a/src/mainboard/google/kukui/Makefile.inc b/src/mainboard/google/kukui/Makefile.inc
index 44a60b558d..2a68de05a9 100644
--- a/src/mainboard/google/kukui/Makefile.inc
+++ b/src/mainboard/google/kukui/Makefile.inc
@@ -8,4 +8,5 @@ romstage-y += memlayout.ld
romstage-y += romstage.c
ramstage-y += chromeos.c
+ramstage-y += mainboard.c
ramstage-y += memlayout.ld
diff --git a/src/mainboard/google/kukui/mainboard.c b/src/mainboard/google/kukui/mainboard.c
new file mode 100644
index 0000000000..212ae807de
--- /dev/null
+++ b/src/mainboard/google/kukui/mainboard.c
@@ -0,0 +1,31 @@
+/*
+ * 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 <device/device.h>
+#include <soc/mmu_operations.h>
+
+static void mainboard_init(struct device *dev)
+{
+}
+
+static void mainboard_enable(struct device *dev)
+{
+ dev->ops->init = &mainboard_init;
+}
+
+struct chip_operations mainboard_ops = {
+ .name = CONFIG_MAINBOARD_PART_NUMBER,
+ .enable_dev = mainboard_enable,
+};
diff --git a/src/mainboard/google/kukui/romstage.c b/src/mainboard/google/kukui/romstage.c
index d63b7c888d..342a0ba3d2 100644
--- a/src/mainboard/google/kukui/romstage.c
+++ b/src/mainboard/google/kukui/romstage.c
@@ -16,6 +16,7 @@
#include <arch/exception.h>
#include <console/console.h>
#include <program_loading.h>
+#include <soc/mmu_operations.h>
#include <timestamp.h>
void main(void)
@@ -26,5 +27,7 @@ void main(void)
console_init();
exception_init();
+ mtk_mmu_after_dram();
+
run_ramstage();
}