diff options
author | Gerald Van Baren <vanbaren@cideas.com> | 2007-08-10 19:19:50 -0400 |
---|---|---|
committer | Gerald Van Baren <vanbaren@cideas.com> | 2007-08-10 19:19:50 -0400 |
commit | 29eaae953476f2bba4d5c7ac097b96cd827c1dff (patch) | |
tree | 537faa4c04db58ee7b070b56bd7de7bd116092d3 /drivers/fsl_i2c.c | |
parent | ed8e5f362a2fc572eb9c1854f6c76c291b0f9a0f (diff) | |
parent | fb56579ffe7ef3275b7036bb7b924e5a0d32bd70 (diff) | |
download | u-boot-imx-29eaae953476f2bba4d5c7ac097b96cd827c1dff.zip u-boot-imx-29eaae953476f2bba4d5c7ac097b96cd827c1dff.tar.gz u-boot-imx-29eaae953476f2bba4d5c7ac097b96cd827c1dff.tar.bz2 |
Merge git://www.denx.de/git/u-boot
Diffstat (limited to 'drivers/fsl_i2c.c')
-rw-r--r-- | drivers/fsl_i2c.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/fsl_i2c.c b/drivers/fsl_i2c.c index ebae5af..22485ea 100644 --- a/drivers/fsl_i2c.c +++ b/drivers/fsl_i2c.c @@ -69,9 +69,10 @@ i2c_init(int speed, int slaveadd) dev = (struct fsl_i2c *) (CFG_IMMR + CFG_I2C2_OFFSET); writeb(0, &dev->cr); /* stop I2C controller */ + udelay(5); /* let it shutdown in peace */ writeb(0x3F, &dev->fdr); /* set bus speed */ writeb(0x3F, &dev->dfsrr); /* set default filter */ - writeb(slaveadd, &dev->adr); /* write slave address */ + writeb(slaveadd << 1, &dev->adr); /* write slave address */ writeb(0x0, &dev->sr); /* clear status register */ writeb(I2C_CR_MEN, &dev->cr); /* start I2C controller */ #endif /* CFG_I2C2_OFFSET */ |