- void i2c_soft_reset(const struct fsl_i2c *dev )
- {
- volatile u8 cTmp;
-
- debug("\t@%08x: I2CCSR:%02x I2CCCR:%02x ", (int) dev, readb(&dev->sr), readb(&dev->cr));
-
- /* per 11.5.6 of 8548 UM */
- writeb(0x20, &dev->cr); //这里都是硬件规定,不要问为啥是0x20, 00100000这个值中已经申明了某一位置位
- udelay(1000);
- writeb(0xA0, &dev->cr); /* start condition */
- udelay(1000);
-
- cTmp = readb(&dev->dr); /* kick off the read 8 data + ack */
- debug("I2CCDR:%02x %s \n", cTmp, __FUNCTION__);
-
- writeb(0x0, &dev->cr); /* disable and leave it alone */
- udelay(1000);
-
- }
|