diff options
author | Stephen Warren <swarren@nvidia.com> | 2016-04-04 11:03:52 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-04-25 15:10:30 -0400 |
commit | 11b9a4d8d96674a57ff61ce622b0900ebee1392d (patch) | |
tree | ed069258a2aa831dc44981d239e6163860c26017 /include | |
parent | ef5ebe951bec72631cdbc7cef9079e6c684e5d0b (diff) | |
download | u-boot-imx-11b9a4d8d96674a57ff61ce622b0900ebee1392d.zip u-boot-imx-11b9a4d8d96674a57ff61ce622b0900ebee1392d.tar.gz u-boot-imx-11b9a4d8d96674a57ff61ce622b0900ebee1392d.tar.bz2 |
sf: fix timebase data type in _wait_ready()
get_timer() returns an unsigned 64-bit value, but is currently assigned to
a signed 32-bit variable. Due to sign extension and data truncation, this
causes the timeout loop in spi_flash_cmd_wait_ready() to immediately (and
incorrectly) fire for about 50% of all time values, based on whether bit
31 is set. In sandbox at least, this causes the test to pass or fail based
on system uptime, as opposed to time since the U-Boot binary was started.
Fixes: 4efad20a1751 ("sf: Update status reg check in spi_flash_cmd_wait_ready")
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Jagan Teki <jteki@openedev.com>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions