Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[PATCH 7/8] fix the PMC based delay



Fix a typo in the delay loop time delta calculation.
---
 sys/arch/arm/arm32/arm11_pmc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sys/arch/arm/arm32/arm11_pmc.c b/sys/arch/arm/arm32/arm11_pmc.c
index d45f9e9..a4798c3 100644
--- a/sys/arch/arm/arm32/arm11_pmc.c
+++ b/sys/arch/arm/arm32/arm11_pmc.c
@@ -135,7 +135,7 @@ delay(u_int arg)
                        arm11_pmc_ctrl_write(ctrl);
                        delta += (last + (counts_per_wrap - cur));
                } else {
-                       delta += (last - cur);
+                       delta += (cur - last);
                }
                last = cur;
                if (delta >= COUNTS_PER_USEC) {
-- 
1.5.6.56.g29b0d



Home | Main Index | Thread Index | Old Index