public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [RFC] mpc83xx/speed.c
@ 2011-03-09 15:59 Andre Schwarz
  0 siblings, 0 replies; only message in thread
From: Andre Schwarz @ 2011-03-09 15:59 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-03-09 15:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-09 15:59 [U-Boot] [RFC] mpc83xx/speed.c Andre Schwarz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox