]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
imx-common: timer: fix 32-bit overflow
authorKnut Wohlrab <knut.wohlrab@de.bosch.com>
Mon, 4 Mar 2013 04:16:02 +0000 (04:16 +0000)
committerStefano Babic <sbabic@denx.de>
Wed, 20 Mar 2013 10:36:11 +0000 (11:36 +0100)
commit982a3c410e21f2f7e5fee22c7fd788fc7ef7fdf9
treecd2ea4e5f0a36010f09206c07de6dfc62784dcd7
parent40f1daa0b797e9db7413cf477637ba8d31cbb2d7
imx-common: timer: fix 32-bit overflow

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@de.bosch.com>
Signed-off-by: Dirk Behme <dirk.behme@de.bosch.com>
Acked-by: Stefano Babic <sbabic@denx.de>
arch/arm/imx-common/timer.c