diff options
author | Marek Vasut <marex@denx.de> | 2014-10-20 00:23:43 +0200 |
---|---|---|
committer | Heiko Schocher <hs@denx.de> | 2014-10-29 08:56:07 +0100 |
commit | 318a9cea4983260aae6505b2750e78c276a5451b (patch) | |
tree | 680faf4f642bdfa8f3184a4d2c88eb35de2eeb5a /drivers | |
parent | 58a7d1c12c71b661115f3fb75431b4157c63a641 (diff) |
i2c: mxs: Add support for I2C 1 on i.MX28
Add support for I2C bus 1 on the i.MX28.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Heiko Schocher <hs@denx.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/i2c/mxs_i2c.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/i2c/mxs_i2c.c b/drivers/i2c/mxs_i2c.c index d3cb7274f3..87e05c7125 100644 --- a/drivers/i2c/mxs_i2c.c +++ b/drivers/i2c/mxs_i2c.c @@ -26,7 +26,10 @@ static struct mxs_i2c_regs *mxs_i2c_get_base(struct i2c_adapter *adap) { - return (struct mxs_i2c_regs *)MXS_I2C0_BASE; + if (adap->hwadapnr == 0) + return (struct mxs_i2c_regs *)MXS_I2C0_BASE; + else + return (struct mxs_i2c_regs *)MXS_I2C1_BASE; } static unsigned int mxs_i2c_get_bus_speed(struct i2c_adapter *adap) @@ -311,3 +314,7 @@ U_BOOT_I2C_ADAP_COMPLETE(mxs0, mxs_i2c_init, mxs_i2c_probe, mxs_i2c_if_read, mxs_i2c_if_write, mxs_i2c_set_bus_speed, CONFIG_SYS_I2C_SPEED, 0, 0) +U_BOOT_I2C_ADAP_COMPLETE(mxs1, mxs_i2c_init, mxs_i2c_probe, + mxs_i2c_if_read, mxs_i2c_if_write, + mxs_i2c_set_bus_speed, + CONFIG_SYS_I2C_SPEED, 0, 1) |