Thread (17 messages) 17 messages, 4 authors, 2021-12-03

Re: [PATCH v2 1/2] watchdog: Add watchdog driver for Sunplus SP7021

From: Guenter Roeck <linux@roeck-us.net>
Date: 2021-11-24 14:46:03
Also in: linux-watchdog, lkml

On Wed, Nov 24, 2021 at 06:41:48PM +0800, Xiantao Hu wrote:
Sunplus SP7021 requires watchdog timer support.
Add watchdog driver to enable this.

Signed-off-by: Xiantao Hu <xt.hu@cqplus1.com>
---
+
+	priv->base = devm_platform_ioremap_resource(pdev, 0);
+	if (IS_ERR(priv->base))
+		return PTR_ERR(priv->base);
+
+	/* The registers accessed here shared by multiple drivers. */
+	wdt_res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
This is unusual. Why would other drivers access WDT_CTRL and WDT_CNT
registers, and how is it ensured that the other drivers do not interfer
with the accesses by this driver ?

Normally such a resource would be shared through a parent driver with
appropriate access functions to ensure that accesses are synchronized.

Thanks,
Guenter
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help