summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorTetsuyuki Kobayashi <koba@kmckk.co.jp>2012-09-13 19:07:59 +0000
committerHeiko Schocher <hs@denx.de>2012-10-16 05:47:20 +0200
commit020ec727a6bda10f47d69926814d476c0085e8a9 (patch)
tree45d2bed504be4461528081d6fb3594ec50c6344d /drivers
parent3ce2703d8f11b0b5c28409d8335f36bef258831b (diff)
downloadu-boot-imx-020ec727a6bda10f47d69926814d476c0085e8a9.zip
u-boot-imx-020ec727a6bda10f47d69926814d476c0085e8a9.tar.gz
u-boot-imx-020ec727a6bda10f47d69926814d476c0085e8a9.tar.bz2
i2c: sh_i2c.c: support I2C2, I2C3 and I2C4
sh_i2c.c support I2C0 and I2C1. This patch extends it to I2C4. Acked-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> Signed-off-by: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/i2c/sh_i2c.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/i2c/sh_i2c.c b/drivers/i2c/sh_i2c.c
index c667a1b..d50c8ec 100644
--- a/drivers/i2c/sh_i2c.c
+++ b/drivers/i2c/sh_i2c.c
@@ -184,6 +184,21 @@ int i2c_set_bus_num(unsigned int bus)
case 1:
base = (void *)CONFIG_SH_I2C_BASE1;
break;
+#ifdef CONFIG_SH_I2C_BASE2
+ case 2:
+ base = (void *)CONFIG_SH_I2C_BASE2;
+ break;
+#endif
+#ifdef CONFIG_SH_I2C_BASE3
+ case 3:
+ base = (void *)CONFIG_SH_I2C_BASE3;
+ break;
+#endif
+#ifdef CONFIG_SH_I2C_BASE4
+ case 4:
+ base = (void *)CONFIG_SH_I2C_BASE4;
+ break;
+#endif
default:
return -1;
}