aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2023-09-30 14:01:47 +0200
committerTom Rini <trini@konsulko.com>2023-10-16 10:22:11 -0400
commitef3ceb2cae6c4763786f5e1b9364b1c8e2d1d029 (patch)
tree12cf012b27aab857b5f7fdd263d8ae12ba6c81d4
parentede3234df9de88220bb500953d119f10fc67d6e9 (diff)
downloadu-boot-ef3ceb2cae6c4763786f5e1b9364b1c8e2d1d029.zip
u-boot-ef3ceb2cae6c4763786f5e1b9364b1c8e2d1d029.tar.gz
u-boot-ef3ceb2cae6c4763786f5e1b9364b1c8e2d1d029.tar.bz2
eeprom: starfive: add 'mac raw' command
Add a sub-command to print a hexdump of the EEPROM content. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
-rw-r--r--board/starfive/visionfive2/visionfive2-i2c-eeprom.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/board/starfive/visionfive2/visionfive2-i2c-eeprom.c b/board/starfive/visionfive2/visionfive2-i2c-eeprom.c
index 8d8c965..dfeddf6 100644
--- a/board/starfive/visionfive2/visionfive2-i2c-eeprom.c
+++ b/board/starfive/visionfive2/visionfive2-i2c-eeprom.c
@@ -428,6 +428,9 @@ int do_mac(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
return 0;
} else if (!strcmp(cmd, "write_eeprom")) {
return prog_eeprom(STARFIVE_EEPROM_HATS_SIZE_MAX);
+ } else if (!strcmp(cmd, "raw")) {
+ dump_raw_eeprom();
+ return 0;
}
if (argc != 3)
@@ -550,6 +553,8 @@ static char booti_help_text[] =
" - save memory data structure to the EEPROM\n"
"mac initialize\n"
" - initialize the in-memory EEPROM copy with default data\n"
+ "mac raw\n"
+ " - hexdump memory data structure\n"
"mac mac0_address <xx:xx:xx:xx:xx:xx>\n"
" - stores a MAC0 address into the local EEPROM copy\n"
"mac mac1_address <xx:xx:xx:xx:xx:xx>\n"