[U-Boot] [PATCH] sf: fix timebase data type in _wait_ready()
Tom Rini
trini at konsulko.com
Tue Apr 12 18:03:29 CEST 2016
On Tue, Apr 12, 2016 at 09:43:03AM -0600, Stephen Warren wrote:
> On 04/06/2016 05:22 AM, Jagan Teki wrote:
> >On 5 April 2016 at 05:31, Tom Rini <trini at konsulko.com> wrote:
> >>On Mon, Apr 04, 2016 at 11:03:52AM -0600, Stephen Warren wrote:
> >>
> >>>From: Stephen Warren <swarren at nvidia.com>
> >>>
> >>>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 at nvidia.com>
> >>
> >>Reviewed-by: Tom Rini <trini at konsulko.com>
> >
> >Reviewed-by: Jagan Teki <jteki at openedev.com>
>
> It'd be great if this could be applied to fix the final test/py
> failure on sandbox.
Yes, please, lets get some PRs with fixes in now :) Thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160412/e256fec9/attachment.sig>
More information about the U-Boot
mailing list