[PATCH 2/2] clocksource: dw_apb_timer_of: Fix read_sched_clock
Jamie Iles
jamie at jamieiles.com
Tue Jun 18 05:23:33 EDT 2013
Hi Dinh,
On Mon, Jun 17, 2013 at 07:08:49PM -0500, dinguyen at altera.com wrote:
> From: Dinh Nguyen <dinguyen at altera.com>
>
> The read_sched_clock should return the ~value because the clock is a
> countdown implementation. read_sched_clock() should be the same as
> __apbt_read_clocksource().
>
> If a separate timer for the sched_clock exist, then read_sched_clock()
> will return an incorrect value. The (sched_io_base + 0x4) needs to be in
> the function for both cases.
Actually the old behaviour is correct for picoxcell as we're using the
DesignWare RTC rather than the counter block and the RTC does count
upwards, but your change will work as we'll start using the regular
timers anyway.
Looks good to me though.
Acked-by: Jamie Iles <jamie at jamieiles.com>
for the series.
Jamie
More information about the linux-arm-kernel
mailing list