public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Clemens Koller <clemens.koller@anagramm.de>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] MPC85xx: Question about Local Bus initialization
Date: Mon, 03 Dec 2007 17:30:07 +0100	[thread overview]
Message-ID: <47542F0F.7050901@anagramm.de> (raw)
In-Reply-To: <474E8C99.90507@tqs.de>

 > Hi,
 >
 > I took a look into the files board/mpc8560ads.c and board/tqm85xx.c and
 > found something strange:
 >
 > 1. In the function local_bus_init() the current CLKDIV is read from the
 > register LCRR as was set by Hardreset. After that, the decision is made,
 > wether the DLL has to be enabled/disabled/overridden. Inside the if-else
 > blocks the new CLKDIV is changed. But IMO the CLKDIV has to be set
 > before the query.
 >
 > This is the current code:
 > 	clkdiv = lbc->lcrr & 0x0f;
 > 	lbc_hz = sysinfo.freqSystemBus / 1000000 / clkdiv;
 >
 > 	if (lbc_hz < 66) {
 > 		lbc->lcrr = CFG_LBC_LCRR | 0x80000000;	/* DLL Bypass */
 >
 > 	} else if (lbc_hz >= 133) {
 > 		lbc->lcrr = CFG_LBC_LCRR & (~0x80000000); /* DLL Enabled
 > 	...
 > This may be the situation on other 85xx boards, too. I didn't check them
 > all.
 > What was the intention, DLL modification dependent on the clock set by
 > the MPC at hardreset or dependent on the targeted frequency?

MPC8540 Reference Manual, Page 13-23, LCRR Field Descriptions:
"DLL bypass. This bit should be set when using low bus clock
frequencies if the DLL is unable to lock. When in DLL bypass mode,
incoming data is captured in the middle of the bus clock cycle."

Usually 85xx boot from Flash connected to the Local Bus, so the bootstrap
configuration out of a hard reset need to be correct at first place.
Then, if the bootloader (or later, the kernel) wants to (re-)set it
during runtime, it also has to set the DLL enable bit depending on the
desired target frequency.

Regards,
-- 
Clemens Koller
__________________________________
R&D Imaging Devices
Anagramm GmbH
Rupert-Mayer-Stra?e 45/1
Linhof Werksgel?nde
D-81379 M?nchen
Tel.089-741518-50
Fax 089-741518-19
http://www.anagramm-technology.com

  parent reply	other threads:[~2007-12-03 16:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-29  9:55 [U-Boot-Users] MPC85xx: Question about Local Bus initialization Jens Gehrlein
2007-12-03 15:39 ` Detlev Zundel
2007-12-04  7:56   ` Jens Gehrlein
2007-12-03 16:30 ` Clemens Koller [this message]
2007-12-04  7:56   ` Jens Gehrlein

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=47542F0F.7050901@anagramm.de \
    --to=clemens.koller@anagramm.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