qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] i.MX: Fix inverted register bits in wdt code.
@ 2020-02-07  9:54 Roman Kapl
  2020-02-11 17:57 ` Peter Maydell
  0 siblings, 1 reply; 3+ messages in thread
From: Roman Kapl @ 2020-02-07  9:54 UTC (permalink / raw)
  To: qemu-arm; +Cc: Peter Maydell, Roman Kapl, qemu-devel, Jean-Christophe Dubois

Documentation says for WDA '0: Assert WDOG output.' and for SRS
'0: Assert system reset signal.'.

Signed-off-by: Roman Kapl <rka@sysgo.com>
---
 hw/misc/imx2_wdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/misc/imx2_wdt.c b/hw/misc/imx2_wdt.c
index e47e442592..c8944729c4 100644
--- a/hw/misc/imx2_wdt.c
+++ b/hw/misc/imx2_wdt.c
@@ -28,7 +28,7 @@ static void imx2_wdt_write(void *opaque, hwaddr addr,
                            uint64_t value, unsigned int size)
 {
     if (addr == IMX2_WDT_WCR &&
-        (value & (IMX2_WDT_WCR_WDA | IMX2_WDT_WCR_SRS))) {
+        (~value & (IMX2_WDT_WCR_WDA | IMX2_WDT_WCR_SRS))) {
         watchdog_perform_action();
     }
 }
-- 
2.22.0



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-02-12  9:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-07  9:54 [PATCH] i.MX: Fix inverted register bits in wdt code Roman Kapl
2020-02-11 17:57 ` Peter Maydell
2020-02-12  9:10   ` Roman Kapl

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).