diff options
author | Stephen Warren | 2013-12-05 12:08:09 -0700 |
---|---|---|
committer | Tom Rini | 2013-12-13 09:15:33 -0500 |
commit | 2cd1b57220697ac47e4a63fb6a0a79eda2217f9d (patch) | |
tree | 2991c29b493004fde9cc67c9ab5fc05d42675dea /arch/arm/cpu/armv7/zynq | |
parent | 74c43bb3d3fa322af17322384324c63c947bb124 (diff) |
time: fix usec_to_tick()
Commit 8dfafdde88eb ("Introduce common timer functions") created a
common definition of usec_to_tick() which had a couple problems:
static unsigned long long usec_to_tick(unsigned long usec)
{
uint64_t tick = usec * get_tbclk();
That likely overflows.
usec *= get_tbclk();
That was an attempt to fix it by performing the multiply after the
promotion of usec to 64-bit, but was applied to the wrong variable,
which was never used.
This patch fixes these issues. A user-visible symptom of the problem was
the e.g. "dhcp zImage" using an ASIX USB Ethernet dongle would print:
Waiting for Ethernet connection... unable to connect.
... with no delay before "unable to connect". There are likely other
symptoms.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Rob Herring <rob.herring@calxeda.com>
Diffstat (limited to 'arch/arm/cpu/armv7/zynq')
0 files changed, 0 insertions, 0 deletions