diff mbox series

[PATCH-for-5.2,4/7] hw/block/fdc: Convert debug FLOPPY_DPRINTF() to trace events

Message ID 20200806080824.21567-5-f4bug@amsat.org
State New
Headers show
Series hw/block/fdc: Cleanups trying to make sense of the floppy controllers | expand

Commit Message

Philippe Mathieu-Daudé Aug. 6, 2020, 8:08 a.m. UTC
Convert debug FLOPPY_DPRINTF() to trace events.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 hw/block/fdc.c        | 6 +++---
 hw/block/trace-events | 3 +++
 2 files changed, 6 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/hw/block/fdc.c b/hw/block/fdc.c
index ee45ec0b27..f9f3f3c079 100644
--- a/hw/block/fdc.c
+++ b/hw/block/fdc.c
@@ -326,7 +326,7 @@  static int fd_seek(FDrive *drv, uint8_t head, uint8_t track, uint8_t sect,
 /* Set drive back to track 0 */
 static void fd_recalibrate(FDrive *drv)
 {
-    FLOPPY_DPRINTF("recalibrate\n");
+    trace_floppy_recalibrate();
     fd_seek(drv, 0, 0, 1, 1);
 }
 
@@ -438,7 +438,7 @@  static void fd_revalidate(FDrive *drv)
 {
     int rc;
 
-    FLOPPY_DPRINTF("revalidate\n");
+    trace_floppy_revalidate();
     if (drv->blk != NULL) {
         drv->ro = blk_is_read_only(drv->blk);
         if (!blk_is_inserted(drv->blk)) {
@@ -1283,7 +1283,7 @@  static void fdctrl_reset(FDCtrl *fdctrl, int do_irq)
 {
     int i;
 
-    FLOPPY_DPRINTF("reset controller\n");
+    trace_fdc_reset();
     fdctrl_reset_irq(fdctrl);
     /* Initialise controller */
     fdctrl->sra = 0;
diff --git a/hw/block/trace-events b/hw/block/trace-events
index 958fcc5508..9f7caf9b17 100644
--- a/hw/block/trace-events
+++ b/hw/block/trace-events
@@ -1,8 +1,11 @@ 
 # See docs/devel/tracing.txt for syntax documentation.
 
 # fdc.c
+fdc_reset(void) ""
 fdc_ioport_read(uint8_t reg, uint8_t value) "read reg 0x%02x val 0x%02x"
 fdc_ioport_write(uint8_t reg, uint8_t value) "write reg 0x%02x val 0x%02x"
+floppy_recalibrate(void) ""
+floppy_revalidate(void) ""
 
 # pflash_cfi02.c
 # pflash_cfi01.c