software/bios/cmds/cmd_liteeth: rename commands to mdio_xy.

This commit is contained in:
Florent Kermarrec 2020-09-16 22:39:56 +02:00
parent d5162a2a2b
commit cb55d7119c
1 changed files with 10 additions and 10 deletions

View File

@ -11,13 +11,13 @@
#include "../helpers.h" #include "../helpers.h"
/** /**
* Command "mdiow" * Command "mdio_write"
* *
* Write MDIO register * Write MDIO register
* *
*/ */
#ifdef CSR_ETHPHY_MDIO_W_ADDR #ifdef CSR_ETHPHY_MDIO_W_ADDR
static void mdiow_handler(int nb_params, char **params) static void mdio_write_handler(int nb_params, char **params)
{ {
char *c; char *c;
unsigned int phyadr2; unsigned int phyadr2;
@ -25,7 +25,7 @@ static void mdiow_handler(int nb_params, char **params)
unsigned int val2; unsigned int val2;
if (nb_params < 3) { if (nb_params < 3) {
printf("mdiow <phyadr> <reg> <value>"); printf("mdio_write <phyadr> <reg> <value>");
return; return;
} }
@ -50,17 +50,17 @@ static void mdiow_handler(int nb_params, char **params)
mdio_write(phyadr2, reg2, val2); mdio_write(phyadr2, reg2, val2);
} }
define_command(mdiow, mdiow_handler, "Write MDIO register", LITEETH_CMDS); define_command(mdio_write, mdio_write_handler, "Write MDIO register", LITEETH_CMDS);
#endif #endif
/** /**
* Command "mdior" * Command "mdio_read"
* *
* Read MDIO register * Read MDIO register
* *
*/ */
#ifdef CSR_ETHPHY_MDIO_W_ADDR #ifdef CSR_ETHPHY_MDIO_W_ADDR
static void mdior_handler(int nb_params, char **params) static void mdio_read_handler(int nb_params, char **params)
{ {
char *c; char *c;
unsigned int phyadr2; unsigned int phyadr2;
@ -88,17 +88,17 @@ static void mdior_handler(int nb_params, char **params)
printf("Reg %d: 0x%04x", reg2, val); printf("Reg %d: 0x%04x", reg2, val);
} }
define_command(mdior, mdior_handler, "Read MDIO register", LITEETH_CMDS); define_command(mdio_read, mdio_read_handler, "Read MDIO register", LITEETH_CMDS);
#endif #endif
/** /**
* Command "mdiod" * Command "mdio_dump"
* *
* Dump MDIO registers * Dump MDIO registers
* *
*/ */
#ifdef CSR_ETHPHY_MDIO_W_ADDR #ifdef CSR_ETHPHY_MDIO_W_ADDR
static void mdiod_handler(int nb_params, char **params) static void mdio_dump_handler(int nb_params, char **params)
{ {
char *c; char *c;
unsigned int phyadr; unsigned int phyadr;
@ -130,5 +130,5 @@ static void mdiod_handler(int nb_params, char **params)
} }
} }
define_command(mdiod, mdiod_handler, "Dump MDIO registers", LITEETH_CMDS); define_command(mdio_dump, mdio_dump_handler, "Dump MDIO registers", LITEETH_CMDS);
#endif #endif