]> Git Repo - qemu.git/commitdiff
i.MX: Fix inverted register bits in wdt code.
authorRoman Kapl <[email protected]>
Fri, 7 Feb 2020 09:54:09 +0000 (10:54 +0100)
committerPeter Maydell <[email protected]>
Thu, 13 Feb 2020 14:14:52 +0000 (14:14 +0000)
Documentation says for WDA '0: Assert WDOG output.' and for SRS
'0: Assert system reset signal.'.

Signed-off-by: Roman Kapl <[email protected]>
Message-id: 20200207095409[email protected]
Reviewed-by: Peter Maydell <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
hw/misc/imx2_wdt.c

index 5576778a3237e33e59e57274fe91815e1a9661e1..2aedfe803a4d7347ca7d6cd43a79827a8135e9b1 100644 (file)
@@ -29,7 +29,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();
     }
 }
This page took 0.027041 seconds and 4 git commands to generate.