Commit 832a522a authored by Wolfram Sang's avatar Wolfram Sang Committed by Wolfram Sang

i2c: sh_mobile: use direct writes when accessing ICE bit

ICE bit is for resetting the module. Other bits don't matter then, so we
don't need to use the iic_set_clr() function but can use iic_wr().
Signed-off-by: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
parent 91a5e63e
...@@ -620,10 +620,10 @@ static int start_ch(struct sh_mobile_i2c_data *pd, struct i2c_msg *usr_msg, ...@@ -620,10 +620,10 @@ static int start_ch(struct sh_mobile_i2c_data *pd, struct i2c_msg *usr_msg,
if (do_init) { if (do_init) {
/* Initialize channel registers */ /* Initialize channel registers */
iic_set_clr(pd, ICCR, 0, ICCR_ICE); iic_wr(pd, ICCR, 0);
/* Enable channel and configure rx ack */ /* Enable channel and configure rx ack */
iic_set_clr(pd, ICCR, ICCR_ICE, 0); iic_wr(pd, ICCR, ICCR_ICE);
/* Set the clock */ /* Set the clock */
iic_wr(pd, ICCL, pd->iccl & 0xff); iic_wr(pd, ICCL, pd->iccl & 0xff);
...@@ -740,7 +740,7 @@ static int sh_mobile_i2c_xfer(struct i2c_adapter *adapter, ...@@ -740,7 +740,7 @@ static int sh_mobile_i2c_xfer(struct i2c_adapter *adapter,
} }
/* Disable channel */ /* Disable channel */
iic_set_clr(pd, ICCR, 0, ICCR_ICE); iic_wr(pd, ICCR, 0);
/* Disable clock and mark device as idle */ /* Disable clock and mark device as idle */
clk_disable_unprepare(pd->clk); clk_disable_unprepare(pd->clk);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment