diff mbox series

[U-Boot] watchdog: omap_wdt: Fix WDT target reset when booted from emmc

Message ID 1568621357-857-1-git-send-email-sunil.m@techveda.org
State Accepted
Commit 1e3966394a96fbf6128a875d135e074656d1bd64
Delegated to: Tom Rini
Headers show
Series [U-Boot] watchdog: omap_wdt: Fix WDT target reset when booted from emmc | expand

Commit Message

Suniel Mahesh Sept. 16, 2019, 8:09 a.m. UTC
From: Suniel Mahesh <sunil.m@techveda.org>

AM335X based beaglebone black target gets reset by DM converted watchdog
if booted from emmc around 60sec. Fixed this by moving driver's private struct
variable initialization at different places in the driver to driver's probe.
Tested on Beaglebone Black.

Cc: Grygorii Strashko <grygorii.strashko@ti.com>
Fixes: 7659ea32 ("watchdog: omap_wdt: Convert watchdog driver to use DT and DM")
Reported-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Suniel Mahesh <sunil.m@techveda.org>
---
 drivers/watchdog/omap_wdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Grygorii Strashko Sept. 16, 2019, 8:45 a.m. UTC | #1
On 16/09/2019 11:09, sunil.m@techveda.org wrote:
> From: Suniel Mahesh <sunil.m@techveda.org>
> 
> AM335X based beaglebone black target gets reset by DM converted watchdog
> if booted from emmc around 60sec. Fixed this by moving driver's private struct
> variable initialization at different places in the driver to driver's probe.
> Tested on Beaglebone Black.
> 
> Cc: Grygorii Strashko <grygorii.strashko@ti.com>
> Fixes: 7659ea32 ("watchdog: omap_wdt: Convert watchdog driver to use DT and DM")
> Reported-by: Sam Protsenko <semen.protsenko@linaro.org>
> Signed-off-by: Suniel Mahesh <sunil.m@techveda.org>
> ---
>   drivers/watchdog/omap_wdt.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 

Acked-by: Grygorii Strashko <grygorii.strashko@ti.com>
Sam Protsenko Sept. 16, 2019, 11:24 a.m. UTC | #2
On Mon, Sep 16, 2019 at 11:09 AM <sunil.m@techveda.org> wrote:
>
> From: Suniel Mahesh <sunil.m@techveda.org>
>
> AM335X based beaglebone black target gets reset by DM converted watchdog
> if booted from emmc around 60sec. Fixed this by moving driver's private struct
> variable initialization at different places in the driver to driver's probe.
> Tested on Beaglebone Black.
>
> Cc: Grygorii Strashko <grygorii.strashko@ti.com>
> Fixes: 7659ea32 ("watchdog: omap_wdt: Convert watchdog driver to use DT and DM")
> Reported-by: Sam Protsenko <semen.protsenko@linaro.org>
> Signed-off-by: Suniel Mahesh <sunil.m@techveda.org>
> ---

Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>

