]> git.ipfire.org Git - people/ms/u-boot.git/commit
Nomadik: fix reset_timer()
authorAlessandro Rubini <rubini@unipv.it>
Wed, 25 Nov 2009 22:41:51 +0000 (23:41 +0100)
committertrix <trix@windriver.com>
Sat, 3 Apr 2010 20:24:27 +0000 (15:24 -0500)
commit4b894a97d307c3207af40031d9e820e2960de57f
tree45deb796599283759f8ec3b5d0a426f55fb6a037
parentf936aa0528fe4f5d86168575528e0c52b485c642
Nomadik: fix reset_timer()

Previous code was failing when reading back the timer less than
400us after resetting it. This lead nand operations to incorrectly
timeout any now and then.  Moreover, writing the load register isn't
immediately reflected in the value register. We must wait for a clock
edge, so read_timer now waits for the value to change at least once,
otherwise nand operation would timeout anyways (though less frequently).

Signed-off-by: Alessandro Rubini <rubini@unipv.it>
Acked-by: Andrea Gallo <andrea.gallo@stericsson.com>
cpu/arm926ejs/nomadik/timer.c