aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c
diff options
context:
space:
mode:
authorWolfram Sang <w.sang@pengutronix.de>2008-07-14 16:38:28 -0400
committerJean Delvare <khali@mahadeva.delvare>2008-07-14 16:38:28 -0400
commit3b270804a9345e4a0c493889f98e838692f7bc9b (patch)
tree7710132282b7115402fb6cd12782314685633516 /drivers/i2c
parent61045dbe9d8d81b1bae4dc1e9482d389ca99edc1 (diff)
i2c-cpm: Bugfixes
Bugfixes to the i2c-cpm driver - enable correct interrupts (I2CER_TXE instead of I2CER_BUSY) - replace forgotten iic with i2c - prefix debug-output on init with 0x and add frequency Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Jean Delvare <khali@linux-fr.org>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-cpm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/i2c/busses/i2c-cpm.c b/drivers/i2c/busses/i2c-cpm.c
index 1c955a82dcca..53af744a91c1 100644
--- a/drivers/i2c/busses/i2c-cpm.c
+++ b/drivers/i2c/busses/i2c-cpm.c
@@ -240,7 +240,7 @@ static void cpm_i2c_parse_message(struct i2c_adapter *adap,
240 eieio(); 240 eieio();
241 setbits16(&tbdf->cbd_sc, BD_SC_READY); 241 setbits16(&tbdf->cbd_sc, BD_SC_READY);
242 } else { 242 } else {
243 dev_dbg(&adap->dev, "cpm_iic_write(abyte=0x%x)\n", addr); 243 dev_dbg(&adap->dev, "cpm_i2c_write(abyte=0x%x)\n", addr);
244 244
245 memcpy(tb+1, pmsg->buf, pmsg->len); 245 memcpy(tb+1, pmsg->buf, pmsg->len);
246 246
@@ -349,7 +349,7 @@ static int cpm_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num)
349 } 349 }
350 /* Start transfer now */ 350 /* Start transfer now */
351 /* Enable RX/TX/Error interupts */ 351 /* Enable RX/TX/Error interupts */
352 out_8(&i2c_reg->i2cmr, I2CER_BUSY | I2CER_TXB | I2CER_RXB); 352 out_8(&i2c_reg->i2cmr, I2CER_TXE | I2CER_TXB | I2CER_RXB);
353 out_8(&i2c_reg->i2cer, 0xff); /* Clear interrupt status */ 353 out_8(&i2c_reg->i2cer, 0xff); /* Clear interrupt status */
354 /* Chip bug, set enable here */ 354 /* Chip bug, set enable here */
355 setbits8(&i2c_reg->i2mod, I2MOD_EN); /* Enable */ 355 setbits8(&i2c_reg->i2mod, I2MOD_EN); /* Enable */
@@ -552,8 +552,8 @@ static int __devinit cpm_i2c_setup(struct cpm_i2c *cpm)
552 552
553 cpm_reset_i2c_params(cpm); 553 cpm_reset_i2c_params(cpm);
554 554
555 dev_dbg(&cpm->ofdev->dev, "i2c_ram %p, i2c_addr 0x%04x\n", 555 dev_dbg(&cpm->ofdev->dev, "i2c_ram 0x%p, i2c_addr 0x%04x, freq %d\n",
556 cpm->i2c_ram, cpm->i2c_addr); 556 cpm->i2c_ram, cpm->i2c_addr, cpm->freq);
557 dev_dbg(&cpm->ofdev->dev, "tbase 0x%04x, rbase 0x%04x\n", 557 dev_dbg(&cpm->ofdev->dev, "tbase 0x%04x, rbase 0x%04x\n",
558 (u8 __iomem *)cpm->tbase - DPRAM_BASE, 558 (u8 __iomem *)cpm->tbase - DPRAM_BASE,
559 (u8 __iomem *)cpm->rbase - DPRAM_BASE); 559 (u8 __iomem *)cpm->rbase - DPRAM_BASE);