summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2010-04-24 21:11:56 +0200
committerWolfgang Denk <wd@denx.de>2010-04-24 21:11:56 +0200
commitb919a3f2981109c9f2aaafe9c692dbb99f1c6366 (patch)
tree3463b2da0ee63b4fd73639e0c852aa2e6897d49a /drivers
parenta47a12becf66f02a56da91c161e2edb625e9f20c (diff)
parent26a33504a55e4882520f2e9da96ba6c22badb353 (diff)
downloadu-boot-imx-b919a3f2981109c9f2aaafe9c692dbb99f1c6366.zip
u-boot-imx-b919a3f2981109c9f2aaafe9c692dbb99f1c6366.tar.gz
u-boot-imx-b919a3f2981109c9f2aaafe9c692dbb99f1c6366.tar.bz2
Merge branch 'master' of git://git.denx.de/u-boot-i2c
Diffstat (limited to 'drivers')
-rw-r--r--drivers/i2c/fsl_i2c.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/drivers/i2c/fsl_i2c.c b/drivers/i2c/fsl_i2c.c
index 2241990..cb13dee 100644
--- a/drivers/i2c/fsl_i2c.c
+++ b/drivers/i2c/fsl_i2c.c
@@ -221,9 +221,10 @@ i2c_init(int speed, int slaveadd)
unsigned int temp;
#ifdef CONFIG_SYS_I2C_INIT_BOARD
- /* call board specific i2c bus reset routine before accessing the */
- /* environment, which might be in a chip on that bus. For details */
- /* about this problem see doc/I2C_Edge_Conditions. */
+ /* Call board specific i2c bus reset routine before accessing the
+ * environment, which might be in a chip on that bus. For details
+ * about this problem see doc/I2C_Edge_Conditions.
+ */
i2c_init_board();
#endif
dev = (struct fsl_i2c *) (CONFIG_SYS_IMMR + CONFIG_SYS_I2C_OFFSET);
@@ -249,6 +250,15 @@ i2c_init(int speed, int slaveadd)
writeb(0x0, &dev->sr); /* clear status register */
writeb(I2C_CR_MEN, &dev->cr); /* start I2C controller */
#endif
+
+#ifdef CONFIG_SYS_I2C_BOARD_LATE_INIT
+ /* Call board specific i2c bus reset routine AFTER the bus has been
+ * initialized. Use either this callpoint or i2c_init_board;
+ * which is called before i2c_init operations.
+ * For details about this problem see doc/I2C_Edge_Conditions.
+ */
+ i2c_board_late_init();
+#endif
}
static int