diff options
author | Rasmus Villemoes <rasmus.villemoes@prevas.dk> | 2019-09-10 08:32:01 +0000 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2020-01-07 10:26:57 +0100 |
commit | b6e7ef4bf71bc0927dea35fdec0a653a82ae57a7 (patch) | |
tree | 6b870c89ecf8a4168546bea92c6f865c9143cd3c /drivers/pci | |
parent | b1278a8e3eb1a18e65bf24f8ca338460d0ef0278 (diff) | |
download | u-boot-b6e7ef4bf71bc0927dea35fdec0a653a82ae57a7.tar.gz u-boot-b6e7ef4bf71bc0927dea35fdec0a653a82ae57a7.tar.xz u-boot-b6e7ef4bf71bc0927dea35fdec0a653a82ae57a7.zip |
ARM: mxs: spl_boot.c: make early_delay more robust
It's true that booting normally doesn't take long enough for the
register to roll (which actually happens in a little over an hour, not
just a few seconds). However, the counter starts at power-on, and if
the board is held in reset to be booted over USB, one actually risks
hitting wrap-around during boot, which can both result in too short
delays (if the "st += delay" calculation makes st small) and
theoretically also unbound delays (if st ends up being UINT_MAX and
one just misses sampling digctl_microseconds at that point).
It doesn't take more code to DTRT, and once bitten, twice shy.
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Diffstat (limited to 'drivers/pci')
0 files changed, 0 insertions, 0 deletions