public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/8] pxa: move i2c driver to the common place
@ 2011-03-14 10:16 Lei Wen
  2011-03-14 10:16 ` [U-Boot] [PATCH 2/8] pxa_i2c: use structure to replace the direclty define Lei Wen
                   ` (4 more replies)
  0 siblings, 5 replies; 124+ messages in thread
From: Lei Wen @ 2011-03-14 10:16 UTC (permalink / raw)
  To: u-boot

For better sharing with other platform other than pxa's,
it is more convenient to put the driver to the common place.

Signed-off-by: Lei Wen <leiwen@marvell.com>
---
 arch/arm/cpu/pxa/Makefile |    1 -
 arch/arm/cpu/pxa/i2c.c    |  469 ---------------------------------------------
 drivers/i2c/Makefile      |    1 +
 drivers/i2c/pxa_i2c.c     |  469 +++++++++++++++++++++++++++++++++++++++++++++
 include/configs/innokom.h |    1 +
 include/configs/xm250.h   |    1 +
 6 files changed, 472 insertions(+), 470 deletions(-)
 delete mode 100644 arch/arm/cpu/pxa/i2c.c
 create mode 100644 drivers/i2c/pxa_i2c.c

diff --git a/arch/arm/cpu/pxa/Makefile b/arch/arm/cpu/pxa/Makefile
index 49a6ed3..e8b59a3 100644
--- a/arch/arm/cpu/pxa/Makefile
+++ b/arch/arm/cpu/pxa/Makefile
@@ -28,7 +28,6 @@ LIB	= $(obj)lib$(CPU).o
 START	= start.o
 
 COBJS	+= cpu.o
-COBJS	+= i2c.o
 COBJS	+= pxafb.o
 COBJS	+= timer.o
 COBJS	+= usb.o
