]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
Xilinx: ARM: i2c: Disable restart in i2c read
authorJoe Hershberger <joe.hershberger@ni.com>
Tue, 28 Feb 2012 19:02:18 +0000 (13:02 -0600)
committerJagan <jaganna@xilinx.com>
Thu, 31 May 2012 07:42:56 +0000 (13:12 +0530)
It doesn't seem to work.  Hardware bug?

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
drivers/i2c/zynq_i2c.c

index 4b8c5cab5b1830440aeabf0d440a8d3b27e8f25b..084cd27a47d2669e9fd7cac6cfb8b77071292d9b 100644 (file)
@@ -216,7 +216,10 @@ int i2c_read(u8 dev, uint addr, int alen, u8 *data, int length)
        /* Write the register address */
        Xsetbits_le32(&zynq_i2c->control, ZYNQ_I2C_CONTROL_CLR_FIFO |
                ZYNQ_I2C_CONTROL_HOLD);
-       Xclrbits_le32(&zynq_i2c->control, ZYNQ_I2C_CONTROL_RW);
+       /* Temporarily disable restart (by clearing hold)... */
+       /* It doesn't seem to work. */
+       Xclrbits_le32(&zynq_i2c->control, ZYNQ_I2C_CONTROL_RW |
+               ZYNQ_I2C_CONTROL_HOLD);
        Xout_le32(&zynq_i2c->interrupt_status, 0xFF);
        while (alen--)
                Xout_le32(&zynq_i2c->data, addr >> (8*alen));