aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/i2c/busses/i2c-au1550.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/i2c/busses/i2c-au1550.c b/drivers/i2c/busses/i2c-au1550.c
index d06edce03bf4..02a359ebc0f0 100644
--- a/drivers/i2c/busses/i2c-au1550.c
+++ b/drivers/i2c/busses/i2c-au1550.c
@@ -118,13 +118,19 @@ do_address(struct i2c_au1550_data *adap, unsigned int addr, int rd)
118 118
119 /* Reset the FIFOs, clear events. 119 /* Reset the FIFOs, clear events.
120 */ 120 */
121 sp->psc_smbpcr = PSC_SMBPCR_DC; 121 stat = sp->psc_smbstat;
122 sp->psc_smbevnt = PSC_SMBEVNT_ALLCLR; 122 sp->psc_smbevnt = PSC_SMBEVNT_ALLCLR;
123 au_sync(); 123 au_sync();
124 do { 124
125 stat = sp->psc_smbpcr; 125 if (!(stat & PSC_SMBSTAT_TE) || !(stat & PSC_SMBSTAT_RE)) {
126 sp->psc_smbpcr = PSC_SMBPCR_DC;
126 au_sync(); 127 au_sync();
127 } while ((stat & PSC_SMBPCR_DC) != 0); 128 do {
129 stat = sp->psc_smbpcr;
130 au_sync();
131 } while ((stat & PSC_SMBPCR_DC) != 0);
132 udelay(50);
133 }
128 134
129 /* Write out the i2c chip address and specify operation 135 /* Write out the i2c chip address and specify operation
130 */ 136 */