From: Grant Likely <grant.likely@secretlab.ca>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] uboot clock configuration on mpc5200 boards
Date: Tue, 20 Nov 2007 19:16:08 -0700 [thread overview]
Message-ID: <fa686aa40711201816n64f43095kf447c0037f472156@mail.gmail.com> (raw)
In-Reply-To: <9e4733910711201700o75f74c20k243b42d2595491dd@mail.gmail.com>
On 11/20/07, Jon Smirl <jonsmirl@gmail.com> wrote:
> On the Linux kernel the mpc52xx_setup_cpu() function used to do this
> fix up. Does uboot handle this for mpc5200 boards? If so, which
> version?
>
> uboot is accessing these registers but it is not clear to me if the
> clocks are completely being set up.
>
> The 5200lite code has been changed to this:
>
> /*
> * Fix clock configuration.
> *
> * Firmware is supposed to be responsible for this. If you are creating a
> * new board port, do *NOT* duplicate this code. Fix your boot firmware
> * to set it correctly in the first place
> */
> static void __init
> lite5200_fix_clock_config(void)
> {
----8<----snip---->8----
> }
>
> Is uboot setting this up correct now that they kernel has been changed?
>
Strictly speaking; firmware should be responsible for configuring the
SoC (clocks, pinouts, etc). It makes it easier to add new boards if
each one doesn't need it's own fixups.
I haven't checked the clock setup for lite5200 in u-boot yet, but it
is not a complex change. And even if I do change it for the lite5200
in u-boot; this code probably won't go away in the kernel so as not to
break compatibility with lite5200's with older u-boot firmware.
The point is that firmware should setup the CPU correctly at boot. It
should not be Linux's responsibility. However, if there is *existing*
firmware that needs to be supported; then I'll grudgingly accept hacks
like this to keep the board bootable. If it is a new board, do it
right the first time and do it in firmware (be it u-boot or otherwise)
Cheers,
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely at secretlab.ca
(403) 399-0195
next prev parent reply other threads:[~2007-11-21 2:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-10 23:12 [U-Boot-Users] uboot clock configuration on mpc5200 boards Jon Smirl
[not found] ` <9e4733910711201700o75f74c20k243b42d2595491dd@mail.gmail.com>
2007-11-21 2:16 ` Grant Likely [this message]
2007-11-21 2:37 ` Jon Smirl
2007-11-21 7:01 ` Robert Schwebel
2007-11-21 11:21 ` Wolfgang Denk
2007-11-21 12:14 ` Robert Schwebel
2007-11-21 13:00 ` Wolfgang Denk
2007-11-21 13:41 ` Robert Schwebel
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=fa686aa40711201816n64f43095kf447c0037f472156@mail.gmail.com \
--to=grant.likely@secretlab.ca \
--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