diff --git a/arch/arm/cpu/pxa/i2c.c b/arch/arm/cpu/pxa/i2c.c
deleted file mode 100644
index 7aa49ae..0000000
--- a/arch/arm/cpu/pxa/i2c.c
+++ /dev/null
@@ -1,469 +0,0 @@
-/*
- * (C) Copyright 2000
- * Paolo Scaffardi, AIRVENT SAM s.p.a - RIMINI(ITALY), arsenio at tin.it
- *
- * (C) Copyright 2000 Sysgo Real-Time Solutions, GmbH <www.elinos.com>
- * Marius Groeger <mgroeger@sysgo.de>
- *
- * (C) Copyright 2003 Pengutronix e.K.
- * Robert Schwebel <r.schwebel@pengutronix.de>
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- *
- * Back ported to the 8xx platform (from the 8260 platform) by
- * Murray.Jensen at cmst.csiro.au, 27-Jan-01.
- */
-
-/* FIXME: this file is PXA255 specific! What about other XScales? */
-
-#include <common.h>
-#include <asm/io.h>
-
-#ifdef CONFIG_HARD_I2C
-
-/*
- *	- CONFIG_SYS_I2C_SPEED
- *	- I2C_PXA_SLAVE_ADDR
- */
-
-#include <asm/arch/hardware.h>
-#include <asm/arch/pxa-regs.h>
-#include <i2c.h>
-
-/*#define	DEBUG_I2C	1	/###* activate local debugging output  */
-#define I2C_PXA_SLAVE_ADDR	0x1	/* slave pxa unit address           */
-
-#if (CONFIG_SYS_I2C_SPEED == 400000)
-#define I2C_ICR_INIT	(ICR_FM | ICR_BEIE | ICR_IRFIE | ICR_ITEIE | ICR_GCD | ICR_SCLE)
-#else
-#define I2C_ICR_INIT	(ICR_BEIE | ICR_IRFIE | ICR_ITEIE | ICR_GCD | ICR_SCLE)
-#endif
-
-#define I2C_ISR_INIT		0x7FF
-
-#ifdef DEBUG_I2C
-#define PRINTD(x) printf x
-#else
-#define PRINTD(x)
-#endif
-
-
-/* Shall the current transfer have a start/stop condition? */
-#define I2C_COND_NORMAL		0
-#define I2C_COND_START		1
-#define I2C_COND_STOP		2
-
-/* Shall the current transfer be ack/nacked or being waited for it? */
-#define I2C_ACKNAK_WAITACK	1
-#define I2C_ACKNAK_SENDACK	2
-#define I2C_ACKNAK_SENDNAK	4
-
-/* Specify who shall transfer the data (master or slave) */
-#define I2C_READ		0
-#define I2C_WRITE		1
-
-/* All transfers are described by this data structure */
-struct i2c_msg {
-	u8 condition;
-	u8 acknack;
-	u8 direction;
-	u8 data;
-};
-
-
-/**
- * i2c_pxa_reset: - reset the host controller
- *
- */
-
-static void i2c_reset( void )
-{
-	writel(readl(ICR) & ~ICR_IUE, ICR);	/* disable unit */
-	writel(readl(ICR) | ICR_UR, ICR);	/* reset the unit */
-	udelay(100);
-	writel(readl(ICR) & ~ICR_IUE, ICR);	/* disable unit */
-#ifdef CONFIG_CPU_MONAHANS
-	/* | CKENB_1_PWM1 | CKENB_0_PWM0); */
-	writel(readl(CKENB) | (CKENB_4_I2C), CKENB);
-#else /* CONFIG_CPU_MONAHANS */
-	/* set the global I2C clock on */
-	writel(readl(CKEN) | CKEN14_I2C, CKEN);
-#endif
-	writel(I2C_PXA_SLAVE_ADDR, ISAR);	/* set our slave address */
-	writel(I2C_ICR_INIT, ICR);		/* set control reg values */
-	writel(I2C_ISR_INIT, ISR);		/* set clear interrupt bits */
-	writel(readl(ICR) | ICR_IUE, ICR);	/* enable unit */
-	udelay(100);
-}
-
-
-/**
- * i2c_isr_set_cleared: - wait until certain bits of the I2C status register
- *	                  are set and cleared
- *
- * @return: 1 in case of success, 0 means timeout (no match within 10 ms).
- */
-static int i2c_isr_set_cleared( unsigned long set_mask, unsigned long cleared_mask )
-{
-	int timeout = 10000;
-
-	while( ((ISR & set_mask)!=set_mask) || ((ISR & cleared_mask)!=0) ){
-		udelay( 10 );
-		if( timeout-- < 0 ) return 0;
-	}
-
-	return 1;
-}
-
-
-/**
- * i2c_transfer: - Transfer one byte over the i2c bus
- *
- * This function can tranfer a byte over the i2c bus in both directions.
- * It is used by the public API functions.
- *
- * @return:  0: transfer successful
- *          -1: message is empty
- *          -2: transmit timeout
- *          -3: ACK missing
- *          -4: receive timeout
- *          -5: illegal parameters
- *          -6: bus is busy and couldn't be aquired
- */
-int i2c_transfer(struct i2c_msg *msg)
-{
-	int ret;
-
-	if (!msg)
-		goto transfer_error_msg_empty;
-
-	switch(msg->direction) {
-
-	case I2C_WRITE:
-
-		/* check if bus is not busy */
-		if (!i2c_isr_set_cleared(0,ISR_IBB))
-			goto transfer_error_bus_busy;
-
-		/* start transmission */
-		writel(readl(ICR) & ~ICR_START, ICR);
-		writel(readl(ICR) & ~ICR_STOP, ICR);
-		writel(msg->data, IDBR);
-		if (msg->condition == I2C_COND_START)
-			writel(readl(ICR) | ICR_START, ICR);
-		if (msg->condition == I2C_COND_STOP)
-			writel(readl(ICR) | ICR_STOP, ICR);
-		if (msg->acknack == I2C_ACKNAK_SENDNAK)
-			writel(readl(ICR) | ICR_ACKNAK, ICR);
-		if (msg->acknack == I2C_ACKNAK_SENDACK)
-			writel(readl(ICR) & ~ICR_ACKNAK, ICR);
-		writel(readl(ICR) & ~ICR_ALDIE, ICR);
-		writel(readl(ICR) | ICR_TB, ICR);
-
-		/* transmit register empty? */
-		if (!i2c_isr_set_cleared(ISR_ITE,0))
-			goto transfer_error_transmit_timeout;
-
-		/* clear 'transmit empty' state */
-		writel(readl(ISR) | ISR_ITE, ISR);
-
-		/* wait for ACK from slave */
-		if (msg->acknack == I2C_ACKNAK_WAITACK)
-			if (!i2c_isr_set_cleared(0,ISR_ACKNAK))
-				goto transfer_error_ack_missing;
-		break;
-
-	case I2C_READ:
-
-		/* check if bus is not busy */
-		if (!i2c_isr_set_cleared(0,ISR_IBB))
-			goto transfer_error_bus_busy;
-
-		/* start receive */
-		writel(readl(ICR) & ~ICR_START, ICR);
-		writel(readl(ICR) & ~ICR_STOP, ICR);
-		if (msg->condition == I2C_COND_START)
-			writel(readl(ICR) | ICR_START, ICR);
-		if (msg->condition == I2C_COND_STOP)
-			writel(readl(ICR) | ICR_STOP, ICR);
-		if (msg->acknack == I2C_ACKNAK_SENDNAK)
-			writel(readl(ICR) | ICR_ACKNAK, ICR);
-		if (msg->acknack == I2C_ACKNAK_SENDACK)
-			writel(readl(ICR) & ~ICR_ACKNAK, ICR);
-		writel(readl(ICR) & ~ICR_ALDIE, ICR);
-		writel(readl(ICR) | ICR_TB, ICR);
-
-		/* receive register full? */
-		if (!i2c_isr_set_cleared(ISR_IRF,0))
-			goto transfer_error_receive_timeout;
-
-		msg->data = readl(IDBR);
-
-		/* clear 'receive empty' state */
-		writel(readl(ISR) | ISR_IRF, ISR);
-
-		break;
-
-	default:
-
-		goto transfer_error_illegal_param;
-
-	}
-
-	return 0;
-
-transfer_error_msg_empty:
-		PRINTD(("i2c_transfer: error: 'msg' is empty\n"));
-		ret = -1; goto i2c_transfer_finish;
-
-transfer_error_transmit_timeout:
-		PRINTD(("i2c_transfer: error: transmit timeout\n"));
-		ret = -2; goto i2c_transfer_finish;
-
-transfer_error_ack_missing:
-		PRINTD(("i2c_transfer: error: ACK missing\n"));
-		ret = -3; goto i2c_transfer_finish;
-
-transfer_error_receive_timeout:
-		PRINTD(("i2c_transfer: error: receive timeout\n"));
-		ret = -4; goto i2c_transfer_finish;
-
-transfer_error_illegal_param:
-		PRINTD(("i2c_transfer: error: illegal parameters\n"));
-		ret = -5; goto i2c_transfer_finish;
-
-transfer_error_bus_busy:
-		PRINTD(("i2c_transfer: error: bus is busy\n"));
-		ret = -6; goto i2c_transfer_finish;
-
-i2c_transfer_finish:
-		PRINTD(("i2c_transfer: ISR: 0x%04x\n",ISR));
-		i2c_reset();
-		return ret;
-
-}
-
-/* ------------------------------------------------------------------------ */
-/* API Functions                                                            */
-/* ------------------------------------------------------------------------ */
-
-void i2c_init(int speed, int slaveaddr)
-{
-#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.                  */
-	i2c_init_board();
-#endif
-}
-
-
-/**
- * i2c_probe: - Test if a chip answers for a given i2c address
- *
- * @chip:	address of the chip which is searched for
- * @return:	0 if a chip was found, -1 otherwhise
- */
-
-int i2c_probe(uchar chip)
-{
-	struct i2c_msg msg;
-
-	i2c_reset();
-
-	msg.condition = I2C_COND_START;
-	msg.acknack   = I2C_ACKNAK_WAITACK;
-	msg.direction = I2C_WRITE;
-	msg.data      = (chip << 1) + 1;
-	if (i2c_transfer(&msg)) return -1;
-
-	msg.condition = I2C_COND_STOP;
-	msg.acknack   = I2C_ACKNAK_SENDNAK;
-	msg.direction = I2C_READ;
-	msg.data      = 0x00;
-	if (i2c_transfer(&msg)) return -1;
-
-	return 0;
-}
-
-
-/**
- * i2c_read: - Read multiple bytes from an i2c device
- *
- * The higher level routines take into account that this function is only
- * called with len < page length of the device (see configuration file)
- *
- * @chip:	address of the chip which is to be read
- * @addr:	i2c data address within the chip
- * @alen:	length of the i2c data address (1..2 bytes)
- * @buffer:	where to write the data
- * @len:	how much byte do we want to read
- * @return:	0 in case of success
- */
-
-int i2c_read(uchar chip, uint addr, int alen, uchar *buffer, int len)
-{
-	struct i2c_msg msg;
-	u8 addr_bytes[3]; /* lowest...highest byte of data address */
-	int ret;
-
-	PRINTD(("i2c_read(chip=0x%02x, addr=0x%02x, alen=0x%02x, len=0x%02x)\n",chip,addr,alen,len));
-
-	i2c_reset();
-
-	/* dummy chip address write */
-	PRINTD(("i2c_read: dummy chip address write\n"));
-	msg.condition = I2C_COND_START;
-	msg.acknack   = I2C_ACKNAK_WAITACK;
-	msg.direction = I2C_WRITE;
-	msg.data      = (chip << 1);
-	msg.data     &= 0xFE;
-	if ((ret=i2c_transfer(&msg))) return -1;
-
-	/*
-	 * send memory address bytes;
-	 * alen defines how much bytes we have to send.
-	 */
-	/*addr &= ((1 << CONFIG_SYS_EEPROM_PAGE_WRITE_BITS)-1); */
-	addr_bytes[0] = (u8)((addr >>  0) & 0x000000FF);
-	addr_bytes[1] = (u8)((addr >>  8) & 0x000000FF);
-	addr_bytes[2] = (u8)((addr >> 16) & 0x000000FF);
-
-	while (--alen >= 0) {
-
-		PRINTD(("i2c_read: send memory word address byte %1d\n",alen));
-		msg.condition = I2C_COND_NORMAL;
-		msg.acknack   = I2C_ACKNAK_WAITACK;
-		msg.direction = I2C_WRITE;
-		msg.data      = addr_bytes[alen];
-		if ((ret=i2c_transfer(&msg))) return -1;
-	}
-
-
-	/* start read sequence */
-	PRINTD(("i2c_read: start read sequence\n"));
-	msg.condition = I2C_COND_START;
-	msg.acknack   = I2C_ACKNAK_WAITACK;
-	msg.direction = I2C_WRITE;
-	msg.data      = (chip << 1);
-	msg.data     |= 0x01;
-	if ((ret=i2c_transfer(&msg))) return -1;
-
-	/* read bytes; send NACK@last byte */
-	while (len--) {
-
-		if (len==0) {
-			msg.condition = I2C_COND_STOP;
-			msg.acknack   = I2C_ACKNAK_SENDNAK;
-		} else {
-			msg.condition = I2C_COND_NORMAL;
-			msg.acknack   = I2C_ACKNAK_SENDACK;
-		}
-
-		msg.direction = I2C_READ;
-		msg.data      = 0x00;
-		if ((ret=i2c_transfer(&msg))) return -1;
-
-		*buffer = msg.data;
-		PRINTD(("i2c_read: reading byte (0x%08x)=0x%02x\n",(unsigned int)buffer,*buffer));
-		buffer++;
-
-	}
-
-	i2c_reset();
-
-	return 0;
-}
-
-
-/**
- * i2c_write: -  Write multiple bytes to an i2c device
- *
- * The higher level routines take into account that this function is only
- * called with len < page length of the device (see configuration file)
- *
- * @chip:	address of the chip which is to be written
- * @addr:	i2c data address within the chip
- * @alen:	length of the i2c data address (1..2 bytes)
- * @buffer:	where to find the data to be written
- * @len:	how much byte do we want to read
- * @return:	0 in case of success
- */
-
-int i2c_write(uchar chip, uint addr, int alen, uchar *buffer, int len)
-{
-	struct i2c_msg msg;
-	u8 addr_bytes[3]; /* lowest...highest byte of data address */
-
-	PRINTD(("i2c_write(chip=0x%02x, addr=0x%02x, alen=0x%02x, len=0x%02x)\n",chip,addr,alen,len));
-
-	i2c_reset();
-
-	/* chip address write */
-	PRINTD(("i2c_write: chip address write\n"));
-	msg.condition = I2C_COND_START;
-	msg.acknack   = I2C_ACKNAK_WAITACK;
-	msg.direction = I2C_WRITE;
-	msg.data      = (chip << 1);
-	msg.data     &= 0xFE;
-	if (i2c_transfer(&msg)) return -1;
-
-	/*
-	 * send memory address bytes;
-	 * alen defines how much bytes we have to send.
-	 */
-	addr_bytes[0] = (u8)((addr >>  0) & 0x000000FF);
-	addr_bytes[1] = (u8)((addr >>  8) & 0x000000FF);
-	addr_bytes[2] = (u8)((addr >> 16) & 0x000000FF);
-
-	while (--alen >= 0) {
-
-		PRINTD(("i2c_write: send memory word address\n"));
-		msg.condition = I2C_COND_NORMAL;
-		msg.acknack   = I2C_ACKNAK_WAITACK;
-		msg.direction = I2C_WRITE;
-		msg.data      = addr_bytes[alen];
-		if (i2c_transfer(&msg)) return -1;
-	}
-
-	/* write bytes; send NACK at last byte */
-	while (len--) {
-
-		PRINTD(("i2c_write: writing byte (0x%08x)=0x%02x\n",(unsigned int)buffer,*buffer));
-
-		if (len==0)
-			msg.condition = I2C_COND_STOP;
-		else
-			msg.condition = I2C_COND_NORMAL;
-
-		msg.acknack   = I2C_ACKNAK_WAITACK;
-		msg.direction = I2C_WRITE;
-		msg.data      = *(buffer++);
-
-		if (i2c_transfer(&msg)) return -1;
-
-	}
-
-	i2c_reset();
-
-	return 0;
-
-}
-
-#endif	/* CONFIG_HARD_I2C */
diff --git a/drivers/i2c/Makefile b/drivers/i2c/Makefile
index 052fe36..16308ac 100644
--- a/drivers/i2c/Makefile
+++ b/drivers/i2c/Makefile
@@ -35,6 +35,7 @@ COBJS-$(CONFIG_DRIVER_OMAP24XX_I2C) += omap24xx_i2c.o
 COBJS-$(CONFIG_DRIVER_OMAP34XX_I2C) += omap24xx_i2c.o
 COBJS-$(CONFIG_PCA9564_I2C) += pca9564_i2c.o
 COBJS-$(CONFIG_PPC4XX_I2C) += ppc4xx_i2c.o
