All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andre Schwarz <andre.schwarz@matrix-vision.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC] mpc83xx/speed.c
Date: Wed, 09 Mar 2011 16:59:20 +0100	[thread overview]
Message-ID: <4D77A3D8.6000907@matrix-vision.de> (raw)

I have an issue with i2c-1 bus speed not being calculated correctly on 
MPC8377.

arch/powerpc/cpu/mpc83xx/speed.c lines 320+ are :

#if defined(CONFIG_MPC834x)
         i2c1_clk = tsec2_clk;
#elif defined(CONFIG_MPC8360)
         i2c1_clk = csb_clk;
#elif defined(CONFIG_MPC832x)
         i2c1_clk = enc_clk;
#elif defined(CONFIG_MPC8308) || defined(CONFIG_MPC831x)
         i2c1_clk = enc_clk;
#elif defined(CONFIG_FSL_ESDHC)
         i2c1_clk = sdhc_clk;
#endif


I don't have CONFIG_FSL_ESDHC set ... we're running SPI.
i2c1_clk doesn't get set.


According to the manual the i2c-1 clock source is somewhat ambiguous 
(MPC8379RM p.211) :

a. I2C1 clock is tied to SDHCCM
b. I2C1 clock is tied to ENCCM

I have CSB=333MHz and ENCCM=3 resulting in 111MHz i2c1 clock.

Would it be appropriate to add

#elif defined(CONFIG_MPC837x)
     i2c1_clk = enc_clk;

before the final #endif ?


BTW: Does anybody know which clock setting (SDHCCM or ENCCM) has priority ?

-- 

Regards,
Andre



MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler
Registergericht: Amtsgericht Stuttgart, HRB 271090
Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner

                 reply	other threads:[~2011-03-09 15:59 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=4D77A3D8.6000907@matrix-vision.de \
    --to=andre.schwarz@matrix-vision.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.