]> git.sur5r.net Git - u-boot/blobdiff - drivers/i2c/omap24xx_i2c.c
arm: a320evb: fixes for relocation support
[u-boot] / drivers / i2c / omap24xx_i2c.c
index a72d1a125702dd7f3f55ec2476a80b91ad6d7fea..215be3419d1b58326ee5a38a16bb7261c76e2a88 100644 (file)
@@ -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;
                }