Skip to contentSkip to conversation

watchdog: add watchdog driver for MediaTek MT7620 SoC

PATCH New Weijie Gao 2 participants 3 messages Oct 16, 2020 – Oct 19, 2020

Subsystems (2)
lore
Share & tools
lore

Weijie Gao

author
#0 lore raw

PATCH 12/18 watchdog: add watchdog driver for MediaTek MT7620 SoC

This patch adds watchdog support for the Mediatek MT7620 SoC

---
 drivers/watchdog/Kconfig      |   7 ++
 drivers/watchdog/Makefile     |   1 +
 drivers/watchdog/mt7620_wdt.c | 119 ++++++++++++++++++++++++++++++++++
 3 files changed, 127 insertions(+)
 create mode 100644 drivers/watchdog/mt7620_wdt.c
drivers/watchdog/Kconfig +7 -0
index 210d9f8093..35d078caa0 100644
@@ -124,6 +124,13 @@ config WDT_MPC8xx
 	help
 	  Select this to enable mpc8xx watchdog timer
 
+config WDT_MT7620
+	bool "MediaTek MT7620 watchdog timer support"
+	depends on WDT && SOC_MT7620
+	help
+	  Select this to enable watchdog timer on MediaTek MT7620 and earlier
+	  SoC chips.
+
 config WDT_MT7621
 	bool "MediaTek MT7621 watchdog timer support"
 	depends on WDT && SOC_MT7628
drivers/watchdog/Makefile +1 -0
index 01b8231f2b..825b50e626 100644
@@ -24,6 +24,7 @@ obj-$(CONFIG_WDT_CORTINA) += cortina_wdt.o
 obj-$(CONFIG_WDT_ORION) += orion_wdt.o
 obj-$(CONFIG_WDT_CDNS) += cdns_wdt.o
 obj-$(CONFIG_WDT_MPC8xx) += mpc8xx_wdt.o
+obj-$(CONFIG_WDT_MT7620) += mt7620_wdt.o
 obj-$(CONFIG_WDT_MT7621) += mt7621_wdt.o
 obj-$(CONFIG_WDT_MTK) += mtk_wdt.o
 obj-$(CONFIG_WDT_OCTEONTX) += octeontx_wdt.o
drivers/watchdog/mt7620_wdt.c new file +119 -0

119 lines not on this page · raw message

Signature · 1 line
2.17.1
#1 lore raw

PATCH 12/18 watchdog: add watchdog driver for MediaTek MT7620 SoC

On 2020/10/16 Fri 15:36, Weijie Gao <[email protected]> wrote

Quoted 36 lines

-----Original Message-----
From: Weijie Gao <[email protected]>
Sent: 2020?10?16? 15:36
To: u-boot at lists.denx.de
Cc: GSS_MTK_Uboot_upstream <[email protected]>; Daniel Schwierzeck <[email protected]>; Stefan Roese <[email protected]>; Stefan Roese <[email protected]>; Stefan Roese <[email protected]>; Christophe Leroy <[email protected]>; Marek Vasut <[email protected]>; Jagan Teki <[email protected]>; Suneel Garapati <[email protected]>; Michal Simek <[email protected]>; Philippe Reynes <[email protected]>; Ashok Reddy Soma <[email protected]>; Qiang Zhao <[email protected]>; Jason Li <[email protected]>; Alex Nemirovsky <[email protected]>; Jan Kiszka <[email protected]>; Weijie Gao <[email protected]>
Subject: [PATCH 12/18] watchdog: add watchdog driver for MediaTek MT7620 SoC

This patch adds watchdog support for the Mediatek MT7620 SoC

---
 drivers/watchdog/Kconfig      |   7 ++
 drivers/watchdog/Makefile     |   1 +
 drivers/watchdog/mt7620_wdt.c | 119
++++++++++++++++++++++++++++++++++
 3 files changed, 127 insertions(+)
 create mode 100644 drivers/watchdog/mt7620_wdt.c
drivers/watchdog/mt7620_wdt.c new file +3 -0
@@ -0,0 +1,119 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2020 MediaTek Inc.

drivers/watchdog/mt7620_wdt.c line 13

Quoted 10 lines
drivers/watchdog/mt7620_wdt.c new file +10 -0
+ *
+ * Author:  Weijie Gao <[email protected]>
+ *
+ * Watchdog timer for MT7620 and earlier SoCs  */
+
+
+static const struct wdt_ops mt7620_wdt_ops = {
+	.start = mt7620_wdt_start,
+	.reset = mt7620_wdt_reset,
+	.stop = mt7620_wdt_stop,

You'd better add expire_now function.

Best Regards
Qiang Zhao

author
#2 lore raw

PATCH 12/18 watchdog: add watchdog driver for MediaTek MT7620 SoC

Quoted 43 lines · Qiang Zhao

On 2020/10/16 Fri 15:36, Weijie Gao <[email protected]> wrote

Quoted 40 lines

-----Original Message-----
From: Weijie Gao <[email protected]>
Sent: 2020?10?16? 15:36
To: u-boot at lists.denx.de
Cc: GSS_MTK_Uboot_upstream <[email protected]>; Daniel Schwierzeck <[email protected]>; Stefan Roese <[email protected]>; Stefan Roese <[email protected]>; Stefan Roese <[email protected]>; Christophe Leroy <[email protected]>; Marek Vasut <[email protected]>; Jagan Teki <[email protected]>; Suneel Garapati <[email protected]>; Michal Simek <[email protected]>; Philippe Reynes <[email protected]>; Ashok Reddy Soma <[email protected]>; Qiang Zhao <[email protected]>; Jason Li <[email protected]>; Alex Nemirovsky <[email protected]>; Jan Kiszka <[email protected]>; Weijie Gao <[email protected]>
Subject: [PATCH 12/18] watchdog: add watchdog driver for MediaTek MT7620 SoC

This patch adds watchdog support for the Mediatek MT7620 SoC

---
 drivers/watchdog/Kconfig      |   7 ++
 drivers/watchdog/Makefile     |   1 +
 drivers/watchdog/mt7620_wdt.c | 119
++++++++++++++++++++++++++++++++++
 3 files changed, 127 insertions(+)
 create mode 100644 drivers/watchdog/mt7620_wdt.c
drivers/watchdog/mt7620_wdt.c new file +7 -0
@@ -0,0 +1,119 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2020 MediaTek Inc.
+ *
+ * Author:  Weijie Gao <[email protected]>
+ *
+ * Watchdog timer for MT7620 and earlier SoCs  */
Quoted 8 lines

drivers/watchdog/mt7620_wdt.c line 104

Quoted 6 lines
drivers/watchdog/mt7620_wdt.c new file +6 -0
+
+
+static const struct wdt_ops mt7620_wdt_ops = {
+	.start = mt7620_wdt_start,
+	.reset = mt7620_wdt_reset,
+	.stop = mt7620_wdt_stop,

You'd better add expire_now function.

ok. I'll add it.

Quoted 3 lines

Best Regards
Qiang Zhao