drivers: i2c: mxc: Add early init

Add early i2c init function with conservative divider when the exact
clock rate is not available.

Signed-off-by: Yuan Yao <yao.yuan@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
This commit is contained in:
Yuan Yao
2016-06-08 18:24:51 +08:00
committed by York Sun
parent 30677deefd
commit 9d10c2d3fe
3 changed files with 35 additions and 0 deletions

View File

@@ -701,6 +701,9 @@ extern struct i2c_bus_hose i2c_bus[];
* Initialization, must be called once on start up, may be called
* repeatedly to change the speed and slave addresses.
*/
#ifdef CONFIG_SYS_I2C_EARLY_INIT
void i2c_early_init_f(void);
#endif
void i2c_init(int speed, int slaveaddr);
void i2c_init_board(void);
#ifdef CONFIG_SYS_I2C_BOARD_LATE_INIT