Skip to content

Commit

Permalink
ARM: mach-shmobile: r8a7740: cleanup I2C workaround method
Browse files Browse the repository at this point in the history
Current workaround of I2C on r8a7740 used mdelay(),
but it was an overkill.
This patch cleans up the workaround delay.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Simon Horman <horms@verge.net.au>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
  • Loading branch information
Kuninori Morimoto authored and Rafael J. Wysocki committed May 12, 2012
1 parent 9f6b782 commit 4228716
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions arch/arm/mach-shmobile/setup-r8a7740.c
Original file line number Diff line number Diff line change
Expand Up @@ -350,19 +350,19 @@ static void r8a7740_i2c_workaround(struct platform_device *pdev)
i2c_write(reg, ICSTART, i2c_read(reg, ICSTART) | 0x10);
i2c_read(reg, ICSTART); /* dummy read */

mdelay(100);
udelay(10);

i2c_write(reg, ICCR, 0x01);
i2c_read(reg, ICCR);
i2c_write(reg, ICSTART, 0x00);
i2c_read(reg, ICSTART);

udelay(10);

i2c_write(reg, ICCR, 0x10);
mdelay(100);
udelay(10);
i2c_write(reg, ICCR, 0x00);
mdelay(100);
udelay(10);
i2c_write(reg, ICCR, 0x10);
mdelay(100);
udelay(10);

iounmap(reg);
}
Expand Down

0 comments on commit 4228716

Please sign in to comment.