public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Wolfgang Grandegger <wg@grandegger.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] 85xx: Using proper I2C source clock divider for MPC8544
Date: Tue, 30 Sep 2008 10:55:57 +0200	[thread overview]
Message-ID: <48E1E99D.2000401@grandegger.com> (raw)

Measurements with our MPC8544 board showed that the I2C bus frequency
is wrong by a factor of 1.5. Obviously, the interpretation of the
MPC85xx_PORDEVSR2_SEC_CFG bit of the cfg_sec_freq register is not
correct. There seems to be an error in the 8544 RM.

Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
---
 cpu/mpc85xx/speed.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: u-boot/cpu/mpc85xx/speed.c
===================================================================
--- u-boot.orig/cpu/mpc85xx/speed.c
+++ u-boot/cpu/mpc85xx/speed.c
@@ -101,9 +101,9 @@ int get_clocks (void)
 	 * PORDEVSR2_SEC_CFG bit is 0 on all 85xx boards that are not an 8544.
 	 */
 	if (gur->pordevsr2 & MPC85xx_PORDEVSR2_SEC_CFG)
-		gd->i2c1_clk = sys_info.freqSystemBus / 3;
-	else
 		gd->i2c1_clk = sys_info.freqSystemBus / 2;
+	else
+		gd->i2c1_clk = sys_info.freqSystemBus / 3;
 #else
 	/* Most 85xx SOCs use CCB/2, so this is the default behavior. */
 	gd->i2c1_clk = sys_info.freqSystemBus / 2;

             reply	other threads:[~2008-09-30  8:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-30  8:55 Wolfgang Grandegger [this message]
2008-10-10  3:30 ` [U-Boot] [PATCH] 85xx: Using proper I2C source clock divider for MPC8544 Kumar Gala
2008-10-10  7:29   ` Wolfgang Grandegger
2008-10-10 14:09     ` Kumar Gala
2008-10-10 15:16       ` Wolfgang Grandegger
2008-10-14 19:11       ` Wolfgang Grandegger
2008-10-14 19:10         ` Kumar Gala
2008-10-14 19:25           ` Wolfgang Grandegger
2008-10-14 21:04             ` Kumar Gala
2008-10-14 21:38               ` Wolfgang Grandegger

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=48E1E99D.2000401@grandegger.com \
    --to=wg@grandegger.com \
    --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