[coreboot-gerrit] Change in coreboot[master]: mediatek/mt8183: Using common watchdog timer code in mt8183

Tristan Hsieh (Code Review) gerrit at coreboot.org
Tue Jun 12 11:14:57 CEST 2018


Tristan Hsieh has uploaded this change for review. ( https://review.coreboot.org/27026


Change subject: mediatek/mt8183: Using common watchdog timer code in mt8183
......................................................................

mediatek/mt8183: Using common watchdog timer code in mt8183

BUG=b:80501386
BRANCH=none
TEST=the refactored code works fine on the new platform (with the rest
     of the patches applied) and Elm platform

Change-Id: I4be3a133dbb8a64604133cefb0c5f02d01afd0d4
Signed-off-by: Tristan Shieh <tristan.shieh at mediatek.com>
---
M src/soc/mediatek/mt8183/Makefile.inc
A src/soc/mediatek/mt8183/bootblock.c
M src/soc/mediatek/mt8183/include/soc/addressmap.h
3 files changed, 25 insertions(+), 0 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/26/27026/1

diff --git a/src/soc/mediatek/mt8183/Makefile.inc b/src/soc/mediatek/mt8183/Makefile.inc
index 9f80500..59c6166 100644
--- a/src/soc/mediatek/mt8183/Makefile.inc
+++ b/src/soc/mediatek/mt8183/Makefile.inc
@@ -1,11 +1,13 @@
 ifeq ($(CONFIG_SOC_MEDIATEK_MT8183),y)
 
+bootblock-y += bootblock.c
 bootblock-$(CONFIG_SPI_FLASH) += flash_controller.c
 bootblock-$(CONFIG_SPI_FLASH) += spi.c
 bootblock-y += ../common/timer.c
 ifeq ($(CONFIG_BOOTBLOCK_CONSOLE),y)
 bootblock-$(CONFIG_DRIVERS_UART) += ../common/uart.c
 endif
+bootblock-y += ../common/wdt.c
 
 verstage-$(CONFIG_SPI_FLASH) += flash_controller.c
 verstage-$(CONFIG_SPI_FLASH) += spi.c
diff --git a/src/soc/mediatek/mt8183/bootblock.c b/src/soc/mediatek/mt8183/bootblock.c
new file mode 100644
index 0000000..4eca0f1
--- /dev/null
+++ b/src/soc/mediatek/mt8183/bootblock.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 <bootblock_common.h>
+#include <soc/wdt.h>
+
+void bootblock_soc_init(void)
+{
+	mtk_wdt_init();
+}
diff --git a/src/soc/mediatek/mt8183/include/soc/addressmap.h b/src/soc/mediatek/mt8183/include/soc/addressmap.h
index 59f4acf..bbb4094 100644
--- a/src/soc/mediatek/mt8183/include/soc/addressmap.h
+++ b/src/soc/mediatek/mt8183/include/soc/addressmap.h
@@ -22,6 +22,7 @@
 };
 
 enum {
+	RGU_BASE	= IO_PHYS + 0x00007000,
 	GPT_BASE	= IO_PHYS + 0x00008000,
 	UART0_BASE	= IO_PHYS + 0x01002000,
 };

-- 
To view, visit https://review.coreboot.org/27026
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4be3a133dbb8a64604133cefb0c5f02d01afd0d4
Gerrit-Change-Number: 27026
Gerrit-PatchSet: 1
Gerrit-Owner: Tristan Hsieh <tristan.shieh at mediatek.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180612/b7251d1b/attachment.html>


More information about the coreboot-gerrit mailing list