Skip to contentSkip to conversation

watchdog: omap_wdt: Fix WDT target reset when booted from emmc

PATCH New sunil.m at techveda.org 4 participants 5 messages Sep 16, 2019 – Sep 20, 2019 Watchdog device drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 watchdog: omap_wdt: Fix WDT target reset when booted from emmc

From: Suniel Mahesh <[email protected]>

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 <[email protected]>
Fixes 7659ea32 ("watchdog: omap_wdt: Convert watchdog driver to use DT and DM")
---
 drivers/watchdog/omap_wdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/watchdog/omap_wdt.c +1 -1
index d5857be..284cfbb 100644
@@ -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;
 }
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/1 watchdog: omap_wdt: Fix WDT target reset when booted from emmc

Quoted 7 lines · sunil.m at techveda.org

From: Suniel Mahesh <[email protected]>

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.

Quoted 8 lines
Cc Grygorii Strashko <[email protected]>
Fixes 7659ea32 ("watchdog: omap_wdt: Convert watchdog driver to use DT and DM")
---
  drivers/watchdog/omap_wdt.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
Signature · 2 lines
Best regards,
grygorii
#2 lore raw

PATCH 1/1 watchdog: omap_wdt: Fix WDT target reset when booted from emmc

In reply to sunil.m at techveda.org
Quoted 8 lines · On Mon, Sep 16, 2019 at 11:09 AM <[email protected]> wrote:

From: Suniel Mahesh <[email protected]>

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.

Quoted 5 lines
Cc Grygorii Strashko <[email protected]>
Fixes 7659ea32 ("watchdog: omap_wdt: Convert watchdog driver to use DT and DM")

---

Quoted 26 lines
 drivers/watchdog/omap_wdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/watchdog/omap_wdt.c +1 -2
index d5857be..284cfbb 100644
@@ -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

#3 lore raw

PATCH 1/1 watchdog: omap_wdt: Fix WDT target reset when booted from emmc

In reply to sunil.m at techveda.org

Hi Tom,

Quoted 8 lines · On Mon, Sep 16, 2019 at 11:09 AM <[email protected]> wrote:

From: Suniel Mahesh <[email protected]>

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.

Quoted 5 lines
Cc Grygorii Strashko <[email protected]>
Fixes 7659ea32 ("watchdog: omap_wdt: Convert watchdog driver to use DT and DM")

---

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!

Quoted 26 lines
 drivers/watchdog/omap_wdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/watchdog/omap_wdt.c +1 -2
index d5857be..284cfbb 100644
@@ -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

#4 lore raw

PATCH 1/1 watchdog: omap_wdt: Fix WDT target reset when booted from emmc

In reply to sunil.m at techveda.org
Quoted 7 lines · sunil.m at techveda.org

From: Suniel Mahesh <[email protected]>

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.

Quoted 6 lines
Cc Grygorii Strashko <[email protected]>
Fixes 7659ea32 ("watchdog: omap_wdt: Convert watchdog driver to use DT and DM")

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190920/e455c8d5/attachment.sig>