Hi, Heiko,

> Date: Mon, 5 Sep 2011 08:29:58 +0200
> From: [email protected]
> Subject: Re: [U-Boot] [MPC8379E-rdb] Question about master bus busy after 
> enabling I2C.
> To: [email protected]
> CC: [email protected]
> 
> Hello shawn,
> 
> shawn Bai wrote:
> > Hi, here is a question about I2C initialization.
> >  
> > I2C driver of our own references i2c driver implemented in fsl_i2c.c
> >  
> > The init flow is almost the same.
> >  
> > After writing enable-bit MEN into i2c control register to enable I2C 
> > controler, 
> >  
> > sometimes, Bit 2 in i2c status, MBB bit, will be set, indicating i2c master 
> > bus busy.
> >  
> > And this will cause wait4bus return with failing.
> >  
> > Is there anyone around who used to face this question?
> >  
> > Or is there any suggestion or advice anyway?
> 
> Try a look in u-boot/doc/I2C_Edge_Conditions. Maybe your I2C bus
> is left in a blocked state, so try to deblock it. As for an example
> look in
> 
> board/keymile/common/common.c
> 
> There is a deblock sequence also for MPC83xx, maybe this helps you.

It seems that the deblock sequence is implemented in function called 
i2c_make_abort, isn't it ?

I find there are some us delays with calling udelay(DELAY_ABORT_SEQ).

And the DELAY_ABORT_SEQ duration is calculated from the i2c bus speed.

Actually, 
We have inserted udelay(100) prior to the statement enabling MEN and right 
after it before in code of our own 
when the question comes.

I will review the code to make this duration more suitable for the i2c speed 
specified.

Thanks.

Best Regards, 

--Shawn

> 
> bye,
> Heiko
> -- 
> DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
                                          
_______________________________________________
U-Boot mailing list
[email protected]
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to