diff options
author | Zong Li <zong.li@sifive.com> | 2021-07-09 11:26:35 +0300 |
---|---|---|
committer | Leo Yu-Chi Liang <ycliang@andestech.com> | 2021-07-21 11:38:25 +0300 |
commit | 66a21be6744bf2926c8bc30100662caeb0fd3667 (patch) | |
tree | 5cbffd73bbda81cb3aba6d25fca82d32a6d04afe /board/sifive | |
parent | c9204859bbdb924cda811813c545032971656480 (diff) | |
download | u-boot-66a21be6744bf2926c8bc30100662caeb0fd3667.tar.xz |
board: sifive: remove the command for setting serial number
We wouldn't like to allow user to change the serial number, so remove
the command for changing serial number in EEPROM.
Signed-off-by: Zong Li <zong.li@sifive.com>
Suggested-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Diffstat (limited to 'board/sifive')
-rw-r--r-- | board/sifive/unmatched/hifive-platform-i2c-eeprom.c | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/board/sifive/unmatched/hifive-platform-i2c-eeprom.c b/board/sifive/unmatched/hifive-platform-i2c-eeprom.c index a2151f15e0..ad2f3155d0 100644 --- a/board/sifive/unmatched/hifive-platform-i2c-eeprom.c +++ b/board/sifive/unmatched/hifive-platform-i2c-eeprom.c @@ -402,24 +402,6 @@ static void set_product_id(char *string) } /** - * set_serial_number() - set the PCB serial number in the in-memory copy - * - * Set the board serial number in the in-memory EEPROM copy from the supplied - * string argument, and update the CRC. - */ -static void set_serial_number(char *string) -{ - if (strlen(string) > SERIAL_NUMBER_BYTES) { - printf("Serial number must not be greater than 16 bytes\n"); - return; - } - - memset(e.serial, 0, sizeof(e.serial)); - strncpy((char *)e.serial, string, sizeof(e.serial)); - update_crc(); -} - -/** * init_local_copy() - initialize the in-memory EEPROM copy * * Initialize the in-memory EEPROM copy with the magic number. Must @@ -468,10 +450,7 @@ int do_mac(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) return 0; } - if (!strcmp(cmd, "serial_number")) { - set_serial_number(argv[2]); - return 0; - } else if (!strcmp(cmd, "manuf_test_status")) { + if (!strcmp(cmd, "manuf_test_status")) { set_manuf_test_status(argv[2]); return 0; } else if (!strcmp(cmd, "mac_address")) { |