All of lore.kernel.org
 help / color / mirror / Atom feed
From: bjorn.forsman@gmail.com (Bjørn Forsman)
To: linux-arm-kernel@lists.infradead.org
Subject: [Openpxa-users] Linux udelay() is way off
Date: Fri, 21 Jan 2011 18:56:28 +0100	[thread overview]
Message-ID: <AANLkTinOjqgxf7zEhYM35iTrv9Eo_rq8feYaXrqjhAiR@mail.gmail.com> (raw)
In-Reply-To: <4D3935D2.4050307@codeaurora.org>

2011/1/21 Saravana Kannan <skannan@codeaurora.org>:

[snip]

> The most likely scenario seems to be that the CPU freq driver that's
> specific to your CPU is not setting the CPU to the frequency it thinks it's
> setting it to. It might THINK it's running at 624 MHz, but it might really
> be at 310 MHz or 100 MHz or something. Since, if the frequency at which the
> calibration was done or if the new frequencies are not what really what they
> are reported to be, then the math will go wrong and you would see these kind
> of issues.

Yes, I'm thinking the same.

> If you can somehow measure your CPU freq with an oscilloscope, measure these
> two:
> - Just before calibrate_delay is run for the first time.
> - When you are seeing the udelay to be wrong.
>
> One of these two won't match what you think the CPU is running at.

The processor has an external 13 MHz crystal and the CPU frequency is
set by internal multipliers. I don't think the actual CPU clock (after
multipliers) is available on any of the chip pins. But thanks for the
tip.

Best regards,
Bj?rn Forsman

      reply	other threads:[~2011-01-21 17:56 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <AANLkTin_cCzNWhJnD=A2h1qiKpeUrnPrSZPs_Kmfjjd1@mail.gmail.com>
2011-01-20 17:00 ` [Openpxa-users] Linux udelay() is way off Marek Vasut
2011-01-20 17:55   ` Russell King - ARM Linux
2011-01-20 19:18     ` Bjørn Forsman
2011-01-20 19:30       ` Russell King - ARM Linux
2011-01-20 20:25         ` Bjørn Forsman
2011-01-20 22:10           ` Russell King - ARM Linux
2011-01-21  0:02             ` Bjørn Forsman
2011-01-21 17:46         ` Bjørn Forsman
2011-01-21 18:11           ` Marek Vasut
2011-01-21 18:55             ` Bjørn Forsman
2011-01-23 10:35           ` Marek Vasut
2011-01-25 17:45             ` Bjørn Forsman
2011-01-25 20:18               ` Marek Vasut
2011-01-21  7:29       ` Saravana Kannan
2011-01-21 17:56         ` Bjørn Forsman [this message]

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=AANLkTinOjqgxf7zEhYM35iTrv9Eo_rq8feYaXrqjhAiR@mail.gmail.com \
    --to=bjorn.forsman@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.