+COBJS-$(CONFIG_PXA_I2C) += pxa_i2c.o
 COBJS-$(CONFIG_DRIVER_S3C24X0_I2C) += s3c24x0_i2c.o
 COBJS-$(CONFIG_S3C44B0_I2C) += s3c44b0_i2c.o
 COBJS-$(CONFIG_SOFT_I2C) += soft_i2c.o
diff --git a/drivers/i2c/pxa_i2c.c b/drivers/i2c/pxa_i2c.c
new file mode 100644
index 0000000..7aa49ae
--- /dev/null
+++ b/drivers/i2c/pxa_i2c.c
@@ -0,0 +1,469 @@
+/*
+ * (C) Copyright 2000
+ * Paolo Scaffardi, AIRVENT SAM s.p.a - RIMINI(ITALY), arsenio at tin.it
+ *
+ * (C) Copyright 2000 Sysgo Real-Time Solutions, GmbH <www.elinos.com>
+ * Marius Groeger <mgroeger@sysgo.de>
+ *
+ * (C) Copyright 2003 Pengutronix e.K.
+ * Robert Schwebel <r.schwebel@pengutronix.de>
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ * Back ported to the 8xx platform (from the 8260 platform) by
+ * Murray.Jensen at cmst.csiro.au, 27-Jan-01.
+ */
+
+/* FIXME: this file is PXA255 specific! What about other XScales? */
+
+#include <common.h>
+#include <asm/io.h>
+
+#ifdef CONFIG_HARD_I2C
+
+/*
+ *	- CONFIG_SYS_I2C_SPEED
+ *	- I2C_PXA_SLAVE_ADDR
+ */
+
+#include <asm/arch/hardware.h>
+#include <asm/arch/pxa-regs.h>
+#include <i2c.h>
+
+/*#define	DEBUG_I2C	1	/###* activate local debugging output  */
+#define I2C_PXA_SLAVE_ADDR	0x1	/* slave pxa unit address           */
+
+#if (CONFIG_SYS_I2C_SPEED == 400000)
+#define I2C_ICR_INIT	(ICR_FM | ICR_BEIE | ICR_IRFIE | ICR_ITEIE | ICR_GCD | ICR_SCLE)
+#else
+#define I2C_ICR_INIT	(ICR_BEIE | ICR_IRFIE | ICR_ITEIE | ICR_GCD | ICR_SCLE)
+#endif
+
+#define I2C_ISR_INIT		0x7FF
+
+#ifdef DEBUG_I2C
+#define PRINTD(x) printf x
+#else
+#define PRINTD(x)
+#endif
+
+
+/* Shall the current transfer have a start/stop condition? */
+#define I2C_COND_NORMAL		0
+#define I2C_COND_START		1
+#define I2C_COND_STOP		2
+
+/* Shall the current transfer be ack/nacked or being waited for it? */
+#define I2C_ACKNAK_WAITACK	1
+#define I2C_ACKNAK_SENDACK	2
+#define I2C_ACKNAK_SENDNAK	4
+
+/* Specify who shall transfer the data (master or slave) */
+#define I2C_READ		0
+#define I2C_WRITE		1
+
+/* All transfers are described by this data structure */
+struct i2c_msg {
+	u8 condition;
+	u8 acknack;
+	u8 direction;
+	u8 data;
+};
+
+
+/**
+ * i2c_pxa_reset: - reset the host controller
+ *
+ */
+
+static void i2c_reset( void )
+{
+	writel(readl(ICR) & ~ICR_IUE, ICR);	/* disable unit */
+	writel(readl(ICR) | ICR_UR, ICR);	/* reset the unit */
+	udelay(100);
+	writel(readl(ICR) & ~ICR_IUE, ICR);	/* disable unit */
+#ifdef CONFIG_CPU_MONAHANS
+	/* | CKENB_1_PWM1 | CKENB_0_PWM0); */
+	writel(readl(CKENB) | (CKENB_4_I2C), CKENB);
+#else /* CONFIG_CPU_MONAHANS */
+	/* set the global I2C clock on */
+	writel(readl(CKEN) | CKEN14_I2C, CKEN);
+#endif
+	writel(I2C_PXA_SLAVE_ADDR, ISAR);	/* set our slave address */
+	writel(I2C_ICR_INIT, ICR);		/* set control reg values */
+	writel(I2C_ISR_INIT, ISR);		/* set clear interrupt bits */
+	writel(readl(ICR) | ICR_IUE, ICR);	/* enable unit */
+	udelay(100);
+}
+
+
+/**
+ * i2c_isr_set_cleared: - wait until certain bits of the I2C status register
+ *	                  are set and cleared
+ *
+ * @return: 1 in case of success, 0 means timeout (no match within 10 ms).
+ */
+static int i2c_isr_set_cleared( unsigned long set_mask, unsigned long cleared_mask )
+{
+	int timeout = 10000;
+
+	while( ((ISR & set_mask)!=set_mask) || ((ISR & cleared_mask)!=0) ){
+		udelay( 10 );
+		if( timeout-- < 0 ) return 0;
+	}
+
+	return 1;
+}
+
+
+/**
+ * i2c_transfer: - Transfer one byte over the i2c bus
+ *
+ * This function can tranfer a byte over the i2c bus in both directions.
+ * It is used by the public API functions.
+ *
+ * @return:  0: transfer successful
+ *          -1: message is empty
+ *          -2: transmit timeout
+ *          -3: ACK missing
+ *          -4: receive timeout
+ *          -5: illegal parameters
+ *          -6: bus is busy and couldn't be aquired
+ */
+int i2c_transfer(struct i2c_msg *msg)
+{
+	int ret;
+
+	if (!msg)
+		goto transfer_error_msg_empty;
+
+	switch(msg->direction) {
+
+	case I2C_WRITE:
+
+		/* check if bus is not busy */
+		if (!i2c_isr_set_cleared(0,ISR_IBB))
+			goto transfer_error_bus_busy;
+
+		/* start transmission */
+		writel(readl(ICR) & ~ICR_START, ICR);
+		writel(readl(ICR) & ~ICR_STOP, ICR);
+		writel(msg->data, IDBR);
+		if (msg->condition == I2C_COND_START)
+			writel(readl(ICR) | ICR_START, ICR);
+		if (msg->condition == I2C_COND_STOP)
+			writel(readl(ICR) | ICR_STOP, ICR);
+		if (msg->acknack == I2C_ACKNAK_SENDNAK)
+			writel(readl(ICR) | ICR_ACKNAK, ICR);
+		if (msg->acknack == I2C_ACKNAK_SENDACK)
+			writel(readl(ICR) & ~ICR_ACKNAK, ICR);
+		writel(readl(ICR) & ~ICR_ALDIE, ICR);
+		writel(readl(ICR) | ICR_TB, ICR);
+
+		/* transmit register empty? */
+		if (!i2c_isr_set_cleared(ISR_ITE,0))
+			goto transfer_error_transmit_timeout;
+
+		/* clear 'transmit empty' state */
+		writel(readl(ISR) | ISR_ITE, ISR);
+
+		/* wait for ACK from slave */
+		if (msg->acknack == I2C_ACKNAK_WAITACK)
+			if (!i2c_isr_set_cleared(0,ISR_ACKNAK))
+				goto transfer_error_ack_missing;
+		break;
+
+	case I2C_READ:
+
+		/* check if bus is not busy */
+		if (!i2c_isr_set_cleared(0,ISR_IBB))
+			goto transfer_error_bus_busy;
+
+		/* start receive */
+		writel(readl(ICR) & ~ICR_START, ICR);
+		writel(readl(ICR) & ~ICR_STOP, ICR);
+		if (msg->condition == I2C_COND_START)
+			writel(readl(ICR) | ICR_START, ICR);
+		if (msg->condition == I2C_COND_STOP)
+			writel(readl(ICR) | ICR_STOP, ICR);
+		if (msg->acknack == I2C_ACKNAK_SENDNAK)
+			writel(readl(ICR) | ICR_ACKNAK, ICR);
+		if (msg->acknack == I2C_ACKNAK_SENDACK)
+			writel(readl(ICR) & ~ICR_ACKNAK, ICR);
+		writel(readl(ICR) & ~ICR_ALDIE, ICR);
+		writel(readl(ICR) | ICR_TB, ICR);
+
+		/* receive register full? */
+		if (!i2c_isr_set_cleared(ISR_IRF,0))
+			goto transfer_error_receive_timeout;
+
+		msg->data = readl(IDBR);
+
+		/* clear 'receive empty' state */
+		writel(readl(ISR) | ISR_IRF, ISR);
+
+		break;
+
+	default:
+
+		goto transfer_error_illegal_param;
+
+	}
+
+	return 0;
+
+transfer_error_msg_empty:
+		PRINTD(("i2c_transfer: error: 'msg' is empty\n"));
+		ret = -1; goto i2c_transfer_finish;
+
+transfer_error_transmit_timeout:
+		PRINTD(("i2c_transfer: error: transmit timeout\n"));
+		ret = -2; goto i2c_transfer_finish;
+
+transfer_error_ack_missing:
+		PRINTD(("i2c_transfer: error: ACK missing\n"));
+		ret = -3; goto i2c_transfer_finish;
+
+transfer_error_receive_timeout:
+		PRINTD(("i2c_transfer: error: receive timeout\n"));
+		ret = -4; goto i2c_transfer_finish;
+
+transfer_error_illegal_param:
+		PRINTD(("i2c_transfer: error: illegal parameters\n"));
+		ret = -5; goto i2c_transfer_finish;
+
+transfer_error_bus_busy:
+		PRINTD(("i2c_transfer: error: bus is busy\n"));
+		ret = -6; goto i2c_transfer_finish;
+
+i2c_transfer_finish:
+		PRINTD(("i2c_transfer: ISR: 0x%04x\n",ISR));
+		i2c_reset();
+		return ret;
+
+}
+
+/* ------------------------------------------------------------------------ */
+/* API Functions                                                            */
+/* ------------------------------------------------------------------------ */
+
+void i2c_init(int speed, int slaveaddr)
+{
+#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.                  */
+	i2c_init_board();
+#endif
+}
+
+
+/**
+ * i2c_probe: - Test if a chip answers for a given i2c address
+ *
+ * @chip:	address of the chip which is searched for
+ * @return:	0 if a chip was found, -1 otherwhise
+ */
+
+int i2c_probe(uchar chip)
+{
+	struct i2c_msg msg;
+
+	i2c_reset();
+
+	msg.condition = I2C_COND_START;
+	msg.acknack   = I2C_ACKNAK_WAITACK;
+	msg.direction = I2C_WRITE;
+	msg.data      = (chip << 1) + 1;
+	if (i2c_transfer(&msg)) return -1;
+
+	msg.condition = I2C_COND_STOP;
+	msg.acknack   = I2C_ACKNAK_SENDNAK;
+	msg.direction = I2C_READ;
+	msg.data      = 0x00;
+	if (i2c_transfer(&msg)) return -1;
+
+	return 0;
+}
+
+
+/**
+ * i2c_read: - Read multiple bytes from an i2c device
+ *
+ * The higher level routines take into account that this function is only
+ * called with len < page length of the device (see configuration file)
+ *
+ * @chip:	address of the chip which is to be read
+ * @addr:	i2c data address within the chip
+ * @alen:	length of the i2c data address (1..2 bytes)
+ * @buffer:	where to write the data
+ * @len:	how much byte do we want to read
+ * @return:	0 in case of success
+ */
+
+int i2c_read(uchar chip, uint addr, int alen, uchar *buffer, int len)
+{
+	struct i2c_msg msg;
+	u8 addr_bytes[3]; /* lowest...highest byte of data address */
+	int ret;
+
+	PRINTD(("i2c_read(chip=0x%02x, addr=0x%02x, alen=0x%02x, len=0x%02x)\n",chip,addr,alen,len));
+
+	i2c_reset();
+
+	/* dummy chip address write */
+	PRINTD(("i2c_read: dummy chip address write\n"));
+	msg.condition = I2C_COND_START;
+	msg.acknack   = I2C_ACKNAK_WAITACK;
+	msg.direction = I2C_WRITE;
+	msg.data      = (chip << 1);
+	msg.data     &= 0xFE;
+	if ((ret=i2c_transfer(&msg))) return -1;
+
+	/*
+	 * send memory address bytes;
+	 * alen defines how much bytes we have to send.
+	 */
+	/*addr &= ((1 << CONFIG_SYS_EEPROM_PAGE_WRITE_BITS)-1); */
+	addr_bytes[0] = (u8)((addr >>  0) & 0x000000FF);
+	addr_bytes[1] = (u8)((addr >>  8) & 0x000000FF);
+	addr_bytes[2] = (u8)((addr >> 16) & 0x000000FF);
+
+	while (--alen >= 0) {
+
+		PRINTD(("i2c_read: send memory word address byte %1d\n",alen));
+		msg.condition = I2C_COND_NORMAL;
+		msg.acknack   = I2C_ACKNAK_WAITACK;
+		msg.direction = I2C_WRITE;
+		msg.data      = addr_bytes[alen];
+		if ((ret=i2c_transfer(&msg))) return -1;
+	}
+
+
+	/* start read sequence */
+	PRINTD(("i2c_read: start read sequence\n"));
+	msg.condition = I2C_COND_START;
+	msg.acknack   = I2C_ACKNAK_WAITACK;
+	msg.direction = I2C_WRITE;
+	msg.data      = (chip << 1);
+	msg.data     |= 0x01;
+	if ((ret=i2c_transfer(&msg))) return -1;
+
+	/* read bytes; send NACK@last byte */
+	while (len--) {
+
+		if (len==0) {
+			msg.condition = I2C_COND_STOP;
+			msg.acknack   = I2C_ACKNAK_SENDNAK;
+		} else {
+			msg.condition = I2C_COND_NORMAL;
+			msg.acknack   = I2C_ACKNAK_SENDACK;
+		}
+
+		msg.direction = I2C_READ;
+		msg.data      = 0x00;
+		if ((ret=i2c_transfer(&msg))) return -1;
+
+		*buffer = msg.data;
+		PRINTD(("i2c_read: reading byte (0x%08x)=0x%02x\n",(unsigned int)buffer,*buffer));
+		buffer++;
+
+	}
+
+	i2c_reset();
+
+	return 0;
+}
+
+
+/**
+ * i2c_write: -  Write multiple bytes to an i2c device
+ *
+ * The higher level routines take into account that this function is only
+ * called with len < page length of the device (see configuration file)
+ *
+ * @chip:	address of the chip which is to be written
+ * @addr:	i2c data address within the chip
+ * @alen:	length of the i2c data address (1..2 bytes)
+ * @buffer:	where to find the data to be written
+ * @len:	how much byte do we want to read
+ * @return:	0 in case of success
+ */
+
+int i2c_write(uchar chip, uint addr, int alen, uchar *buffer, int len)
+{
+	struct i2c_msg msg;
+	u8 addr_bytes[3]; /* lowest...highest byte of data address */
+
+	PRINTD(("i2c_write(chip=0x%02x, addr=0x%02x, alen=0x%02x, len=0x%02x)\n",chip,addr,alen,len));
+
+	i2c_reset();
+
+	/* chip address write */
+	PRINTD(("i2c_write: chip address write\n"));
+	msg.condition = I2C_COND_START;
+	msg.acknack   = I2C_ACKNAK_WAITACK;
+	msg.direction = I2C_WRITE;
+	msg.data      = (chip << 1);
+	msg.data     &= 0xFE;
+	if (i2c_transfer(&msg)) return -1;
+
+	/*
+	 * send memory address bytes;
+	 * alen defines how much bytes we have to send.
+	 */
+	addr_bytes[0] = (u8)((addr >>  0) & 0x000000FF);
+	addr_bytes[1] = (u8)((addr >>  8) & 0x000000FF);
+	addr_bytes[2] = (u8)((addr >> 16) & 0x000000FF);
+
+	while (--alen >= 0) {
+
+		PRINTD(("i2c_write: send memory word address\n"));
+		msg.condition = I2C_COND_NORMAL;
+		msg.acknack   = I2C_ACKNAK_WAITACK;
+		msg.direction = I2C_WRITE;
+		msg.data      = addr_bytes[alen];
+		if (i2c_transfer(&msg)) return -1;
+	}
+
+	/* write bytes; send NACK at last byte */
+	while (len--) {
+
+		PRINTD(("i2c_write: writing byte (0x%08x)=0x%02x\n",(unsigned int)buffer,*buffer));
+
+		if (len==0)
+			msg.condition = I2C_COND_STOP;
+		else
+			msg.condition = I2C_COND_NORMAL;
+
+		msg.acknack   = I2C_ACKNAK_WAITACK;
+		msg.direction = I2C_WRITE;
+		msg.data      = *(buffer++);
+
+		if (i2c_transfer(&msg)) return -1;
+
+	}
+
+	i2c_reset();
+
+	return 0;
+
+}
+
+#endif	/* CONFIG_HARD_I2C */
diff --git a/include/configs/innokom.h b/include/configs/innokom.h
index d8fcbdb..57d633c 100644
--- a/include/configs/innokom.h
+++ b/include/configs/innokom.h
@@ -140,6 +140,7 @@
 /*
  * I2C bus
  */
