X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=drivers%2Fi2c%2Fomap24xx_i2c.c;h=215be3419d1b58326ee5a38a16bb7261c76e2a88;hb=5eb522a68c3573419f42e321dccf4b01b584dbe8;hp=a72d1a125702dd7f3f55ec2476a80b91ad6d7fea;hpb=fbad3555624a738a632ddb1b968e98a20e743941;p=u-boot diff --git a/drivers/i2c/omap24xx_i2c.c b/drivers/i2c/omap24xx_i2c.c index a72d1a1257..215be3419d 100644 --- a/drivers/i2c/omap24xx_i2c.c +++ b/drivers/i2c/omap24xx_i2c.c @@ -27,6 +27,8 @@ #include "omap24xx_i2c.h" +DECLARE_GLOBAL_DATA_PTR; + #define I2C_TIMEOUT 1000 static void wait_for_bb (void); @@ -40,7 +42,6 @@ static unsigned int current_bus; void i2c_init (int speed, int slaveadd) { - DECLARE_GLOBAL_DATA_PTR; int psc, fsscll, fssclh; int hsscll = 0, hssclh = 0; u32 scll, sclh; @@ -329,7 +330,7 @@ int i2c_probe (uchar chip) while (1) { status = wait_for_pin(); - if (status == 0) { + if (status == 0 || status & I2C_STAT_AL) { res = 1; goto probe_exit; }