[PATCH v2 2/2] ARM: am335x: Changed timer
d.schultz at phytec.de
Fri Jul 17 06:44:49 PDT 2015
Am 17.07.2015 um 11:16 schrieb Jan Lübbe:
> On Do, 2015-07-16 at 10:51 +0200, Daniel Schultz wrote:
>> The dmtimer0 is too inaccurate to be used for measurements.
>> We switch to the more accurate dmtimer2.
> What are you trying to measure? Is the resolution or the accuracy too
While testing with dhrystone on our boards, I figured out that the
timestamps from dmtimer0 run 20% too quick.
You can also make a quick test on a am335x board with
You will notice that the sleep only takes 8 seconds. This quite too
>> +#define CLK_M_OSC 25000000
>> +static int dmtimer_init(void)
>> + dmtimer_cs.mult = clocksource_hz2mult(CLK_M_OSC, dmtimer_cs.shift);
>> + /* Enable counter */
>> + writel(0x3, base + TCLR);
>> + return init_clock(&dmtimer_cs);
> You use a fixed M_OSC of 25 MHz, but this value actually depends on the
> the board. The AM335x supports 19.2, 24 and 26 MHz in addition to 25
see new patch.
> The advantage of using dmtimer0 is that it is always available and runs
> at 32KiHz on every board.
More information about the barebox