[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 01/23] aspeed/wdt: Check correct register for clock source
From: |
Cédric Le Goater |
Subject: |
[PATCH v2 01/23] aspeed/wdt: Check correct register for clock source |
Date: |
Wed, 25 Sep 2019 16:32:26 +0200 |
From: Amithash Prasad <address@hidden>
When WDT_RESTART is written, the data is not the contents
of the WDT_CTRL register. Hence ensure we are looking at
WDT_CTRL to check if bit WDT_CTRL_1MHZ_CLK is set or not.
Signed-off-by: Amithash Prasad <address@hidden>
[clg: improved Suject prefix ]
Signed-off-by: Cédric Le Goater <address@hidden>
Reviewed-by: Joel Stanley <address@hidden>
Signed-off-by: Cédric Le Goater <address@hidden>
---
hw/watchdog/wdt_aspeed.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/watchdog/wdt_aspeed.c b/hw/watchdog/wdt_aspeed.c
index 9b932134172c..f710036535da 100644
--- a/hw/watchdog/wdt_aspeed.c
+++ b/hw/watchdog/wdt_aspeed.c
@@ -140,7 +140,7 @@ static void aspeed_wdt_write(void *opaque, hwaddr offset,
uint64_t data,
case WDT_RESTART:
if ((data & 0xFFFF) == WDT_RESTART_MAGIC) {
s->regs[WDT_STATUS] = s->regs[WDT_RELOAD_VALUE];
- aspeed_wdt_reload(s, !(data & WDT_CTRL_1MHZ_CLK));
+ aspeed_wdt_reload(s, !(s->regs[WDT_CTRL] & WDT_CTRL_1MHZ_CLK));
}
break;
case WDT_CTRL:
--
2.21.0
- [PATCH v2 00/23] aspeed: Add support for the AST2600 SoC, Cédric Le Goater, 2019/09/25
- [PATCH v2 01/23] aspeed/wdt: Check correct register for clock source,
Cédric Le Goater <=
- [PATCH v2 02/23] hw/sd/aspeed_sdhci: New device, Cédric Le Goater, 2019/09/25
- [PATCH v2 03/23] hw: aspeed_scu: Add AST2600 support, Cédric Le Goater, 2019/09/25
- [PATCH v2 04/23] aspeed/timer: Introduce an object class per SoC, Cédric Le Goater, 2019/09/25
- [PATCH v2 05/23] aspeed/timer: Add support for control register 3, Cédric Le Goater, 2019/09/25
- [PATCH v2 06/23] aspeed/timer: Add AST2600 support, Cédric Le Goater, 2019/09/25
- [PATCH v2 07/23] aspeed/timer: Add support for IRQ status register on the AST2600, Cédric Le Goater, 2019/09/25
- [PATCH v2 08/23] aspeed/sdmc: Introduce an object class per SoC, Cédric Le Goater, 2019/09/25