Searched hist:"11 b9a4d8d96674a57ff61ce622b0900ebee1392d" (Results 1 – 1 of 1) sorted by relevance
| /rk3399_rockchip-uboot/drivers/mtd/spi/ |
| H A D | spi_flash.c | 11b9a4d8d96674a57ff61ce622b0900ebee1392d Mon Apr 04 17:03:52 UTC 2016 Stephen Warren <swarren@nvidia.com> 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>
|