aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-shmobile/setup-r8a7740.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2012-04-13 05:41:06 -0400
committerRafael J. Wysocki <rjw@sisk.pl>2012-05-12 16:23:59 -0400
commit4228716c87f7915410721952bad3e568fb5f2431 (patch)
treef64f189525820271fdb66366677e945419378604 /arch/arm/mach-shmobile/setup-r8a7740.c
parent9f6b78223b7b49bc06d2e84b15d48f02206ec3c3 (diff)
ARM: mach-shmobile: r8a7740: cleanup I2C workaround method
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>
Diffstat (limited to 'arch/arm/mach-shmobile/setup-r8a7740.c')
-rw-r--r--arch/arm/mach-shmobile/setup-r8a7740.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c
index 14edb5cffa7f..34a1548dbda6 100644
--- a/arch/arm/mach-shmobile/setup-r8a7740.c
+++ b/arch/arm/mach-shmobile/setup-r8a7740.c
@@ -350,19 +350,19 @@ static void r8a7740_i2c_workaround(struct platform_device *pdev)
350 i2c_write(reg, ICSTART, i2c_read(reg, ICSTART) | 0x10); 350 i2c_write(reg, ICSTART, i2c_read(reg, ICSTART) | 0x10);
351 i2c_read(reg, ICSTART); /* dummy read */ 351 i2c_read(reg, ICSTART); /* dummy read */
352 352
353 mdelay(100); 353 udelay(10);
354 354
355 i2c_write(reg, ICCR, 0x01); 355 i2c_write(reg, ICCR, 0x01);
356 i2c_read(reg, ICCR);
357 i2c_write(reg, ICSTART, 0x00); 356 i2c_write(reg, ICSTART, 0x00);
358 i2c_read(reg, ICSTART); 357
358 udelay(10);
359 359
360 i2c_write(reg, ICCR, 0x10); 360 i2c_write(reg, ICCR, 0x10);
361 mdelay(100); 361 udelay(10);
362 i2c_write(reg, ICCR, 0x00); 362 i2c_write(reg, ICCR, 0x00);
363 mdelay(100); 363 udelay(10);
364 i2c_write(reg, ICCR, 0x10); 364 i2c_write(reg, ICCR, 0x10);
365 mdelay(100); 365 udelay(10);
366 366
367 iounmap(reg); 367 iounmap(reg);
368} 368}