|
|
@ -190,13 +190,8 @@ int do_tricorder_eeprom(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) |
|
|
|
if (argc == 3) { |
|
|
|
if (argc == 3) { |
|
|
|
ulong dev_addr = simple_strtoul(argv[2], NULL, 16); |
|
|
|
ulong dev_addr = simple_strtoul(argv[2], NULL, 16); |
|
|
|
|
|
|
|
|
|
|
|
if (strcmp(argv[1], "read") == 0) { |
|
|
|
if (strcmp(argv[1], "read") == 0) |
|
|
|
int rcode; |
|
|
|
return tricorder_eeprom_read(dev_addr); |
|
|
|
|
|
|
|
|
|
|
|
rcode = tricorder_eeprom_read(dev_addr); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return rcode; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} else if (argc == 6 || argc == 7) { |
|
|
|
} else if (argc == 6 || argc == 7) { |
|
|
|
ulong dev_addr = simple_strtoul(argv[2], NULL, 16); |
|
|
|
ulong dev_addr = simple_strtoul(argv[2], NULL, 16); |
|
|
|
char *name = argv[3]; |
|
|
|
char *name = argv[3]; |
|
|
@ -207,14 +202,9 @@ int do_tricorder_eeprom(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) |
|
|
|
if (argc == 7) |
|
|
|
if (argc == 7) |
|
|
|
interface = argv[6]; |
|
|
|
interface = argv[6]; |
|
|
|
|
|
|
|
|
|
|
|
if (strcmp(argv[1], "write") == 0) { |
|
|
|
if (strcmp(argv[1], "write") == 0) |
|
|
|
int rcode; |
|
|
|
return tricorder_eeprom_write(dev_addr, name, version, |
|
|
|
|
|
|
|
serial, interface); |
|
|
|
rcode = tricorder_eeprom_write(dev_addr, name, version, |
|
|
|
|
|
|
|
serial, interface); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return rcode; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return CMD_RET_USAGE; |
|
|
|
return CMD_RET_USAGE; |
|
|
|