From: Pete Popov <ppopov@embeddedalley.com>
To: Clem Taylor <clem.taylor@gmail.com>
Cc: linux-mips@linux-mips.org
Subject: Re: mdelay() from board_setup() [is default value for loops_per_jiffy way off?]
Date: Wed, 20 Apr 2005 10:58:58 -0700 [thread overview]
Message-ID: <42669862.7000405@embeddedalley.com> (raw)
In-Reply-To: <ecb4efd10504201050a00f941@mail.gmail.com>
Clem Taylor wrote:
> Hi,
>
> I'm working on a linux port for a custom Au1550 based board. Inside of
> board_setup() I need to wait for some hardware to power up. So, I
> called mdelay(), but it seems to wait for far too short a time. It
> seems that loops_per_jiffy still has the default value (4096) in
> board_setup(), the computed value is more like 245248. So, what is the
> proper way to spin wait this early in the startup process? Also, isn't
> the default value for loops_per_jiffy off by quite a bit? I'm running
> the Au1550 at 492MHz, so that would make the default value good for a
> ~8MHz processor?
It's too early in board_setup() to use the standard delay routines. You can't
use those until after calibrate_delay() runs. To do precise delays in
board_setup, you'll have to do something yourself where you read the cp0 timer
periodically and wait a certain amount of time.
Pete
next prev parent reply other threads:[~2005-04-20 17:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-20 17:50 mdelay() from board_setup() [is default value for loops_per_jiffy way off?] Clem Taylor
2005-04-20 17:58 ` Pete Popov [this message]
2005-04-20 18:07 ` Ralf Baechle
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=42669862.7000405@embeddedalley.com \
--to=ppopov@embeddedalley.com \
--cc=clem.taylor@gmail.com \
--cc=linux-mips@linux-mips.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox