hw/rtc/mc146818rtc: Convert CMOS_DPRINTF() into trace events
Signed-off-by: Bernhard Beschow <shentey@gmail.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20251019210303.104718-4-shentey@gmail.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
This commit is contained in:
committed by
Philippe Mathieu-Daudé
parent
6b670b1b96
commit
4847c5701a
@@ -43,16 +43,10 @@
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qapi-events-misc.h"
|
||||
#include "qapi/visitor.h"
|
||||
#include "trace.h"
|
||||
|
||||
//#define DEBUG_CMOS
|
||||
//#define DEBUG_COALESCED
|
||||
|
||||
#ifdef DEBUG_CMOS
|
||||
# define CMOS_DPRINTF(format, ...) printf(format, ## __VA_ARGS__)
|
||||
#else
|
||||
# define CMOS_DPRINTF(format, ...) do { } while (0)
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_COALESCED
|
||||
# define DPRINTF_C(format, ...) printf(format, ## __VA_ARGS__)
|
||||
#else
|
||||
@@ -439,8 +433,7 @@ static void cmos_ioport_write(void *opaque, hwaddr addr,
|
||||
if ((addr & 1) == 0) {
|
||||
s->cmos_index = data & 0x7f;
|
||||
} else {
|
||||
CMOS_DPRINTF("cmos: write index=0x%02x val=0x%02" PRIx64 "\n",
|
||||
s->cmos_index, data);
|
||||
trace_mc146818_rtc_ioport_write(s->cmos_index, data);
|
||||
switch(s->cmos_index) {
|
||||
case RTC_SECONDS_ALARM:
|
||||
case RTC_MINUTES_ALARM:
|
||||
@@ -726,8 +719,7 @@ static uint64_t cmos_ioport_read(void *opaque, hwaddr addr,
|
||||
ret = s->cmos_data[s->cmos_index];
|
||||
break;
|
||||
}
|
||||
CMOS_DPRINTF("cmos: read index=0x%02x val=0x%02x\n",
|
||||
s->cmos_index, ret);
|
||||
trace_mc146818_rtc_ioport_read(s->cmos_index, ret);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,6 +32,10 @@ m48txx_nvram_io_write(uint64_t addr, uint64_t value) "io write addr:0x%04" PRIx6
|
||||
m48txx_nvram_mem_read(uint32_t addr, uint32_t value) "mem read addr:0x%04x value:0x%02x"
|
||||
m48txx_nvram_mem_write(uint32_t addr, uint32_t value) "mem write addr:0x%04x value:0x%02x"
|
||||
|
||||
# mc146818rtc.c
|
||||
mc146818_rtc_ioport_read(uint8_t addr, uint8_t value) "[0x%02" PRIx8 "] -> 0x%02" PRIx8
|
||||
mc146818_rtc_ioport_write(uint8_t addr, uint8_t value) "[0x%02" PRIx8 "] <- 0x%02" PRIx8
|
||||
|
||||
# goldfish_rtc.c
|
||||
goldfish_rtc_read(uint64_t addr, uint64_t value) "addr 0x%02" PRIx64 " value 0x%08" PRIx64
|
||||
goldfish_rtc_write(uint64_t addr, uint64_t value) "addr 0x%02" PRIx64 " value 0x%08" PRIx64
|
||||
|
||||
Reference in New Issue
Block a user