[U-Boot] [PATCH] imx-common: timer: fix 32-bit overflow

Stefano Babic sbabic at denx.de
Wed Mar 20 11:39:15 CET 2013


On 11/03/2013 07:44, Dirk Behme wrote:
> On 04.03.2013 15:16, Dirk Behme wrote:
>> From: Knut Wohlrab <knut.wohlrab at de.bosch.com>
>>
>> The i.MX6 common timer uses the 32-bit variable tbl (time base lower)
>> to record the overflow of the 32-bit counter. I.e. if the counter
>> overflows, the variable tbl does overflow, too.
>>
>> To capture this overflow, use the variable tbu (time base upper), too.
>> Return the combined value of tbl and tbu.
>>
>> lastinc is unused then, remove it.
>>
>> Signed-off-by: Knut Wohlrab <knut.wohlrab at de.bosch.com>
>> Signed-off-by: Dirk Behme <dirk.behme at de.bosch.com>
>> ---
>> Note: This replaces the patch
>>       http://patchwork.ozlabs.org/patch/224646/
>>
>>  arch/arm/imx-common/timer.c |   26 +++++++-------------------
>>  1 file changed, 7 insertions(+), 19 deletions(-)
>>
>> Index: freescale-u-boot-imx.git/arch/arm/imx-common/timer.c
>> ===================================================================

Applied to u-boot-imx, thanks.

Best regards,
Stefano Babic


-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================


More information about the U-Boot mailing list