mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: "Jan Lübbe" <jlu@pengutronix.de>
To: Daniel Schultz <d.schultz@phytec.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH v2 2/2] ARM: am335x: Changed timer
Date: Fri, 17 Jul 2015 11:16:14 +0200	[thread overview]
Message-ID: <1437124574.3498.73.camel@pengutronix.de> (raw)
In-Reply-To: <1437036707-48320-1-git-send-email-d.schultz@phytec.de>

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
low?

> +#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
MHz.

The advantage of using dmtimer0 is that it is always available and runs
at 32KiHz on every board.

Regards,
Jan
-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2015-07-17  9:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-16  8:51 Daniel Schultz
2015-07-17  9:16 ` Jan Lübbe [this message]
2015-07-17 13:44   ` Daniel Schultz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1437124574.3498.73.camel@pengutronix.de \
    --to=jlu@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=d.schultz@phytec.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox