From 6c4abe2185ac3a7208821c13d0bb5d7e21f15817 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Thu, 17 Sep 2020 09:10:58 +0200 Subject: [PATCH] software/bios/cmds/cmd_liteeth: make sure all commands generate a report and improve it. --- litex/soc/software/bios/cmds/cmd_liteeth.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/litex/soc/software/bios/cmds/cmd_liteeth.c b/litex/soc/software/bios/cmds/cmd_liteeth.c index 42ea0b466..e1f0a4e54 100644 --- a/litex/soc/software/bios/cmds/cmd_liteeth.c +++ b/litex/soc/software/bios/cmds/cmd_liteeth.c @@ -47,6 +47,7 @@ static void mdio_write_handler(int nb_params, char **params) return; } + printf("MDIO write @0x%x: 0x%02x 0x%04x\n", phyadr2, reg2, val2); mdio_write(phyadr2, reg2, val2); } @@ -84,8 +85,9 @@ static void mdio_read_handler(int nb_params, char **params) return; } + printf("MDIO read @0x%x:\n", phyadr2); val = mdio_read(phyadr2, reg2); - printf("Reg %d: 0x%04x", reg2, val); + printf("0x%02x 0x%04x", reg2, val); } define_command(mdio_read, mdio_read_handler, "Read MDIO register", LITEETH_CMDS); @@ -126,7 +128,7 @@ static void mdio_dump_handler(int nb_params, char **params) printf("MDIO dump @0x%x:\n", phyadr); for (i = 0; i < count; i++) { val = mdio_read(phyadr, i); - printf("reg %d: 0x%04x", i, val); + printf("0x%02x 0x%04x\n", i, val); } }