From: Andrew May <acmay@acmay.homeip.net>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Question about setting the sys clk freq based on a pull up on io.
Date: Tue, 18 Nov 2003 18:22:35 -0800 [thread overview]
Message-ID: <20031119022235.GA19892@acmay.homeip.net> (raw)
In-Reply-To: <3FBACF35.4020006@esteem.com>
On Tue, Nov 18, 2003 at 06:02:29PM -0800, Conn Clark wrote:
> Hello all,
>
> Our design is based on a 333MHz IBM405EP processor. We wish to
> detect the oscilator speed we are using via a pullup or pulldown resistor
> on an IO line. In order to make our product cheap we were planning to drive
.....
>
> My problem is how do I go about this without severly modifying
> U-Boots structure. In analyzing how to do this I determined that the
> configuration and reading of the IO pin sould be done in a
> board_pre_init function. This rases the issue of passing values between
> the init functions called by board_init_f. My second issue is how do I
> deal with the two frquencies since only one can be defined as
> CONFIG_SYS_CLK_FREQ(which is used in several places) without sticking
> lots of nasty board specific ifdefs through out the code.
>
I just have an old copy of the code to look at but for the 405 stuff
_SYS_CLK_FREQ is only used in C code so you can do this in the header
and c code.
#define CONFIG_SYS_CLK_FREQ get_sys_clk_freq()
unsigned int get_sys_clk_freq()
{
if( *ADDR == 0x1 )
return 25000000;
else
return 33333333;
}
next prev parent reply other threads:[~2003-11-19 2:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-19 2:02 [U-Boot-Users] Question about setting the sys clk freq based on a pull up on io Conn Clark
2003-11-19 2:22 ` Andrew May [this message]
2003-11-19 8:59 ` 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=20031119022235.GA19892@acmay.homeip.net \
--to=acmay@acmay.homeip.net \
--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