>  drivers/watchdog/omap_wdt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/watchdog/omap_wdt.c b/drivers/watchdog/omap_wdt.c
> index d5857be..284cfbb 100644
> --- a/drivers/watchdog/omap_wdt.c
> +++ b/drivers/watchdog/omap_wdt.c
> @@ -150,7 +150,6 @@ static int omap3_wdt_reset(struct udevice *dev)
>  {
>         struct omap3_wdt_priv *priv = dev_get_priv(dev);
>
> -       priv->wdt_trgr_pattern = 0x1234;
>  /*
>   * Somebody just triggered watchdog reset and write to WTGR register
>   * is in progress. It is resetting right now, no need to trigger it
> @@ -231,6 +230,7 @@ static int omap3_wdt_probe(struct udevice *dev)
>         if (!priv->regs)
>                 return -EINVAL;
>
> +       priv->wdt_trgr_pattern = 0x1234;
>         debug("%s: Probing wdt%u\n", __func__, dev->seq);
>         return 0;
>  }
> --
> 2.7.4
>
Sam Protsenko Sept. 16, 2019, 11:26 a.m. UTC | #3
Hi Tom,

On Mon, Sep 16, 2019 at 11:09 AM <sunil.m@techveda.org> wrote:
>
> From: Suniel Mahesh <sunil.m@techveda.org>
>
> AM335X based beaglebone black target gets reset by DM converted watchdog
> if booted from emmc around 60sec. Fixed this by moving driver's private struct
> variable initialization at different places in the driver to driver's probe.
> Tested on Beaglebone Black.
>
> Cc: Grygorii Strashko <grygorii.strashko@ti.com>
> Fixes: 7659ea32 ("watchdog: omap_wdt: Convert watchdog driver to use DT and DM")
> Reported-by: Sam Protsenko <semen.protsenko@linaro.org>
> Signed-off-by: Suniel Mahesh <sunil.m@techveda.org>
> ---

Can you please pull this one to v2019.10-rc4? This is a bug fix, and I
think it's critical enough to be included in new release.

Thanks!

>  drivers/watchdog/omap_wdt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/watchdog/omap_wdt.c b/drivers/watchdog/omap_wdt.c
> index d5857be..284cfbb 100644
> --- a/drivers/watchdog/omap_wdt.c
> +++ b/drivers/watchdog/omap_wdt.c
> @@ -150,7 +150,6 @@ static int omap3_wdt_reset(struct udevice *dev)
>  {
>         struct omap3_wdt_priv *priv = dev_get_priv(dev);
>
> -       priv->wdt_trgr_pattern = 0x1234;
>  /*
>   * Somebody just triggered watchdog reset and write to WTGR register
>   * is in progress. It is resetting right now, no need to trigger it
> @@ -231,6 +230,7 @@ static int omap3_wdt_probe(struct udevice *dev)
>         if (!priv->regs)
>                 return -EINVAL;
>
> +       priv->wdt_trgr_pattern = 0x1234;
>         debug("%s: Probing wdt%u\n", __func__, dev->seq);
>         return 0;
>  }
> --
> 2.7.4
>
Tom Rini Sept. 20, 2019, 2:50 p.m. UTC | #4
On Mon, Sep 16, 2019 at 01:39:17PM +0530, sunil.m@techveda.org wrote:

> From: Suniel Mahesh <sunil.m@techveda.org>
> 
> AM335X based beaglebone black target gets reset by DM converted watchdog
> if booted from emmc around 60sec. Fixed this by moving driver's private struct
> variable initialization at different places in the driver to driver's probe.
> Tested on Beaglebone Black.
> 
> Cc: Grygorii Strashko <grygorii.strashko@ti.com>
> Fixes: 7659ea32 ("watchdog: omap_wdt: Convert watchdog driver to use DT and DM")
> Reported-by: Sam Protsenko <semen.protsenko@linaro.org>
> Signed-off-by: Suniel Mahesh <sunil.m@techveda.org>
> Acked-by: Grygorii Strashko <grygorii.strashko@ti.com>
> Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/drivers/watchdog/omap_wdt.c b/drivers/watchdog/omap_wdt.c
index d5857be..284cfbb 100644
--- a/drivers/watchdog/omap_wdt.c
+++ b/drivers/watchdog/omap_wdt.c
@@ -150,7 +150,6 @@  static int omap3_wdt_reset(struct udevice *dev)
 {
 	struct omap3_wdt_priv *priv = dev_get_priv(dev);
 
-	priv->wdt_trgr_pattern = 0x1234;
 /*
  * Somebody just triggered watchdog reset and write to WTGR register
  * is in progress. It is resetting right now, no need to trigger it
@@ -231,6 +230,7 @@  static int omap3_wdt_probe(struct udevice *dev)
 	if (!priv->regs)
 		return -EINVAL;
 
+	priv->wdt_trgr_pattern = 0x1234;
 	debug("%s: Probing wdt%u\n", __func__, dev->seq);
 	return 0;
 }