+#define CONFIG_PXA_I2C			1
 #define CONFIG_HARD_I2C			1
 #define CONFIG_SYS_I2C_SPEED			50000
 #define CONFIG_SYS_I2C_SLAVE			0xfe
diff --git a/include/configs/xm250.h b/include/configs/xm250.h
index 497cb91..7a7c539 100644
--- a/include/configs/xm250.h
+++ b/include/configs/xm250.h
@@ -61,6 +61,7 @@
 /*
  * I2C bus
  */
+#define CONFIG_PXA_I2C			1
 #define CONFIG_HARD_I2C			1
 #define CONFIG_SYS_I2C_SPEED			50000
 #define CONFIG_SYS_I2C_SLAVE			0xfe
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 124+ messages in thread
* [U-Boot] [PATCH V8 0/6] add i2c support to pantheon and aramada100
@ 2011-04-13 14:36 Prafulla Wadaskar
  0 siblings, 0 replies; 124+ messages in thread
From: Prafulla Wadaskar @ 2011-04-13 14:36 UTC (permalink / raw)
  To: u-boot



> -----Original Message-----
> From: Prafulla Wadaskar
> Sent: Wednesday, April 13, 2011 7:57 PM
> To: 'Lei Wen'
> Cc: Lei Wen; Heiko Schocher; Wolfgang Denk; u-boot at lists.denx.de; Marek
> Vasut; Ashish Karkare; Prabhanjan Sarnaik; Yu Tang
> Subject: RE: [PATCH V8 0/6] add i2c support to pantheon and aramada100
> 
> 
> 
> > -----Original Message-----
> > From: Lei Wen [mailto:adrian.wenl at gmail.com]
> > Sent: Wednesday, April 13, 2011 7:44 PM
> > To: Prafulla Wadaskar
> > Cc: Lei Wen; Heiko Schocher; Wolfgang Denk; u-boot at lists.denx.de;
> Marek
> > Vasut; Ashish Karkare; Prabhanjan Sarnaik; Yu Tang
> > Subject: Re: [PATCH V8 0/6] add i2c support to pantheon and aramada100
> >
> > Hi Prafulla,
> >
> > On Wed, Apr 13, 2011 at 10:01 PM, Prafulla Wadaskar
> > <prafulla@marvell.com> wrote:
> > >
> > >
> > >> -----Original Message-----
> > >> From: Lei Wen [mailto:leiwen at marvell.com]
> > >> Sent: Tuesday, April 05, 2011 1:31 PM
> > >> To: Heiko Schocher; Prafulla Wadaskar; Wolfgang Denk; u-
> > >> boot at lists.denx.de; Marek Vasut; Ashish Karkare; Prabhanjan
> Sarnaik;
> > Yu
> > >> Tang; adrian.wenl at gmail.com
> > >> Subject: [PATCH V8 0/6] add i2c support to pantheon and aramada100
> > >>
> > >> V2:
> > >> rename the previous pxa_i2c to mvi2c, since this driver would be
> > shared
> > >> by many other Marvell platforms.
> > >>
> > >> V3:
> > >> Clean the code sytle issue
> > >>
> > >> V4:
> > >> add and* and or* to make set bit operation generic
> > >> Also make i2c definition included in the ifdef
> > >>
> > >> V5:
> > >> Fix code style issue of the first patch
> > >>
> > >> V6:
> > >> Seperate the and* and or* patch out of the patch set
> > >> Move CONFIG_CMD_I2C define place
> > >>
> > >> V7:
> > >> Fix comments style
> > >> Make global change from PXA to MV
> > >> Move i2c config setting to <arch/config>
> > >>
> > >> V8:
> > >> Seperate timeout fix patch out
> > >>
> > >> Lei Wen (6):
> > >> ? pxa: move i2c driver to the common place
> > >> ? mv_i2c: fix timeout value to be consistent with comments
> > >> ? mv_i2c: use structure to replace the direclty define
> > >> ? I2C: add i2c support for Pantheon platform
> > >> ? I2C: mv_i2c: add multi bus support
> > >> ? I2C: add i2c support for Armada100 platform
> > >>
> > >> ?arch/arm/cpu/arm926ejs/armada100/cpu.c ? ? ? | ? 16 +
> > >> ?arch/arm/cpu/arm926ejs/pantheon/cpu.c ? ? ? ?| ? 12 +
> > >> ?arch/arm/cpu/pxa/Makefile ? ? ? ? ? ? ? ? ? ?| ? ?1 -
> > >> ?arch/arm/cpu/pxa/cpu.c ? ? ? ? ? ? ? ? ? ? ? | ? 10 +
> > >> ?arch/arm/cpu/pxa/i2c.c ? ? ? ? ? ? ? ? ? ? ? | ?469 --------------
> --
> > ---
> > >> ------
> > >> ?arch/arm/include/asm/arch-armada100/config.h | ? 12 +
> > >> ?arch/arm/include/asm/arch-armada100/mfp.h ? ?| ? 40 ++-
> > >> ?arch/arm/include/asm/arch-pantheon/config.h ?| ? 10 +
> > >> ?arch/arm/include/asm/arch-pantheon/cpu.h ? ? | ? ?4 +-
> > >> ?arch/arm/include/asm/arch-pantheon/mfp.h ? ? | ? ?6 +-
> > >> ?arch/arm/include/asm/arch-pxa/pxa-regs.h ? ? | ? 56 ---
> > >> ?board/Marvell/aspenite/aspenite.c ? ? ? ? ? ?| ? ?5 +
> > >> ?board/Marvell/dkb/dkb.c ? ? ? ? ? ? ? ? ? ? ?| ? ?4 +
> > >> ?board/innokom/innokom.c ? ? ? ? ? ? ? ? ? ? ?| ? ?9 +-
> > >> ?drivers/i2c/Makefile ? ? ? ? ? ? ? ? ? ? ? ? | ? ?1 +
> > >> ?drivers/i2c/mv_i2c.c ? ? ? ? ? ? ? ? ? ? ? ? | ?481
> > >> ++++++++++++++++++++++++++
> > >> ?drivers/i2c/mv_i2c.h ? ? ? ? ? ? ? ? ? ? ? ? | ? 83 +++++
> > >> ?include/configs/aspenite.h ? ? ? ? ? ? ? ? ? | ? ?1 +
> > >> ?include/configs/dkb.h ? ? ? ? ? ? ? ? ? ? ? ?| ? ?2 +
> > >> ?include/configs/innokom.h ? ? ? ? ? ? ? ? ? ?| ? ?2 +
> > >> ?include/configs/xm250.h ? ? ? ? ? ? ? ? ? ? ?| ? ?2 +
> > >> ?21 files changed, 671 insertions(+), 555 deletions(-)
> > >> ?delete mode 100644 arch/arm/cpu/pxa/i2c.c
> > >> ?create mode 100644 drivers/i2c/mv_i2c.c
> > >> ?create mode 100644 drivers/i2c/mv_i2c.h
> > >
> > > Dear Lei
> > > I have trying to apply this patch series to u-boot-marvell.git
> master
> > branch.
> > > Since I have rebased this branch to latest u-boot-arm.git master.
> > >
> > > This patch series cannot be cleanly applied.
> > >
> > > Can you pls provide new one in sync with latest pull from u-boot-
> > marvell.git master branch?
> > >
> >
> > I just apply those patch on master branch without any warning.
> > Are you apply the V8 series?
> 
> Yes, I am using V8 patches.
> Have you done git pull before that?
> What is your latest git log? (before applying patches)

