Skip to content
Commit a58147c2 authored by Nishanth Menon's avatar Nishanth Menon Committed by Tom Rini
Browse files

board: ti: common: board_detect: Do 1byte address checks first.



Do 1 byte address checks first prior to doing 2 byte address checks.
When performing 2 byte addressing on 1 byte addressing eeprom, the
second byte is taken in as a write operation and ends up erasing the
eeprom region we want to preserve.

While we could have theoretically handled this by ensuring the write
protect of the eeproms are properly managed, this is not true in case
where board are updated with 1 byte eeproms to handle supply status.

Flipping the checks by checking for 1 byte addressing prior to 2 byte
addressing check prevents this problem at the minor cost of additional
overhead for boards with 2 byte addressing eeproms.

Signed-off-by: default avatarNishanth Menon <nm@ti.com>
Reviewed-by: default avatarTom Rini <trini@konsulko.com>
parent bc1de483
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment