public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH] PPC440EPx: Reconfigure PLL for 667MHz processor
Date: Sat, 16 Feb 2008 06:58:11 +0100	[thread overview]
Message-ID: <200802160658.11949.sr@denx.de> (raw)
In-Reply-To: <1202231299-26820-1-git-send-email-mike@terascala.com>

Hi Mike,

sorry for the late response.

On Tuesday 05 February 2008, Mike Nuss wrote:
> On PPC440EPx without a bootstrap I2C EEPROM, the PLL can be reconfigured
> after startup in order to change the speed of the clocks. This patch adds
> the option CONFIG_667MHZ. If set, it will set the clocks to run at full
> speed on a 667MHz PPC440EPx without the need for an external EEPROM.

I think it makes sense to move these PLL checking/reconfiguration stuff into a 
separate function. Perhaps like this:

In you board config file:

#define CFG_PLL_RECONFIG	667	/* comment please */


And in cpu_init.c:

#ifndef CFG_PLL_RECONFIG
#define CFG_PLL_RECONFIG	0
#endif

void reconfigure_pll(u32 new_cpu_freq)
{
#if defined(CONFIG_440EPX)
	if (new_cpu_freq == 667) {
		...
		your code here...
		...
	}
#endif
}

void
cpu_init_f (void)
{
#if defined(CONFIG_WATCHDOG)
        unsigned long val;
#endif

	reconfigure_pll(CFG_PLL_RECONFIG);
	...

I think this is clearer. What do you think? Please clean up and resend.

Thanks.

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================

  reply	other threads:[~2008-02-16  5:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-05 17:08 [U-Boot-Users] [PATCH] PPC440EPx: Reconfigure PLL for 667MHz processor Mike Nuss
2008-02-16  5:58 ` Stefan Roese [this message]
2008-02-17 18:02   ` Mike Nuss

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=200802160658.11949.sr@denx.de \
    --to=sr@denx.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