]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
eeprom: starfive: add 'mac raw' command
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sat, 30 Sep 2023 12:01:47 +0000 (14:01 +0200)
committerTom Rini <trini@konsulko.com>
Mon, 16 Oct 2023 14:22:11 +0000 (10:22 -0400)
Add a sub-command to print a hexdump of the EEPROM content.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
board/starfive/visionfive2/visionfive2-i2c-eeprom.c

index 8d8c96516e93303b04b5012e920ed8976beae648..dfeddf67c22f895dc35d983a0b67376b932e4516 100644 (file)
@@ -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"