[U-Boot-Users] Problems with MPC8xx I2C (RTC)

Joakim Tjernlund joakim.tjernlund at lumentis.se
Mon Apr 14 11:47:15 CEST 2003


> I wrote:
> 
> > I am using u-boot-0.3.0, linuxppc-2.4.20 and a DS1338 I2C RTC with 
> > MPC8xx CPM I2C (CONFIG_HARD_I2C and i2c-algo-8xx).
> > 
> > To avoid the discribed I2C edge condition I changed u-boot form HARD to 
> > SOFT_I2C. Now when booting linux I get:
> > ...
> 
> I just cut & pasted the code from i2c-rpc.c. Apparently the lines
> 
> /* Check for and use a microcode relocation patch.        */
> if ((data->reloc = data->iip->iic_rpbase))
> 	data->iip = (iic_t *)&cp->cp_dpmem[data->iip->iic_rpbase];
> 
> caused the problem! Since I don't use the I added a #ifdef 
> USE_IIC_PATCH around this line just like DENX did in their i2c-r360.c.

This is not the only change needed. You should set data->reloc/iic_rpbase to zero if
you don't use the IIC_PATCH.

> 
> Now everything seems to be fine again! :o)
> 
> So sorry for the noise!
> 
> But again:
> 
> What do I need the UCODE_PATCH for?

You need it if you run ethernet on SCC1 and I2C simultaneously.

   Jocke





More information about the U-Boot mailing list