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>
This commit is contained in:
Tetsuyuki Kobayashi 2012-09-13 19:07:59 +00:00 committed by Heiko Schocher
parent 3ce2703d8f
commit 020ec727a6
2 changed files with 19 additions and 1 deletions

View file

@ -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;
}