| e25ae322 | 20-Apr-2017 |
Cooper Jr., Franklin <fcooper@ti.com> |
ti: common: board_detect: Set alen to expected value before i2c read
In non DM I2C read operations the address length passed in during a read operation will be used automatically. However, in DM I2C
ti: common: board_detect: Set alen to expected value before i2c read
In non DM I2C read operations the address length passed in during a read operation will be used automatically. However, in DM I2C the address length is set to a default value of one which causes problems when trying to perform a read with a differing alen. Therefore, before the first read in a series of read operations set the alen to the correct value.
Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Heiko Schocher <hs@denx.de>
show more ...
|
| 7774e97a | 11-Oct-2016 |
Nishanth Menon <nm@ti.com> |
ti: common: board_detect: Return a valid empty string for un-initialized eeprom
Current logic for query of revision, board_name, config returns NULL. Users of these functions do a direct strncmp to
ti: common: board_detect: Return a valid empty string for un-initialized eeprom
Current logic for query of revision, board_name, config returns NULL. Users of these functions do a direct strncmp to compare. Unfortunately, as per conventions require two valid strings to compare against and the current implementation causes a crash when compared with NULL.
We'd still like to maintain the simplistic usage of these APIs instead of redundant if (string) res=strncmp(fn(),"cmp",n); flowing all over the place.
Hence, since the version, name and config is already pre-initialized with empty string, just dont check for invalid header in the first place and return the empty string to the caller.
Reported-by: Brad Griffis <bgriffis@ti.com> Signed-off-by: Nishanth Menon <nm@ti.com> Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com> [trini: Correct was'nt -> wasn't typo] Signed-off-by: Tom Rini <trini@konsulko.com>
show more ...
|
| 2a78c9e7 | 11-Oct-2016 |
Nishanth Menon <nm@ti.com> |
ti: common: board_detect: Setup initial default value for config as well
config should have been initialized along with others as defaults.
Signed-off-by: Nishanth Menon <nm@ti.com> Reviewed-by: Lo
ti: common: board_detect: Setup initial default value for config as well
config should have been initialized along with others as defaults.
Signed-off-by: Nishanth Menon <nm@ti.com> Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
show more ...
|