From: Steven Scholz <steven.scholz@imc-berlin.de>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] waiting for timeouts in FPGA code?
Date: Wed, 25 Feb 2004 10:05:39 +0100 [thread overview]
Message-ID: <403C6563.3020806@imc-berlin.de> (raw)
In-Reply-To: <20040224222555.D7A8BC0655@atlas.denx.de>
Wolfgang Denk wrote:
> In message <403B84DB.40900@imc-berlin.de> you wrote:
>
>>in the U-Boot FPGA code timeouts are realized by
>>
>>if (get_timer (ts) > CFG_FPGA_WAIT{_INIT})
>> ...
>>
>>while CFG_FPGA_WAIT{_INIT} is supposed to be the timeout in milliseconds.
>
> Then this design is broken; get_timer() returns the number of timer
> ticks (= CFG_HZ per second). This is only milliseconds for CFG_HZ ==
> 1000.
So I does not matter how fast the timer ticks as long as CFG_HZ is set
to the correct value and timeouts are based on CFG_HZ. Correct?
>>This does not work for the AT91RM9200. Instead of using
>>
>>#define CFG_FPGA_WAIT 10
>>
>>I have to use
>>
>>#define CFG_FPGA_WAIT CFG_HZ/10
>
> Note that this is ten times as long as the original timeout.
Of course. Typo.
>>Is CFG_HZ defined for all other architectures?
> It is supposed to be defined. But many boards define it incorrectly.
>>Should we use CFG_HZ instead of hardcoded numbers?
> Definitely.
Hmm. But that means that when we change e.g. the above mentioned FPGA
code to use CFG_HZ that we might break these archictectures !?
--
Steven Scholz
imc Measurement & Control imc Me?systeme GmbH
Voltastr. 5 Voltastr. 5
13355 Berlin 13355 Berlin
Germany Deutschland
next prev parent reply other threads:[~2004-02-25 9:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-24 17:07 [U-Boot-Users] waiting for timeouts in FPGA code? Steven Scholz
2004-02-24 22:25 ` Wolfgang Denk
2004-02-25 9:05 ` Steven Scholz [this message]
2004-02-27 0:00 ` Wolfgang Denk
2004-02-25 12:49 ` Steven Scholz
2004-02-27 0:09 ` Wolfgang Denk
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=403C6563.3020806@imc-berlin.de \
--to=steven.scholz@imc-berlin.de \
--cc=u-boot@lists.denx.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