linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Xiantao Hu <xt.hu@cqplus1.com>
Cc: wim@linux-watchdog.org, p.zabel@pengutronix.de,
	linux-kernel@vger.kernel.org, linux-watchdog@vger.kernel.org,
	robh+dt@kernel.org, devicetree@vger.kernel.org,
	wells.lu@sunplus.com, qinjian@cqplus1.com
Subject: Re: [PATCH v2 1/2] watchdog: Add watchdog driver for Sunplus SP7021
Date: Wed, 24 Nov 2021 06:25:22 -0800	[thread overview]
Message-ID: <20211124142522.GA3939252@roeck-us.net> (raw)
In-Reply-To: <20211124104149.361019-2-xt.hu@cqplus1.com>

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

  reply	other threads:[~2021-11-24 14:46 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-12 10:59 [PATCH 0/2] Add watchdog driver for Sunplus SP7021 SoC Xiantao Hu
2021-11-12 10:59 ` [PATCH 1/2] watchdog: Add watchdog driver for Sunplus SP7021 Xiantao Hu
2021-11-12 14:45   ` Guenter Roeck
2021-11-24 10:31     ` xt.hu[胡先韬]
2021-11-21  0:33   ` kernel test robot
2021-11-12 10:59 ` [PATCH 2/2] dt-bindings: watchdog: Add Sunplus SP7021 WDT devicetree bindings documentation Xiantao Hu
2021-11-24 10:41 ` [PATCH v2 0/2] Add watchdog driver for Sunplus SP7021 SoC Xiantao Hu
2021-11-24 10:41   ` [PATCH v2 1/2] watchdog: Add watchdog driver for Sunplus SP7021 Xiantao Hu
2021-11-24 14:25     ` Guenter Roeck [this message]
2021-11-25  2:42       ` xt.hu[胡先韬]
2021-11-25  4:25         ` Guenter Roeck
2021-11-29  7:57           ` xt.hu[胡先韬]
2021-12-03 21:39             ` Guenter Roeck
2021-11-24 10:41   ` [PATCH v2 2/2] dt-bindings: watchdog: Add Sunplus SP7021 WDT devicetree bindings documentation Xiantao Hu
2021-11-30 22:38     ` Rob Herring
2021-11-24 14:17   ` [PATCH v2 0/2] Add watchdog driver for Sunplus SP7021 SoC Guenter Roeck
2021-11-25  2:52     ` xt.hu[胡先韬]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211124142522.GA3939252@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=qinjian@cqplus1.com \
    --cc=robh+dt@kernel.org \
    --cc=wells.lu@sunplus.com \
    --cc=wim@linux-watchdog.org \
    --cc=xt.hu@cqplus1.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).