shell: flash: show JEDEC ID when running flash info
This commit is contained in:
parent
81430df971
commit
84454c8054
1 changed files with 6 additions and 0 deletions
|
@ -93,6 +93,7 @@ static int do_flash_release(struct console *con, size_t argc, const char **argv)
|
||||||
|
|
||||||
static int do_flash_info(struct console *con, size_t argc, const char **argv)
|
static int do_flash_info(struct console *con, size_t argc, const char **argv)
|
||||||
{
|
{
|
||||||
|
char jedec_id[3] = { 0, 0, 0 };
|
||||||
size_t size, capacity;
|
size_t size, capacity;
|
||||||
|
|
||||||
(void)argv;
|
(void)argv;
|
||||||
|
@ -103,6 +104,11 @@ static int do_flash_info(struct console *con, size_t argc, const char **argv)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (flash_get_jedec_id(flash, jedec_id, 3)) {
|
||||||
|
fprintf(con->fp, " JEDEC ID: %02x%02x%02x\n",
|
||||||
|
jedec_id[0], jedec_id[1], jedec_id[2]);
|
||||||
|
}
|
||||||
|
|
||||||
size = flash_get_size(flash);
|
size = flash_get_size(flash);
|
||||||
capacity = flash_get_capacity(flash);
|
capacity = flash_get_capacity(flash);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue