]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
ARM: Davinci: Fix DM644x timer overflow handling and cleanup
authorDirk Behme <dirk.behme@googlemail.com>
Wed, 26 Mar 2008 08:53:29 +0000 (09:53 +0100)
committerJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Tue, 22 Apr 2008 21:12:01 +0000 (23:12 +0200)
commit80c40b765b3642ddb9f3392b7898715aab44a29c
treef5238b881170be5e46f2c6846593f72027edf898
parent58c5376ba67767ee684069d43e7f747a5d9ae8ed
ARM: Davinci: Fix DM644x timer overflow handling and cleanup

Fix ARM based DaVinci DM644x timer overflow handling and cleanup timer code.

Changes:

- Remove *_masked() functions as noted by Wolfgang

- Adapt register naming to recent TI spec (sprue26, March 2007)

- Fix reset_timer() handling

- As reported by Pieter [1] the overflow fix introduced a delay of factor 16 (e.g 2 seconds became 32). While the overflow fix is basically okay, it missed to divide udelay by 16, too. Fix this.

[1] http://article.gmane.org/gmane.comp.boot-loaders.u-boot/38179

- Remove software division of timer count value (DIV(x) macro) and do it in hardware (TIM_CLK_DIV).

Many thanks to Troy Kisky <troy.kisky@boundarydevices.com> and Pieter Voorthuijsen <pieter.voorthuijsen@Prodrive.nl> for the hints & testing!

Patch is compile tested with davinci_dvevm & sonata & schmoogie configuration and tested by Pieter on DaVinci EVM hardware.

Signed-off-by: Dirk Behme <dirk.behme@gmail.com>
Acked-by: Pieter Voorthuijsen <pieter.voorthuijsen@Prodrive.nl>
cpu/arm926ejs/davinci/timer.c