rk30:modify i2c_sram for debug
author张晴 <zhangqing@rock-chips.com>
Thu, 2 May 2013 08:30:48 +0000 (16:30 +0800)
committer张晴 <zhangqing@rock-chips.com>
Thu, 2 May 2013 08:30:48 +0000 (16:30 +0800)
arch/arm/mach-rk30/i2c_sram.c

index e91ed63b66bf392cc2e15944ff79f2ed7b60622e..95fcf844ce973dfb9fcfb5efb3c42337a813407a 100755 (executable)
@@ -228,10 +228,19 @@ void __sramfunc sram_i2c_get_ipd_event(int type)
        do{
                sram_udelay(10);
                con = readl_relaxed(SRAM_I2C_ADDRBASE + I2C_IPD);
-       }while(((--time) & (~(con & type))));
+       }while(((--time) && (~(con & type))));
        writel_relaxed(type,SRAM_I2C_ADDRBASE + I2C_IPD);
        
        if(time <= 0){
+       if (type == I2C_STARTIPD){
+       sram_printch('S');
+       }else if (type == I2C_STOPIPD){
+       sram_printch('P');
+       }else if (type == I2C_MBTFIPD){
+       sram_printch('W');
+       }else if (type == I2C_MBRFIPD){
+       sram_printch('R');
+       }
        sram_printch('T');
        }
 }