Sorry for the noise Lei.
I could apply them cleanly.

Regards..
Prafulla . .

^ permalink raw reply	[flat|nested] 124+ messages in thread

end of thread, other threads:[~2011-04-21  3:31 UTC | newest]

Thread overview: 124+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-14 10:16 [U-Boot] [PATCH 1/8] pxa: move i2c driver to the common place Lei Wen
2011-03-14 10:16 ` [U-Boot] [PATCH 2/8] pxa_i2c: use structure to replace the direclty define Lei Wen
2011-03-14 10:16 ` [U-Boot] [PATCH 3/8] I2C: add i2c support for Pantheon platform Lei Wen
2011-03-14 10:16 ` [U-Boot] [PATCH 4/8] I2C: pxa_i2c: add multi bus support Lei Wen
2011-03-14 10:16 ` [U-Boot] [PATCH 5/8] I2C: add i2c support for Armada100 platform Lei Wen
2011-03-14 12:03 ` [U-Boot] [PATCH 1/8] pxa: move i2c driver to the common place Prafulla Wadaskar
2011-03-15  1:36   ` Lei Wen
2011-03-15  3:40     ` [U-Boot] [PATCH 0/5] add i2c support to pantheon and aramada100 Lei Wen
2011-03-15  8:12       ` Wolfgang Denk
2011-03-17  6:26         ` Lei Wen
2011-03-17  6:45       ` [U-Boot] [PATCH V3 " Lei Wen
2011-03-28  5:48         ` [U-Boot] [PATCH V4 0/6] " Lei Wen
2011-03-28  6:53           ` [U-Boot] [PATCH V5 " Lei Wen
2011-03-31  8:37             ` [U-Boot] [PATCH V6 0/5] " Lei Wen
2011-04-03 13:00               ` [U-Boot] [PATCH V7 " Lei Wen
2011-04-05  8:00                 ` [U-Boot] [PATCH V8 0/6] " Lei Wen
2011-04-07 13:29                   ` Prafulla Wadaskar
2011-04-07 13:33                     ` Heiko Schocher
2011-04-13 14:01                   ` Prafulla Wadaskar
2011-04-13 14:14                     ` Lei Wen
2011-04-13 14:26                       ` Prafulla Wadaskar
2011-04-13 14:36                         ` Lei Wen
2011-04-13 14:38                   ` Prafulla Wadaskar
2011-04-05  8:00                 ` [U-Boot] [PATCH V8 1/6] pxa: move i2c driver to the common place Lei Wen
2011-04-20 22:32                   ` Wolfgang Denk
2011-04-21  2:42                     ` Lei Wen
2011-04-21  2:47                       ` Macpaul Lin
2011-04-21  2:50                         ` Lei Wen
2011-04-21  3:31                     ` [U-Boot] [PATCH V8.1 " Lei Wen
2011-04-05  8:00                 ` [U-Boot] [PATCH V8 2/6] mv_i2c: fix timeout value to be consistent with comments Lei Wen
2011-04-05  8:00                 ` [U-Boot] [PATCH V8 3/6] mv_i2c: use structure to replace the direclty define Lei Wen
2011-04-05  8:00                 ` [U-Boot] [PATCH V8 4/6] I2C: add i2c support for Pantheon platform Lei Wen
2011-04-05  8:00                 ` [U-Boot] [PATCH V8 5/6] I2C: mv_i2c: add multi bus support Lei Wen
2011-04-05  8:01                 ` [U-Boot] [PATCH V8 6/6] I2C: add i2c support for Armada100 platform Lei Wen
2011-04-03 13:00               ` [U-Boot] [PATCH V7 1/5] pxa: move i2c driver to the common place Lei Wen
2011-04-03 13:00               ` [U-Boot] [PATCH V7 2/5] mv_i2c: use structure to replace the direclty define Lei Wen
2011-04-03 13:27                 ` Wolfgang Denk
2011-04-03 13:00               ` [U-Boot] [PATCH V7 3/5] I2C: add i2c support for Pantheon platform Lei Wen
2011-04-03 13:00               ` [U-Boot] [PATCH V7 4/5] I2C: mv_i2c: add multi bus support Lei Wen
2011-04-03 13:00               ` [U-Boot] [PATCH V7 5/5] I2C: add i2c support for Armada100 platform Lei Wen
2011-03-31  8:37             ` [U-Boot] [PATCH V6 1/5] pxa: move i2c driver to the common place Lei Wen
2011-03-31  8:37             ` [U-Boot] [PATCH V6 2/5] mv_i2c: use structure to replace the direclty define Lei Wen
2011-04-01 18:29               ` Prafulla Wadaskar
2011-04-03 11:30                 ` Lei Wen
2011-04-03 13:21                   ` Wolfgang Denk
2011-03-31  8:37             ` [U-Boot] [PATCH V6 3/5] I2C: add i2c support for Pantheon platform Lei Wen
2011-04-01 18:34               ` Prafulla Wadaskar
2011-04-03 11:32                 ` Lei Wen
2011-03-31  8:37             ` [U-Boot] [PATCH V6 4/5] I2C: mv_i2c: add multi bus support Lei Wen
2011-04-01 18:36               ` Prafulla Wadaskar
2011-03-31  8:37             ` [U-Boot] [PATCH V6 5/5] I2C: add i2c support for Armada100 platform Lei Wen
2011-04-01 18:39               ` Prafulla Wadaskar
2011-03-28  6:53           ` [U-Boot] [PATCH V5 1/6] io: add and* and or* operation api to set and clear bit Lei Wen
2011-03-28  6:53           ` [U-Boot] [PATCH V5 2/6] pxa: move i2c driver to the common place Lei Wen
2011-03-28  6:53           ` [U-Boot] [PATCH V5 3/6] mv_i2c: use structure to replace the direclty define Lei Wen
2011-03-29 13:27             ` Prafulla Wadaskar
2011-03-30 14:11               ` Lei Wen
2011-03-30 18:54                 ` Prafulla Wadaskar
2011-03-28  6:53           ` [U-Boot] [PATCH V5 4/6] I2C: add i2c support for Pantheon platform Lei Wen
2011-03-29 13:07             ` Prafulla Wadaskar
2011-03-30 14:05               ` Lei Wen
2011-03-30 18:56                 ` Prafulla Wadaskar
2011-03-31  7:49                   ` Lei Wen
2011-03-28  6:53           ` [U-Boot] [PATCH V5 5/6] I2C: mv_i2c: add multi bus support Lei Wen
2011-03-28  6:53           ` [U-Boot] [PATCH V5 6/6] I2C: add i2c support for Armada100 platform Lei Wen
2011-03-29 13:09             ` Prafulla Wadaskar
2011-03-28  5:48         ` [U-Boot] [PATCH V4 1/6] io: add and* and or* operation api to set and clear bit Lei Wen
2011-03-28  5:57           ` Wolfgang Denk
2011-03-28  6:01             ` Lei Wen
2011-03-28  6:03             ` Lei Wen
2011-03-28  6:29               ` Wolfgang Denk
2011-03-28  7:04                 ` Lei Wen
2011-03-28 16:05           ` Scott Wood
2011-03-29  2:47             ` Lei Wen
2011-03-29 16:03               ` Scott Wood
2011-03-30 14:08                 ` Lei Wen
2011-03-29  2:53             ` [U-Boot] [PATCH V5.1 " Lei Wen
2011-03-29  5:40               ` Prafulla Wadaskar
2011-03-29  5:44                 ` Mike Frysinger
2011-03-28  5:48         ` [U-Boot] [PATCH V4 2/6] pxa: move i2c driver to the common place Lei Wen
2011-03-28  5:48         ` [U-Boot] [PATCH V4 3/6] mv_i2c: use structure to replace the direclty define Lei Wen
2011-03-28  5:48         ` [U-Boot] [PATCH V4 4/6] I2C: add i2c support for Pantheon platform Lei Wen
2011-03-28  5:48         ` [U-Boot] [PATCH V4 5/6] I2C: mv_i2c: add multi bus support Lei Wen
2011-03-28  5:48         ` [U-Boot] [PATCH V4 6/6] I2C: add i2c support for Armada100 platform Lei Wen
2011-03-17  6:45       ` [U-Boot] [PATCH V3 1/5] pxa: move i2c driver to the common place Lei Wen
2011-03-22 11:42         ` Prafulla Wadaskar
2011-03-22 12:43           ` Lei Wen
2011-03-23  7:38             ` Prafulla Wadaskar
2011-03-23  8:22               ` Heiko Schocher
2011-03-23  8:43                 ` Lei Wen
2011-03-23  8:53                   ` Heiko Schocher
2011-03-23  8:56                     ` Lei Wen
2011-03-23  9:07                       ` Heiko Schocher
2011-03-23  9:16                         ` Prafulla Wadaskar
2011-03-23  9:12                     ` Prafulla Wadaskar
2011-03-17  6:45       ` [U-Boot] [PATCH V3 2/5] mv_i2c: use structure to replace the direclty define Lei Wen
2011-03-22 11:17         ` Prafulla Wadaskar
2011-03-22 12:34           ` Lei Wen
2011-03-22 15:16             ` Wolfgang Denk
2011-03-23  8:48               ` Lei Wen
2011-03-17  6:45       ` [U-Boot] [PATCH V3 3/5] I2C: add i2c support for Pantheon platform Lei Wen
2011-03-22 11:22         ` Prafulla Wadaskar
2011-03-22 12:38           ` Lei Wen
2011-03-17  6:45       ` [U-Boot] [PATCH V3 4/5] I2C: mv_i2c: add multi bus support Lei Wen
2011-03-17  6:45       ` [U-Boot] [PATCH V3 5/5] I2C: add i2c support for Armada100 platform Lei Wen
2011-03-22 11:40         ` Prafulla Wadaskar
2011-03-22 12:39           ` Lei Wen
2011-03-15  3:40     ` [U-Boot] [PATCH V2 1/5] pxa: move i2c driver to the common place Lei Wen
2011-03-15  6:48       ` Heiko Schocher
2011-03-17  6:25         ` Lei Wen
2011-03-15  8:09       ` Wolfgang Denk
2011-03-15  3:40     ` [U-Boot] [PATCH v2 2/5] mvi2c: use structure to replace the direclty define Lei Wen
2011-03-15  6:54       ` Heiko Schocher
2011-03-17  6:28         ` Lei Wen
2011-03-17  7:12           ` Heiko Schocher
2011-03-15  3:40     ` [U-Boot] [PATCH v2 3/5] I2C: add i2c support for Pantheon platform Lei Wen
2011-03-15  6:58       ` Heiko Schocher
2011-03-15  3:40     ` [U-Boot] [PATCH v2 4/5] I2C: mvi2c: add multi bus support Lei Wen
2011-03-15  7:01       ` Heiko Schocher
2011-03-15  3:40     ` [U-Boot] [PATCH v2 5/5] I2C: add i2c support for Armada100 platform Lei Wen
2011-03-15  7:08       ` Heiko Schocher
2011-03-17  6:38         ` Lei Wen
2011-03-17  7:15           ` Heiko Schocher
  -- strict thread matches above, loose matches on Subject: below --
2011-04-13 14:36 [U-Boot] [PATCH V8 0/6] add i2c support to pantheon and aramada100 Prafulla Wadaskar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox