On Tue, 26 Oct 2021, Richard Henderson wrote:
On 10/26/21 6:32 PM, BALATON Zoltan wrote:
+ trace_sh_serial("write", size, offs, val);
switch (offs) {
case 0x00: /* SMR */
s->smr = val & ((s->feat & SH_SERIAL_FEAT_SCIF) ? 0x7b : 0xff);
@@ -302,10 +298,7 @@ static uint64_t sh_serial_read(void *opaque, hwaddr
offs,
break;
}
}
-#ifdef DEBUG_SERIAL
- printf("sh_serial: read offs=0x%02x val=0x%x\n",
- offs, ret);
-#endif
+ trace_sh_serial("read ", size, offs, ret);
I suggest two separate sh_serial_{read,write} tracepoints.
Thought about that but it's unlikely one would only want to trace one
direction, more likely to want all access to the device. But if it's a
requirement I can split this into separate _read and _write.
Regards,
BALATON Zoltan