diff mbox series

[v2,3/4] watchdog/aspeed: Improve watchdog timeout message

Message ID 20191113005201.19005-4-joel@jms.id.au
State Superseded
Headers show
Series arm/aspeed: Watchdog and SDRAM fixes | expand

Commit Message

Joel Stanley Nov. 13, 2019, 12:52 a.m. UTC
Users benefit from knowing which watchdog timer has expired. The address
of the watchdog's registers unambiguously indicates which has expired,
so log that.

Reviewed-by: Cédric Le Goater <clg@kaod.org>

Signed-off-by: Joel Stanley <joel@jms.id.au>

---
v2: Use HWADDR_PRIx
---
 hw/watchdog/wdt_aspeed.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

-- 
2.24.0

Comments

Alex Bennée Nov. 13, 2019, 12:32 p.m. UTC | #1
Joel Stanley <joel@jms.id.au> writes:

> Users benefit from knowing which watchdog timer has expired. The address

> of the watchdog's registers unambiguously indicates which has expired,

> so log that.

>

> Reviewed-by: Cédric Le Goater <clg@kaod.org>

> Signed-off-by: Joel Stanley <joel@jms.id.au>

> ---

> v2: Use HWADDR_PRIx

> ---

>  hw/watchdog/wdt_aspeed.c | 3 ++-

>  1 file changed, 2 insertions(+), 1 deletion(-)

>

> diff --git a/hw/watchdog/wdt_aspeed.c b/hw/watchdog/wdt_aspeed.c

> index 145be6f99ce2..8787c5ad0f97 100644

> --- a/hw/watchdog/wdt_aspeed.c

> +++ b/hw/watchdog/wdt_aspeed.c

> @@ -219,7 +219,8 @@ static void aspeed_wdt_timer_expired(void *dev)

>          return;

>      }

>

> -    qemu_log_mask(CPU_LOG_RESET, "Watchdog timer expired.\n");

> +    qemu_log_mask(CPU_LOG_RESET, "Watchdog timer %" HWADDR_PRIx " expired.\n",

> +            s->iomem.addr);


nit: spacing off

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>


>      watchdog_perform_action();

>      timer_del(s->timer);

>  }



--
Alex Bennée
diff mbox series

Patch

diff --git a/hw/watchdog/wdt_aspeed.c b/hw/watchdog/wdt_aspeed.c
index 145be6f99ce2..8787c5ad0f97 100644
--- a/hw/watchdog/wdt_aspeed.c
+++ b/hw/watchdog/wdt_aspeed.c
@@ -219,7 +219,8 @@  static void aspeed_wdt_timer_expired(void *dev)
         return;
     }
 
-    qemu_log_mask(CPU_LOG_RESET, "Watchdog timer expired.\n");
+    qemu_log_mask(CPU_LOG_RESET, "Watchdog timer %" HWADDR_PRIx " expired.\n",
+            s->iomem.addr);
     watchdog_perform_action();
     timer_del(s->timer);
 }