From: 张晴 Date: Thu, 2 May 2013 08:30:48 +0000 (+0800) Subject: rk30:modify i2c_sram for debug X-Git-Tag: firefly_0821_release~7180 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=6f84d6735117c04a6287914b2f33fbb48bd4d07c;p=firefly-linux-kernel-4.4.55.git rk30:modify i2c_sram for debug --- diff --git a/arch/arm/mach-rk30/i2c_sram.c b/arch/arm/mach-rk30/i2c_sram.c index e91ed63b66bf..95fcf844ce97 100755 --- a/arch/arm/mach-rk30/i2c_sram.c +++ b/arch/arm/mach-rk30/i2c_sram.c @@ -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'); } }