]> git.baikalelectronics.ru Git - uboot.git/commit
cmd: tlv_eeprom: enable 'dev' subcommand before 'read'
authorJosua Mayer <josua@solid-run.com>
Fri, 5 May 2023 08:20:49 +0000 (11:20 +0300)
committerStefan Roese <sr@denx.de>
Mon, 8 May 2023 08:47:13 +0000 (10:47 +0200)
commit784f8647b9775efab92c6b3faa90ea844a49c615
tree5c196a3493503ff0ca1ef1dad14328df5def354f
parent6ad56a23383d06d4a9c0eb8d6fb4cda87f04aa83
cmd: tlv_eeprom: enable 'dev' subcommand before 'read'

Move the handler for "tlv_eeprom dev X" command to the beginning of
do_tlv_eeprom, to allow using it before issuing a "read" command for
currently selected eeprom.

Also remove the check if eeprom exists, since that can only work after
the first execution of read_eeprom triggered device lookup.
Instead accept values up to the defined array size (MAX_TLV_DEVICES).

Signed-off-by: Josua Mayer <josua@solid-run.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Cc: Stefan Roese <sr@denx.de>
Cc: Baruch Siach <baruch@tkos.co.il>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
cmd/tlv_eeprom.c