linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Fengquan Chen <Fengquan.Chen@mediatek.com>,
	Wim Van Sebroeck <wim@linux-watchdog.org>,
	Rob Herring <robh+dt@kernel.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org
Cc: tinghan.shen@mediatek.com, randy.wu@mediatek.com,
	rex-bc.chen@mediatek.com, christine.zhu@mediatek.com,
	joe.yang@mediatek.com, zhishuang.zhang@mediatek.com
Subject: Re: [v2,1/2] watchdog: mtk: add disable_wdt_extrst support
Date: Fri, 3 Sep 2021 07:05:01 -0700	[thread overview]
Message-ID: <65cc931f-ba49-19b5-ce25-c49f7b984cec@roeck-us.net> (raw)
In-Reply-To: <20210903061623.10715-2-Fengquan.Chen@mediatek.com>

On 9/2/21 11:16 PM, Fengquan Chen wrote:
> In some cases, we may need watchdog just to trigger an
> internal soc reset without sending any output signal.
> 
> Provide a disable_wdt_extrst parameter for configuration.
> We can disable or enable it just by configuring dts.
> 
> Signed-off-by: fengquan.chen <fengquan.chen@mediatek.com>

Nit: You should set up git such that it uses "Fengquan Chen", not
"fengquan.chen".

Other than that, for my reference,

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

We'll have to wait for dt property approval before we can apply the patch.

Thanks,
Guenter

> ---
>   drivers/watchdog/mtk_wdt.c | 7 +++++++
>   1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/watchdog/mtk_wdt.c b/drivers/watchdog/mtk_wdt.c
> index 97ca993bd009..276b6cb7d225 100644
> --- a/drivers/watchdog/mtk_wdt.c
> +++ b/drivers/watchdog/mtk_wdt.c
> @@ -63,6 +63,7 @@ struct mtk_wdt_dev {
>   	void __iomem *wdt_base;
>   	spinlock_t lock; /* protects WDT_SWSYSRST reg */
>   	struct reset_controller_dev rcdev;
> +	bool disable_wdt_extrst;
>   };
>   
>   struct mtk_wdt_data {
> @@ -240,6 +241,8 @@ static int mtk_wdt_start(struct watchdog_device *wdt_dev)
>   
>   	reg = ioread32(wdt_base + WDT_MODE);
>   	reg &= ~(WDT_MODE_IRQ_EN | WDT_MODE_DUAL_EN);
> +	if (mtk_wdt->disable_wdt_extrst)
> +		reg &= ~WDT_MODE_EXRST_EN;
>   	reg |= (WDT_MODE_EN | WDT_MODE_KEY);
>   	iowrite32(reg, wdt_base + WDT_MODE);
>   
> @@ -309,6 +312,10 @@ static int mtk_wdt_probe(struct platform_device *pdev)
>   		if (err)
>   			return err;
>   	}
> +
> +	mtk_wdt->disable_wdt_extrst =
> +		of_property_read_bool(dev->of_node, "mediatek,disable-extrst");
> +
>   	return 0;
>   }
>   
> 


  reply	other threads:[~2021-09-03 14:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-03  6:16 [v2,0/2] update mediatek wdt driver and dt-binding Fengquan Chen
2021-09-03  6:16 ` [v2,1/2] watchdog: mtk: add disable_wdt_extrst support Fengquan Chen
2021-09-03 14:05   ` Guenter Roeck [this message]
2021-09-14 12:51     ` Fengquan Chen
2021-09-03  6:16 ` [v2,2/2] dt-bindings: watchdog: mtk-wdt: " Fengquan Chen
2021-09-07 19:28   ` Rob Herring

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=65cc931f-ba49-19b5-ce25-c49f7b984cec@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=Fengquan.Chen@mediatek.com \
    --cc=christine.zhu@mediatek.com \
    --cc=devicetree@vger.kernel.org \
    --cc=joe.yang@mediatek.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=matthias.bgg@gmail.com \
    --cc=randy.wu@mediatek.com \
    --cc=rex-bc.chen@mediatek.com \
    --cc=robh+dt@kernel.org \
    --cc=tinghan.shen@mediatek.com \
    --cc=wim@linux-watchdog.org \
    --cc=zhishuang.zhang@mediatek.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).