[U-Boot] [PATCH] I2C:Zynq: Adapt this driver to the new model

Michael Burr michael.burr at logicpd.com
Mon Oct 14 18:25:08 CEST 2013


CONFIGs and README for driver 'zynq_i2c.c'.

Signed-off-by: Michael Burr <michael.burr at logicpd.com>
Cc: Heiko Schocher<hs at denx.de>
Cc: Michal Simek<monstr at monstr.eu>

---

=== This patch depends on the previous patch titled
=== "[PATCH] I2C:Zynq: Adapt this driver to the new model"
=== submitted 26 Sep. 2013.

=== This patch depends on the previous patch titled
=== "[PATCH] I2C: Zynq: Support for 0-length register address"
=== submitted 24 Sep. 2013.

---
 README                 |    9 +++++++++
 include/configs/zynq.h |   10 ++++------
 2 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/README b/README
index ccd47fa..fd2c8fc 100644
--- a/README
+++ b/README
@@ -1995,6 +1995,15 @@ CBFS (Coreboot Filesystem) support
 		  - CONFIG_SYS_I2C_PPC4XX_CH0 activate hardware channel 0
 		  - CONFIG_SYS_I2C_PPC4XX_CH1 activate hardware channel 1
 
+		- drivers/i2c/zynq_i2c.c
+		  - Activate this driver with CONFIG_SYS_I2C_ZYNQ
+		  - This driver operates only as bus-master (i.e. slave-
+		    address == 0) and supports only 100 kbps speed.
+		  - Both bus-controller devices in the Zynq PS (I2C0 and I2C1)
+		    are supported. (However, note that Zynq PL configuration 
+		    may be needed in order to route some bus lines to external
+		    pins.)
+
 		additional defines:
 
 		CONFIG_SYS_NUM_I2C_BUSES
diff --git a/include/configs/zynq.h b/include/configs/zynq.h
index b9f381f..1ae915f 100644
--- a/include/configs/zynq.h
+++ b/include/configs/zynq.h
@@ -56,15 +56,13 @@
 # define CONFIG_DOS_PARTITION
 #endif
 
-#define CONFIG_ZYNQ_I2C0
-
 /* I2C */
-#if defined(CONFIG_ZYNQ_I2C0) || defined(CONFIG_ZYNQ_I2C1)
+#define CONFIG_SYS_I2C_ZYNQ
+#ifdef CONFIG_SYS_I2C_ZYNQ
+# define CONFIG_SYS_I2C
 # define CONFIG_CMD_I2C
-# define CONFIG_ZYNQ_I2C
-# define CONFIG_HARD_I2C
 # define CONFIG_SYS_I2C_SPEED		100000
-# define CONFIG_SYS_I2C_SLAVE		1
+# define CONFIG_SYS_I2C_SLAVE		0
 #endif
 
 #if defined(CONFIG_ZYNQ_DCC)
-- 
1.7.9.5



More information about the U-Boot mailing list