aspeed/wdt: Add trace events

Reviewed-by: Francisco Iglesias <frasse.iglesias@gmail.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
This commit is contained in:
Cédric Le Goater 2021-10-12 08:20:08 +02:00
parent 199fd6230c
commit a8eb9a4333
2 changed files with 9 additions and 0 deletions

View File

@ -5,3 +5,7 @@ cmsdk_apb_watchdog_read(uint64_t offset, uint64_t data, unsigned size) "CMSDK AP
cmsdk_apb_watchdog_write(uint64_t offset, uint64_t data, unsigned size) "CMSDK APB watchdog write: offset 0x%" PRIx64 " data 0x%" PRIx64 " size %u" cmsdk_apb_watchdog_write(uint64_t offset, uint64_t data, unsigned size) "CMSDK APB watchdog write: offset 0x%" PRIx64 " data 0x%" PRIx64 " size %u"
cmsdk_apb_watchdog_reset(void) "CMSDK APB watchdog: reset" cmsdk_apb_watchdog_reset(void) "CMSDK APB watchdog: reset"
cmsdk_apb_watchdog_lock(uint32_t lock) "CMSDK APB watchdog: lock %" PRIu32 cmsdk_apb_watchdog_lock(uint32_t lock) "CMSDK APB watchdog: lock %" PRIu32
# wdt-aspeed.c
aspeed_wdt_read(uint64_t addr, uint32_t size) "@0x%" PRIx64 " size=%d"
aspeed_wdt_write(uint64_t addr, uint32_t size, uint64_t data) "@0x%" PRIx64 " size=%d value=0x%"PRIx64

View File

@ -19,6 +19,7 @@
#include "hw/sysbus.h" #include "hw/sysbus.h"
#include "hw/watchdog/wdt_aspeed.h" #include "hw/watchdog/wdt_aspeed.h"
#include "migration/vmstate.h" #include "migration/vmstate.h"
#include "trace.h"
#define WDT_STATUS (0x00 / 4) #define WDT_STATUS (0x00 / 4)
#define WDT_RELOAD_VALUE (0x04 / 4) #define WDT_RELOAD_VALUE (0x04 / 4)
@ -60,6 +61,8 @@ static uint64_t aspeed_wdt_read(void *opaque, hwaddr offset, unsigned size)
{ {
AspeedWDTState *s = ASPEED_WDT(opaque); AspeedWDTState *s = ASPEED_WDT(opaque);
trace_aspeed_wdt_read(offset, size);
offset >>= 2; offset >>= 2;
switch (offset) { switch (offset) {
@ -140,6 +143,8 @@ static void aspeed_wdt_write(void *opaque, hwaddr offset, uint64_t data,
AspeedWDTClass *awc = ASPEED_WDT_GET_CLASS(s); AspeedWDTClass *awc = ASPEED_WDT_GET_CLASS(s);
bool enable; bool enable;
trace_aspeed_wdt_write(offset, size, data);
offset >>= 2; offset >>= 2;
switch (offset) { switch (offset) {