public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: shawnguo@kernel.org (Shawn Guo)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 1/2] watchdog: imx2_wdt: add external reset support via 'ext-reset-output' dt prop
Date: Mon, 29 Jun 2015 09:17:37 +0800	[thread overview]
Message-ID: <20150629011737.GG10332@tiger> (raw)
In-Reply-To: <1433448960-9257-2-git-send-email-tharvey@gateworks.com>

On Thu, Jun 04, 2015 at 01:15:59PM -0700, Tim Harvey wrote:
> @@ -90,6 +92,11 @@ static int imx2_restart_handler(struct notifier_block *this, unsigned long mode,
>  	struct imx2_wdt_device *wdev = container_of(this,
>  						    struct imx2_wdt_device,
>  						    restart_handler);
> +
> +	/* Use external reset */
> +	if (wdev->ext_reset)
> +		wcr_enable |= IMX2_WDT_WCR_SRS;
> +

The existing code simply writes the register with only WDE (Watchdog
Enable) bit set.  That said, bit WDA and SRS are cleared at the same
time.  What's the result of that?  Both internal reset and external
reset will be asserted?  If this is the case, it's unsafe per your reply
to Frank's comment, right?  So we should only clear one bit between
these two based on ext_reset flag to avoid asserting both internal and
external reset?

Shawn

>  	/* Assert SRS signal */
>  	regmap_write(wdev->regmap, 0, wcr_enable);
>  	/*

  parent reply	other threads:[~2015-06-29  1:17 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-28 22:54 [PATCH 0/2] imx6: Implement external watchdog reset Tim Harvey
2015-05-28 22:54 ` [PATCH 1/2] watchdog: imx2_wdt: add external reset support via 'ext-reset' dt property Tim Harvey
2015-05-29 16:37   ` Lucas Stach
2015-05-28 22:54 ` [PATCH 2/2] ARM: dts: ventana: Add ext-reset support Tim Harvey
2015-05-29  6:17   ` Markus Pargmann
2015-05-29 14:01     ` Tim Harvey
2015-06-04 20:15 ` [PATCH v2 0/2] imx6: Implement external watchdog reset Tim Harvey
2015-06-04 20:15   ` [PATCH v2 1/2] watchdog: imx2_wdt: add external reset support via 'ext-reset-output' dt prop Tim Harvey
2015-06-05 16:38     ` Zhi Li
2015-06-25 23:22       ` Tim Harvey
2015-06-22  9:22     ` Lucas Stach
2015-06-28 15:07     ` Shawn Guo
2015-06-29  1:17     ` Shawn Guo [this message]
2015-07-02 16:49       ` Tim Harvey
2015-07-03  1:02         ` Shawn Guo
2015-07-28 15:27     ` [PATCH v3 0/2] imx6: Implement external watchdog reset Tim Harvey
2015-07-28 15:27       ` [PATCH v3 1/2] watchdog: imx2_wdt: add external reset support via 'ext-reset-output' dt prop Tim Harvey
2015-08-05 13:01         ` Shawn Guo
2015-10-13 14:11         ` Tim Harvey
2015-07-28 15:27       ` [PATCH v3 2/2] ARM: dts: ventana: Add ext-reset support Tim Harvey
2015-10-30 17:00       ` [PATCH v3 0/2] imx6: Implement external watchdog reset Akshay Bhat
2015-10-30 17:31         ` Tim Harvey
2015-06-04 20:16   ` [PATCH v2 2/2] ARM: dts: ventana: Add ext-reset support Tim Harvey

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=20150629011737.GG10332@tiger \
    --to=shawnguo@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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