]> git.sur5r.net Git - u-boot/commitdiff
Fix I2C master address initialization.
authorJoakim Tjernlund <Joakim.Tjernlund@transmode.se>
Tue, 28 Nov 2006 22:17:18 +0000 (16:17 -0600)
committerKim Phillips <kim.phillips@freescale.com>
Wed, 29 Nov 2006 06:25:23 +0000 (00:25 -0600)
Signed-off-by: Timur Tabi <timur@freescale.com>
drivers/fsl_i2c.c

index 0e392134872cc2ebe8e9821439e6d212aed692ed..f00e8026bc62fcd4e3f6ce9ab6a553b53019bb4d 100644 (file)
@@ -57,7 +57,7 @@ i2c_init(int speed, int slaveadd)
        writeb(0, &dev->cr);                    /* stop I2C controller */
        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 */