#include "omap24xx_i2c.h"
+DECLARE_GLOBAL_DATA_PTR;
+
#define I2C_TIMEOUT 1000
static void wait_for_bb (void);
void i2c_init (int speed, int slaveadd)
{
- DECLARE_GLOBAL_DATA_PTR;
int psc, fsscll, fssclh;
int hsscll = 0, hssclh = 0;
u32 scll, sclh;
while (1) {
status = wait_for_pin();
- if (status == 0) {
+ if (status == 0 || status & I2C_STAT_AL) {
res = 1;
goto probe_exit;
}