Skip to content
Snippets Groups Projects
Commit 318a9cea authored by Marek Vasut's avatar Marek Vasut Committed by Heiko Schocher
Browse files

i2c: mxs: Add support for I2C 1 on i.MX28


Add support for I2C bus 1 on the i.MX28.

Signed-off-by: default avatarMarek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Heiko Schocher <hs@denx.de>
parent 58a7d1c1
No related branches found
No related tags found
No related merge requests found
...@@ -26,7 +26,10 @@ ...@@ -26,7 +26,10 @@
static struct mxs_i2c_regs *mxs_i2c_get_base(struct i2c_adapter *adap) 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) 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, ...@@ -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_if_read, mxs_i2c_if_write,
mxs_i2c_set_bus_speed, mxs_i2c_set_bus_speed,
CONFIG_SYS_I2C_SPEED, 0, 0) 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)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment