summaryrefslogtreecommitdiff
path: root/drivers/i2c
diff options
context:
space:
mode:
authorTetsuyuki Kobayashi <koba@kmckk.co.jp>2012-09-13 19:07:58 +0000
committerHeiko Schocher <hs@denx.de>2012-10-16 05:47:20 +0200
commit3ce2703d8f11b0b5c28409d8335f36bef258831b (patch)
treee9e461eae690f7fa90738961d712575a59583959 /drivers/i2c
parent57d7c80472d8c87f7c6d321f89a5aed47c865b5a (diff)
downloadu-boot-imx-3ce2703d8f11b0b5c28409d8335f36bef258831b.zip
u-boot-imx-3ce2703d8f11b0b5c28409d8335f36bef258831b.tar.gz
u-boot-imx-3ce2703d8f11b0b5c28409d8335f36bef258831b.tar.bz2
i2c: sh_i2c.c: adjust for SH73A0
Adjust i2c_raw_read() in sh_i2c.c to work for SH73A0. After this patch, "i2c md" and "i2c mw" command on U-Boot work properly on KZM-A9-GT board. Acked-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> Signed-off-by: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/sh_i2c.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/i2c/sh_i2c.c b/drivers/i2c/sh_i2c.c
index eced61d..c667a1b 100644
--- a/drivers/i2c/sh_i2c.c
+++ b/drivers/i2c/sh_i2c.c
@@ -135,8 +135,12 @@ static u8 i2c_raw_read(struct sh_i2c *base, u8 id, u8 reg)
{
u8 ret;
+#if defined(CONFIG_SH73A0)
+ i2c_set_addr(base, id, reg, 0);
+#else
i2c_set_addr(base, id, reg, 1);
udelay(100);
+#endif
writeb((SH_I2C_ICCR_ICE|SH_I2C_ICCR_RTS|SH_I2C_ICCR_BUSY), &base->iccr);
irq_dte(base);