From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heiko Schocher Date: Mon, 05 Sep 2011 08:29:58 +0200 Subject: [U-Boot] [MPC8379E-rdb] Question about master bus busy after enabling I2C. In-Reply-To: References: Message-ID: <4E646C66.5080701@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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. bye, Heiko -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany