commit | 82213d8bead358c8addaf16e974bb80cec3eb148 | [log] [tgz] |
---|---|---|
author | Simon Glass <sjg@chromium.org> | Thu Jul 09 18:43:14 2020 -0600 |
committer | Bin Meng <bmeng.cn@gmail.com> | Fri Jul 17 14:32:24 2020 +0800 |
tree | 1361a00a2d8d7a282be4e6c529539ecd8acabc70 | |
parent | a78518506b5875037ce9471713c488fa25ddbed1 [diff] |
timer: Allow delays with a 32-bit microsecond timer The current get_timer_us() uses 64-bit arithmetic on 32-bit machines. When implementing microsecond-level timeouts, 32-bits is plenty. Add a new function that uses an unsigned long. On 64-bit machines this is still 64-bit, but this doesn't introduce a penalty. On 32-bit machines it is more efficient. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>