u-boot/drivers/mtd/spi
Stephen Warren 11b9a4d8d9 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: 4efad20a17 ("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>
2016-04-25 15:10:30 -04:00
..
Kconfig sf: Make 4K sector support configurable 2015-08-17 15:59:48 +05:30
Makefile sf: Rename sf_ops.c to spi-flash.c 2015-12-11 22:12:24 +05:30
fsl_espi_spl.c driver: Add support of image load for MMC & SPI in SPL 2014-04-22 17:58:50 -07:00
sandbox.c sandbox: spi: Remove an incorrect free() 2016-02-26 08:53:10 -07:00
sf-uclass.c dm: spi_flash: Allow the uclass to work without printf() 2016-01-15 05:39:27 -07:00
sf.c sf: Add CONFIG_SF_DUAL_FLASH 2014-01-12 21:40:22 +05:30
sf_dataflash.c dm: Rename dev_get_parentdata() to dev_get_parent_priv() 2015-10-23 09:42:28 -06:00
sf_internal.h sf: Make IO modes at last in read modes 2016-01-13 18:47:27 +05:30
sf_mtd.c mtd, spi: Add MTD layer driver 2015-06-30 00:40:11 +05:30
sf_params.c sf: params: Add IS25LP128 part support 2015-10-25 20:17:03 +05:30
sf_probe.c spi: Correct two error return values 2016-02-26 08:53:10 -07:00
spi_flash.c sf: fix timebase data type in _wait_ready() 2016-04-25 15:10:30 -04:00
spi_spl_load.c spl: change return values of spl_*_load_image() 2015-11-18 14:50:02 -05:00