diff options
author | Tien Fong Chee <tfchee@pg-tfchee-lv.altera.com> | 2015-05-21 12:41:37 +0800 |
---|---|---|
committer | Tien Fong Chee <tfchee@pg-tfchee-lv.altera.com> | 2015-05-21 12:41:37 +0800 |
commit | 0c350d8a3d0516ccb7f50180b2afc5bb902e0a1a (patch) | |
tree | 663935acea740185403896c6597a76977f245b55 | |
parent | eed1ab6bb894b8d1e0740735283d97ff8a3a7957 (diff) | |
download | u-boot-socfpga-0c350d8a3d0516ccb7f50180b2afc5bb902e0a1a.tar.gz |
FogBugz #260361: Fixed intermittent QSPI flash erase failures
This patch fixed the overflow formula in get_timer_count_masked.
This bug can cause QSPI flash failed to erase and time out
intermittent during the process of erasing.
Signed-off-by: Tien Fong Chee <tfchee@pg-tfchee-lv.altera.com>
-rw-r--r-- | arch/arm/cpu/armv7/socfpga-common/timer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/cpu/armv7/socfpga-common/timer.c b/arch/arm/cpu/armv7/socfpga-common/timer.c index 0c7817462d..2ae54c6547 100644 --- a/arch/arm/cpu/armv7/socfpga-common/timer.c +++ b/arch/arm/cpu/armv7/socfpga-common/timer.c @@ -122,7 +122,7 @@ ulong get_timer_count_masked(void) gd->arch.tbl += gd->arch.lastinc - now; } else { /* we have overflow of the count down timer */ - gd->arch.tbl += TIMER_LOAD_VAL - gd->arch.lastinc + now; + gd->arch.tbl += TIMER_LOAD_VAL - now + gd->arch.lastinc; } gd->arch.lastinc = now; return gd->arch.tbl; |