[U-Boot] PPC4XX Custom Board - Failing to read I2C

txcotrader txcotrader at gmail.com
Mon Apr 8 16:16:33 CEST 2013


Sefan,

Thanks for the suggestion, I2C_BASE_ADDR is the same in both versions. After
doing some more digging, I can see why v2013.01.01 is not passing
i2c_transfer. The following routine yields different results in the 2
versions:

v2013.01.01-
   do {
            /* Get status */
            status = in_8(&i2c->sts);
            printf("gd_ do status->i = %x, status = %d, IIC_STS = %x\n", i,
status, &i2c->sts);
            udelay(10);
            i--;
        } while ((status & IIC_STS_PT) && !(status & IIC_STS_ERR) &&
             (i > 0));

Result: gd_ do status->i = 80, status = 4, IIC_STS = ef600408

v1.7.02-
   do {
            /* Get status */
            status = in_8((u8 *)IIC_STS);
            printf("gd_ do status->i = %d, status = %d, IIC_STS = %x\n", i,
status, IIC_STS);
            udelay(10);
            i--;
        } while ((status & IIC_STS_PT) && !(status & IIC_STS_ERR) && (i >
0));

Result: gd_ do status->i = 80, status = 40, IIC_STS = ef600408

So in v2013.01.01 (status & IIC_STS_ERR) == 1, versus a (status &
IIC_STS_ERR) == 0 in v1.7.02. Am I missing some sort of offset config
someplace? Once again, any help is greatly appreciated.

Thank you!
Greg






--
View this message in context: http://u-boot.10912.n7.nabble.com/PPC4XX-Custom-Board-Failing-to-read-I2C-tp151298p151814.html
Sent from the U-Boot mailing list archive at Nabble.com.


More information about the U-Boot mailing list