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

Hi there,
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:
---------------------------------------------------------------------- i2c-core.o: i2c core module i2c-dev.o: i2c /dev entries driver module i2c-algo-8xx.o: i2c mpc8xx algorithm module version 2.6.1 (20010830) i2c-rpx.o: i2c RPX Lite module i2c-dev.o: Registered 'rpx' as minor 0 Machine check in kernel mode. Caused by (from SRR1=9032): Transfer error ack signal Oops: machine check, sig: 7 NIP: C00D9320 XER: 80007E29 LR: C00D9ECC SP: C0FFDF50 REGS: c0ffdea0 TRAP: 0200 Not tainted MSR: 00009032 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 11 TASK = c0ffc000[1] 'swapper' Last syscall: 120 last math 00000000 last altivec 00000000 GPR00: 00000000 C0FFDF50 C0FFC000 C0176C40 00001032 00000001 C0191DFE 00000027 GPR08: 000004FA C0190000 00000000 C0FFDE40 00000001 10000000 00FE5E00 007FFF2D GPR16: 00000000 00000001 007FFF00 FFFFFFFF 00FE1A30 00000000 00FA0790 00000001 GPR24: 00000000 007FFEC0 00000000 007FFF2D C018EA70 C0176C40 FFF00860 FFF06C3A Call backtrace: C0190000 C00D9ECC C0188804 C0188630 C0185CEC C0180588 C01805D0 C000227C C0004C60 Kernel panic: Attempted to kill init! ----------------------------------------------------------------------
Backtrace tells me
0xc0190000 -- 0xc018cb2c + 0x34d4 init_sunrpc 0xc00d9ecc -- 0xc00d9e68 + 0x0064 i2c_8xx_add_bus 0xc0188804 -- 0xc01887d4 + 0x0030 i2c_rpx_init 0xc0188630 -- 0xc0188614 + 0x001c i2c_init_all 0xc0185cec -- 0xc0185ca4 + 0x0048 chr_dev_init 0xc0180588 -- 0xc0180558 + 0x0030 do_initcalls 0xc01805d0 -- 0xc01805a8 + 0x0028 do_basic_setup 0xc000227c -- 0xc0002268 + 0x0014 init 0xc0004c60 -- 0xc0004c34 + 0x002c kernel_thread
Did that happen to anyone else?
Do I actually need the I2C_UCODE_PATCH for something?
Thanks,
Steven

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.
Now everything seems to be fine again! :o)
So sorry for the noise!
But again:
What do I need the UCODE_PATCH for?
Thanks,
Steven

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
participants (2)
-
Joakim Tjernlund
-
Steven Scholz