update i2c drivers about 'set scl_rate'
authorkfx <kfx@rock-chips.com>
Tue, 22 Mar 2011 03:09:38 +0000 (11:09 +0800)
committerkfx <kfx@rock-chips.com>
Tue, 22 Mar 2011 03:09:38 +0000 (11:09 +0800)
drivers/i2c/busses/i2c-rk29.c

index 1d0be8d550dd2394c61bba94a7d4e28ccb6c5a63..efc129f0e0fa1102167bd5b4dd0f90cb07408e85 100755 (executable)
@@ -184,6 +184,7 @@ static void  rk29_i2c_clockrate(struct rk29_i2c_data *i2c)
        rk29_i2c_calcdivisor(i2c->i2c_rate, scl_rate, &real_rate, &rem, &exp);
 
        tmp = readl(i2c->regs + I2C_OPR);
+       tmp &= ~0x3f;
        tmp |= exp;
        tmp |= rem<<I2CCDVR_EXP_BITS;   
        writel(tmp, i2c->regs + I2C_OPR);