Exynos: Change get_timer() to work correctly
authorSimon Glass <sjg@chromium.org>
Thu, 28 Mar 2013 04:32:16 +0000 (04:32 +0000)
committerMinkyu Kang <mk7.kang@samsung.com>
Mon, 1 Apr 2013 05:02:08 +0000 (14:02 +0900)
commit3d00c0cb96ff93a929700b80d89cb905e5ab5315
tree4e15549394ed5b4b6c30becec48ef2d0a928e604
parent4f3bfa97c4b8f88f44aa946427eb9be12b296c96
Exynos: Change get_timer() to work correctly

At present get_timer() does not return sane values. It should count up
smoothly in milliscond intervals.

We can change the PWM to count down at 1MHz, providing a resolution
of 1us and a range of about an hour between required get_timer() calls.

Test with command "sf probe 1:0; time sf read 40008000 0 1000".
Try with different numbers of bytes and see that sane values are obtained

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Akshay Saraswat <akshay.s@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
arch/arm/cpu/armv7/s5p-common/pwm.c
arch/arm/cpu/armv7/s5p-common/timer.c