[U-Boot] 12/12 Multiadapter/multibus I2C, configs part 5

ksi at koi8.net ksi at koi8.net
Thu Feb 12 23:31:25 CET 2009


Signed-off-by: Sergey Kubushyn <ksi at koi8.net>
---
diff -purN u-boot-i2c.orig/include/configs/mgcoge.h u-boot-i2c/include/configs/mgcoge.h
--- u-boot-i2c.orig/include/configs/mgcoge.h	2009-02-12 10:43:41.000000000 -0800
+++ u-boot-i2c/include/configs/mgcoge.h	2009-02-12 10:46:00.000000000 -0800
@@ -62,6 +62,7 @@
  * must be unset.
  */
 #define	CONFIG_ETHER_ON_SCC		/* Ethernet is on SCC */
+#define CONFIG_NET_MULTI		/* ether_scc.c won't compile otherwise */
 #undef	CONFIG_ETHER_ON_FCC		/* Ethernet is not on FCC     */
 #undef	CONFIG_ETHER_NONE		/* No external Ethernet   */
 
@@ -142,14 +143,21 @@
 
 /* enable I2C and select the hardware/software driver */
 #undef	CONFIG_HARD_I2C			/* I2C with hardware support	*/
-#define	CONFIG_SOFT_I2C		1	/* I2C bit-banged		*/
-#define CONFIG_SYS_I2C_SPEED		50000	/* I2C speed and slave address	*/
-#define CONFIG_SYS_I2C_SLAVE		0x7F
-
+#define CONFIG_NEW_I2C
+#define CONFIG_SYS_NUM_I2C_ADAPTERS	1
+#define CONFIG_SYS_NUM_I2C_BUSSES	3
+#define CONFIG_SYS_I2C_MAX_HOPS		1
+#define CONFIG_SOFT_I2C			/* I2C bit-banged */
+#define I2C_SOFT_DECLARATIONS		I2C_SOFT_DEFS
+#define CONFIG_SYS_SOFT_I2C_SPEED	50000
+#define CONFIG_SYS_SOFT_I2C_SLAVE	0x7F
+#define CONFIG_SYS_I2C_ADAPTERS		{&soft_i2c_adap[0]}
+#define CONFIG_SYS_I2C_BUSSES	{	{0, {I2C_NULL_HOP}}, \
+			{0, {{I2C_MUX_PCA9542, 0x70, 0}}}, \
+			{0, {{I2C_MUX_PCA9542, 0x70, 1}}}}
 /*
  * Software (bit-bang) I2C driver configuration
  */
-
 #define I2C_PORT	3		/* Port A=0, B=1, C=2, D=3 */
 #define I2C_ACTIVE	(iop->pdir |=  0x00010000)
 #define I2C_TRISTATE	(iop->pdir &= ~0x00010000)
@@ -160,11 +168,10 @@
 			else    iop->pdat &= ~0x00020000
 #define I2C_DELAY	udelay(5)	/* 1/4 I2C clock duration */
 
-#define CONFIG_I2C_MULTI_BUS	1
-#define CONFIG_I2C_CMD_TREE	1
-#define CONFIG_SYS_MAX_I2C_BUS		2
+/* I2C_INIT_BOARD specific... */
 #define CONFIG_SYS_I2C_INIT_BOARD	1
-#define CONFIG_I2C_MUX		1
+#define SOFT_I2C_INIT_BOARD		i2c_init_board()
+#define CONFIG_SYS_I2C_SPEED		CONFIG_SYS_SOFT_I2C_SPEED
 
 /* EEprom support */
 #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN	1
@@ -174,6 +181,7 @@
 #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 10
 
 /* Support the IVM EEprom */
+#define CONFIG_SYS_IVM_EEPROM_BUS_NUM	1
 #define	CONFIG_SYS_IVM_EEPROM_ADR	0x50
 #define CONFIG_SYS_IVM_EEPROM_MAX_LEN	0x400
 #define CONFIG_SYS_IVM_EEPROM_PAGE_LEN	0x100
@@ -184,7 +192,7 @@
 #define CONFIG_SYS_DTT_MAX_TEMP	70
 #define CONFIG_SYS_DTT_LOW_TEMP	-30
 #define CONFIG_SYS_DTT_HYSTERESIS	3
-#define CONFIG_SYS_DTT_BUS_NUM		(CONFIG_SYS_MAX_I2C_BUS)
+#define CONFIG_SYS_DTT_BUS_NUM		2
 
 #define CONFIG_SYS_IMMR		0xF0000000
 
diff -purN u-boot-i2c.orig/include/configs/mgsuvd.h u-boot-i2c/include/configs/mgsuvd.h
--- u-boot-i2c.orig/include/configs/mgsuvd.h	2009-02-12 10:43:41.000000000 -0800
+++ u-boot-i2c/include/configs/mgsuvd.h	2009-02-12 10:46:00.000000000 -0800
@@ -265,11 +265,18 @@
 
 /* enable I2C and select the hardware/software driver */
 #undef	CONFIG_HARD_I2C			/* I2C with hardware support	*/
-#define	CONFIG_SOFT_I2C		1	/* I2C bit-banged		*/
-#define CONFIG_SYS_I2C_SPEED		50000	/* I2C speed and slave address	*/
-#define CONFIG_SYS_I2C_SLAVE		0x7F
-#define I2C_SOFT_DECLARATIONS
-
+#define CONFIG_NEW_I2C
+#define CONFIG_SYS_NUM_I2C_ADAPTERS	1
+#define CONFIG_SYS_NUM_I2C_BUSSES	3
+#define CONFIG_SYS_I2C_MAX_HOPS		1
+#define CONFIG_SOFT_I2C			/* I2C bit-banged */
+#define I2C_SOFT_DECLARATIONS		I2C_SOFT_DEFS
+#define CONFIG_SYS_SOFT_I2C_SPEED	50000
+#define CONFIG_SYS_SOFT_I2C_SLAVE	0x7F
+#define CONFIG_SYS_I2C_ADAPTERS		{&soft_i2c_adap[0]}
+#define CONFIG_SYS_I2C_BUSSES	{	{0, {I2C_NULL_HOP}}, \
+			{0, {{I2C_MUX_PCA9542, 0x70, 0}}}, \
+			{0, {{I2C_MUX_PCA9542, 0x70, 1}}}}
 /*
  * Software (bit-bang) I2C driver configuration
  */
@@ -298,11 +305,10 @@
 			}
 #define I2C_DELAY	udelay(50)	/* 1/4 I2C clock duration */
 
-#define CONFIG_I2C_MULTI_BUS	1
-#define CONFIG_I2C_CMD_TREE	1
-#define CONFIG_SYS_MAX_I2C_BUS		2
+/* I2C_INIT_BOARD specific... */
 #define CONFIG_SYS_I2C_INIT_BOARD	1
-#define CONFIG_I2C_MUX		1
+#define SOFT_I2C_INIT_BOARD		i2c_init_board()
+#define CONFIG_SYS_I2C_SPEED		CONFIG_SYS_SOFT_I2C_SPEED
 
 /* EEprom support */
 #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN	1
@@ -312,6 +318,7 @@
 #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 10
 
 /* Support the IVM EEprom */
+#define CONFIG_SYS_IVM_EEPROM_BUS_NUM	1
 #define	CONFIG_SYS_IVM_EEPROM_ADR	0x50
 #define CONFIG_SYS_IVM_EEPROM_MAX_LEN	0x400
 #define CONFIG_SYS_IVM_EEPROM_PAGE_LEN	0x100
@@ -322,6 +329,6 @@
 #define CONFIG_SYS_DTT_MAX_TEMP	70
 #define CONFIG_SYS_DTT_LOW_TEMP	-30
 #define CONFIG_SYS_DTT_HYSTERESIS	3
-#define CONFIG_SYS_DTT_BUS_NUM		(CONFIG_SYS_MAX_I2C_BUS)
+#define CONFIG_SYS_DTT_BUS_NUM		2
 
 #endif	/* __CONFIG_H */
diff -purN u-boot-i2c.orig/include/configs/mpc7448hpc2.h u-boot-i2c/include/configs/mpc7448hpc2.h
--- u-boot-i2c.orig/include/configs/mpc7448hpc2.h	2009-02-12 10:43:41.000000000 -0800
+++ u-boot-i2c/include/configs/mpc7448hpc2.h	2009-02-12 10:46:00.000000000 -0800
@@ -178,7 +178,12 @@
  * Miscellaneous configurable options
  */
 #define CONFIG_VERSION_VARIABLE		1
+
+#define CONFIG_NEW_I2C
 #define CONFIG_TSI108_I2C
+#define CONFIG_SYS_TSI108_I2C_SPEED	100000	/* Bogus */
+#define CONFIG_SYS_TSI108_I2C_SLAVE	1	/* Bogus */
+#define CONFIG_SYS_I2C_ADAPTERS		{&tsi108_i2c_adap}
 
 #define CONFIG_SYS_I2C_EEPROM_ADDR		0x50	/* I2C EEPROM page 1 */
 #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN		1	/* Bytes of address */
diff -purN u-boot-i2c.orig/include/configs/omap2420h4.h u-boot-i2c/include/configs/omap2420h4.h
--- u-boot-i2c.orig/include/configs/omap2420h4.h	2009-02-12 10:43:41.000000000 -0800
+++ u-boot-i2c/include/configs/omap2420h4.h	2009-02-12 10:46:00.000000000 -0800
@@ -108,10 +108,11 @@
   /*
    * I2C configuration
    */
-#define CONFIG_HARD_I2C
-#define CONFIG_SYS_I2C_SPEED          100000
-#define CONFIG_SYS_I2C_SLAVE          1
-#define CONFIG_DRIVER_OMAP24XX_I2C
+#define CONFIG_NEW_I2C
+#define CONFIG_OMAP24XX_I2C
+#define CONFIG_SYS_OMAP24XX_I2C_SPEED	100000	/* I2C speed and slave address */
+#define CONFIG_SYS_OMAP24XX_I2C_SLAVE	1
+#define CONFIG_SYS_I2C_ADAPTERS		{&omap24xx_i2c_adap[0]}
 
 /* allow to overwrite serial and ethaddr */
 #define CONFIG_ENV_OVERWRITE
diff -purN u-boot-i2c.orig/include/configs/omap3_beagle.h u-boot-i2c/include/configs/omap3_beagle.h
--- u-boot-i2c.orig/include/configs/omap3_beagle.h	2009-02-12 10:43:41.000000000 -0800
+++ u-boot-i2c/include/configs/omap3_beagle.h	2009-02-12 10:46:00.000000000 -0800
@@ -111,11 +111,12 @@
 #undef CONFIG_CMD_NFS		/* NFS support			*/
 
 #define CONFIG_SYS_NO_FLASH
-#define CONFIG_SYS_I2C_SPEED		100000
-#define CONFIG_SYS_I2C_SLAVE		1
-#define CONFIG_SYS_I2C_BUS		0
-#define CONFIG_SYS_I2C_BUS_SELECT	1
-#define CONFIG_DRIVER_OMAP34XX_I2C	1
+
+#define CONFIG_NEW_I2C
+#define CONFIG_OMAP24XX_I2C
+#define CONFIG_SYS_OMAP24XX_I2C_SPEED	100000	/* I2C speed and slave address */
+#define CONFIG_SYS_OMAP24XX_I2C_SLAVE	1
+#define CONFIG_SYS_I2C_ADAPTERS		{&omap24xx_i2c_adap[0]}
 
 /*
  * Board NAND Info.
diff -purN u-boot-i2c.orig/include/configs/omap3_evm.h u-boot-i2c/include/configs/omap3_evm.h
--- u-boot-i2c.orig/include/configs/omap3_evm.h	2009-02-12 10:43:41.000000000 -0800
+++ u-boot-i2c/include/configs/omap3_evm.h	2009-02-12 10:46:00.000000000 -0800
@@ -116,11 +116,12 @@
 #undef CONFIG_CMD_IMLS		/* List all found images	*/
 
 #define CONFIG_SYS_NO_FLASH
-#define CONFIG_SYS_I2C_SPEED		100000
-#define CONFIG_SYS_I2C_SLAVE		1
-#define CONFIG_SYS_I2C_BUS		0
-#define CONFIG_SYS_I2C_BUS_SELECT	1
-#define CONFIG_DRIVER_OMAP34XX_I2C	1
+
+#define CONFIG_NEW_I2C
+#define CONFIG_OMAP24XX_I2C
+#define CONFIG_SYS_OMAP24XX_I2C_SPEED	100000	/* I2C speed and slave address */
+#define CONFIG_SYS_OMAP24XX_I2C_SLAVE	1
+#define CONFIG_SYS_I2C_ADAPTERS		{&omap24xx_i2c_adap[0]}
 
 /*
  * Board NAND Info.
diff -purN u-boot-i2c.orig/include/configs/omap3_overo.h u-boot-i2c/include/configs/omap3_overo.h
--- u-boot-i2c.orig/include/configs/omap3_overo.h	2009-02-12 10:43:41.000000000 -0800
+++ u-boot-i2c/include/configs/omap3_overo.h	2009-02-12 10:46:00.000000000 -0800
@@ -103,11 +103,11 @@
 #undef CONFIG_CMD_NFS		/* NFS support			*/
 
 #define CONFIG_SYS_NO_FLASH
-#define CONFIG_SYS_I2C_SPEED		100000
-#define CONFIG_SYS_I2C_SLAVE		1
-#define CONFIG_SYS_I2C_BUS		0
-#define CONFIG_SYS_I2C_BUS_SELECT	1
-#define CONFIG_DRIVER_OMAP34XX_I2C	1
+#define CONFIG_NEW_I2C
+#define CONFIG_OMAP24XX_I2C
+#define CONFIG_SYS_OMAP24XX_I2C_SPEED	100000	/* I2C speed and slave address */
+#define CONFIG_SYS_OMAP24XX_I2C_SLAVE	1
+#define CONFIG_SYS_I2C_ADAPTERS		{&omap24xx_i2c_adap[0]}
 
 /*
  * Board NAND Info.
diff -purN u-boot-i2c.orig/include/configs/omap3_pandora.h u-boot-i2c/include/configs/omap3_pandora.h
--- u-boot-i2c.orig/include/configs/omap3_pandora.h	2009-02-12 10:43:41.000000000 -0800
+++ u-boot-i2c/include/configs/omap3_pandora.h	2009-02-12 10:46:00.000000000 -0800
@@ -106,11 +106,11 @@
 #undef CONFIG_CMD_NFS		/* NFS support			*/
 
 #define CONFIG_SYS_NO_FLASH
-#define CONFIG_SYS_I2C_SPEED		100000
-#define CONFIG_SYS_I2C_SLAVE		1
-#define CONFIG_SYS_I2C_BUS		0
-#define CONFIG_SYS_I2C_BUS_SELECT	1
-#define CONFIG_DRIVER_OMAP34XX_I2C	1
+#define CONFIG_NEW_I2C
+#define CONFIG_OMAP24XX_I2C
+#define CONFIG_SYS_OMAP24XX_I2C_SPEED	100000	/* I2C speed and slave address */
+#define CONFIG_SYS_OMAP24XX_I2C_SLAVE	1
+#define CONFIG_SYS_I2C_ADAPTERS		{&omap24xx_i2c_adap[0]}
 
 /*
  * Board NAND Info.
diff -purN u-boot-i2c.orig/include/configs/omap3_zoom1.h u-boot-i2c/include/configs/omap3_zoom1.h
--- u-boot-i2c.orig/include/configs/omap3_zoom1.h	2009-02-12 10:43:41.000000000 -0800
+++ u-boot-i2c/include/configs/omap3_zoom1.h	2009-02-12 10:46:00.000000000 -0800
@@ -112,11 +112,11 @@
 #undef CONFIG_CMD_NFS		/* NFS support			*/
 
 #define CONFIG_SYS_NO_FLASH
-#define CONFIG_SYS_I2C_SPEED		100000
-#define CONFIG_SYS_I2C_SLAVE		1
-#define CONFIG_SYS_I2C_BUS		0
-#define CONFIG_SYS_I2C_BUS_SELECT	1
-#define CONFIG_DRIVER_OMAP34XX_I2C	1
+#define CONFIG_NEW_I2C
+#define CONFIG_OMAP24XX_I2C
+#define CONFIG_SYS_OMAP24XX_I2C_SPEED	100000	/* I2C speed and slave address */
+#define CONFIG_SYS_OMAP24XX_I2C_SLAVE	1
+#define CONFIG_SYS_I2C_ADAPTERS		{&omap24xx_i2c_adap[0]}
 
 /*
  * Board NAND Info.
diff -purN u-boot-i2c.orig/include/configs/pdnb3.h u-boot-i2c/include/configs/pdnb3.h
--- u-boot-i2c.orig/include/configs/pdnb3.h	2009-02-12 10:43:41.000000000 -0800
+++ u-boot-i2c/include/configs/pdnb3.h	2009-02-12 10:46:00.000000000 -0800
@@ -296,11 +296,12 @@
 
 /* enable I2C and select the hardware/software driver */
 #undef	CONFIG_HARD_I2C			/* I2C with hardware support	*/
-#define	CONFIG_SOFT_I2C		1	/* I2C bit-banged		*/
-
-#define CONFIG_SYS_I2C_SPEED		83000	/* 83 kHz is supposed to work	*/
-#define CONFIG_SYS_I2C_SLAVE		0xFE
-
+#define CONFIG_NEW_I2C
+#define CONFIG_SOFT_I2C			/* I2C bit-banged */
+#define I2C_SOFT_DECLARATIONS		I2C_SOFT_DEFS
+#define CONFIG_SYS_SOFT_I2C_SPEED	83000	/* 83 kHz is supposed to work */
+#define CONFIG_SYS_SOFT_I2C_SLAVE	0xFE
+#define CONFIG_SYS_I2C_ADAPTERS		{&soft_i2c_adap[0]}
 /*
  * Software (bit-bang) I2C driver configuration
  */
diff -purN u-boot-i2c.orig/include/configs/rmu.h u-boot-i2c/include/configs/rmu.h
--- u-boot-i2c.orig/include/configs/rmu.h	2009-02-12 10:43:41.000000000 -0800
+++ u-boot-i2c/include/configs/rmu.h	2009-02-12 10:46:00.000000000 -0800
@@ -61,11 +61,12 @@
 
 /* enable I2C and select the hardware/software driver */
 #undef	CONFIG_HARD_I2C			/* I2C with hardware support	*/
-#define CONFIG_SOFT_I2C		1	/* I2C bit-banged		*/
-
-#define CONFIG_SYS_I2C_SPEED		40000	/* 40 kHz is supposed to work	*/
-#define CONFIG_SYS_I2C_SLAVE		0xFE
-
+#define CONFIG_NEW_I2C
+#define CONFIG_SOFT_I2C			/* I2C bit-banged */
+#define I2C_SOFT_DECLARATIONS		I2C_SOFT_DEFS
+#define CONFIG_SYS_SOFT_I2C_SPEED	40000	/* 40 kHz is supposed to work */
+#define CONFIG_SYS_SOFT_I2C_SLAVE	0xFE
+#define CONFIG_SYS_I2C_ADAPTERS		{&soft_i2c_adap[0]}
 /* Software (bit-bang) I2C driver configuration */
 #define PB_SCL		0x00000020	/* PB 26 */
 #define PB_SDA		0x00000010	/* PB 27 */
diff -purN u-boot-i2c.orig/include/configs/sacsng.h u-boot-i2c/include/configs/sacsng.h
--- u-boot-i2c.orig/include/configs/sacsng.h	2009-02-12 10:43:41.000000000 -0800
+++ u-boot-i2c/include/configs/sacsng.h	2009-02-12 10:46:00.000000000 -0800
@@ -292,14 +292,15 @@
  * configuration items that the driver uses to drive the port pins.
  */
 #undef  CONFIG_HARD_I2C			/* I2C with hardware support	*/
-#define CONFIG_SOFT_I2C		1	/* I2C bit-banged		*/
-#define CONFIG_SYS_I2C_SPEED		400000	/* I2C speed and slave address	*/
-#define CONFIG_SYS_I2C_SLAVE		0x7F
-
+#define CONFIG_NEW_I2C
+#define CONFIG_SOFT_I2C			/* I2C bit-banged */
+#define I2C_SOFT_DECLARATIONS		I2C_SOFT_DEFS
+#define CONFIG_SYS_SOFT_I2C_SPEED	400000
+#define CONFIG_SYS_SOFT_I2C_SLAVE	0x7F
+#define CONFIG_SYS_I2C_ADAPTERS		{&soft_i2c_adap[0]}
 /*
  * Software (bit-bang) I2C driver configuration
  */
-#ifdef CONFIG_SOFT_I2C
 #define I2C_PORT	3		/* Port A=0, B=1, C=2, D=3 */
 #define I2C_ACTIVE	(iop->pdir |=  0x00010000)
 #define I2C_TRISTATE	(iop->pdir &= ~0x00010000)
@@ -309,7 +310,6 @@
 #define I2C_SCL(bit)	if(bit) iop->pdat |=  0x00020000; \
 			else    iop->pdat &= ~0x00020000
 #define I2C_DELAY	udelay(20)	/* 1/4 I2C clock duration */
-#endif /* CONFIG_SOFT_I2C */
 
 /* Define this to reserve an entire FLASH sector for
  * environment variables. Otherwise, the environment will be
diff -purN u-boot-i2c.orig/include/configs/sbc8260.h u-boot-i2c/include/configs/sbc8260.h
--- u-boot-i2c.orig/include/configs/sbc8260.h	2009-02-12 10:43:41.000000000 -0800
+++ u-boot-i2c/include/configs/sbc8260.h	2009-02-12 10:46:00.000000000 -0800
@@ -250,14 +250,15 @@
  * configuration items that the driver uses to drive the port pins.
  */
 #undef  CONFIG_HARD_I2C			/* I2C with hardware support	*/
-#define CONFIG_SOFT_I2C		1	/* I2C bit-banged		*/
-#define CONFIG_SYS_I2C_SPEED		400000	/* I2C speed and slave address	*/
-#define CONFIG_SYS_I2C_SLAVE		0x7F
-
+#define CONFIG_NEW_I2C
+#define CONFIG_SOFT_I2C			/* I2C bit-banged */
+#define I2C_SOFT_DECLARATIONS		I2C_SOFT_DEFS
+#define CONFIG_SYS_SOFT_I2C_SPEED	400000
+#define CONFIG_SYS_SOFT_I2C_SLAVE	0x7F
+#define CONFIG_SYS_I2C_ADAPTERS		{&soft_i2c_adap[0]}
 /*
  * Software (bit-bang) I2C driver configuration
  */
-#ifdef CONFIG_SOFT_I2C
 #define I2C_PORT	3		/* Port A=0, B=1, C=2, D=3 */
 #define I2C_ACTIVE	(iop->pdir |=  0x00010000)
 #define I2C_TRISTATE	(iop->pdir &= ~0x00010000)
@@ -267,7 +268,6 @@
 #define I2C_SCL(bit)	if(bit) iop->pdat |=  0x00020000; \
 			else    iop->pdat &= ~0x00020000
 #define I2C_DELAY	udelay(5)	/* 1/4 I2C clock duration */
-#endif /* CONFIG_SOFT_I2C */
 
 
 /* Define this to reserve an entire FLASH sector (256 KB) for
diff -purN u-boot-i2c.orig/include/configs/sbc8349.h u-boot-i2c/include/configs/sbc8349.h
--- u-boot-i2c.orig/include/configs/sbc8349.h	2009-02-12 10:43:41.000000000 -0800
+++ u-boot-i2c/include/configs/sbc8349.h	2009-02-12 10:46:00.000000000 -0800
@@ -312,17 +312,13 @@
 #define CONFIG_OF_STDOUT_VIA_ALIAS	1
 
 /* I2C */
-#define CONFIG_HARD_I2C			/* I2C with hardware support*/
-#undef CONFIG_SOFT_I2C			/* I2C bit-banged */
+#define CONFIG_NEW_I2C
 #define CONFIG_FSL_I2C
-#define CONFIG_I2C_CMD_TREE
-#define CONFIG_SYS_I2C_SPEED		400000	/* I2C speed and slave address */
-#define CONFIG_SYS_I2C_SLAVE		0x7F
-#define CONFIG_SYS_I2C_NOPROBES	{0x69}	/* Don't probe these addrs */
-#define CONFIG_SYS_I2C1_OFFSET		0x3000
-#define CONFIG_SYS_I2C2_OFFSET		0x3100
-#define CONFIG_SYS_I2C_OFFSET		CONFIG_SYS_I2C2_OFFSET
-/* could also use CONFIG_I2C_MULTI_BUS and CONFIG_SPD_BUS_NUM... */
+#define CONFIG_SYS_FSL_I2C_SPEED	400000	/* I2C speed and slave address */
+#define CONFIG_SYS_FSL_I2C_SLAVE	0x7F
+#define CONFIG_SYS_FSL_I2C_OFFSET	0x3100
+#define CONFIG_SYS_I2C_ADAPTERS		{&fsl_i2c_adap[0]}
+#define CONFIG_SYS_I2C_NOPROBES		{0x69}	/* Don't probe these addrs */
 
 /* TSEC */
 #define CONFIG_SYS_TSEC1_OFFSET 0x24000
diff -purN u-boot-i2c.orig/include/configs/sbc8548.h u-boot-i2c/include/configs/sbc8548.h
--- u-boot-i2c.orig/include/configs/sbc8548.h	2009-02-12 10:43:41.000000000 -0800
+++ u-boot-i2c/include/configs/sbc8548.h	2009-02-12 10:46:00.000000000 -0800
@@ -320,13 +320,13 @@
 /*
  * I2C
  */
-#define CONFIG_FSL_I2C		/* Use FSL common I2C driver */
-#define CONFIG_HARD_I2C		/* I2C with hardware support*/
-#undef	CONFIG_SOFT_I2C		/* I2C bit-banged */
-#define CONFIG_SYS_I2C_SPEED		400000	/* I2C speed and slave address */
+#define CONFIG_NEW_I2C
+#define CONFIG_FSL_I2C
+#define CONFIG_SYS_FSL_I2C_SPEED	400000	/* I2C speed and slave address */
+#define CONFIG_SYS_FSL_I2C_SLAVE	0x7F
+#define CONFIG_SYS_FSL_I2C_OFFSET	0x3000
+#define CONFIG_SYS_I2C_ADAPTERS		{&fsl_i2c_adap[0]}
 #define CONFIG_SYS_I2C_EEPROM_ADDR	0x50
-#define CONFIG_SYS_I2C_SLAVE		0x7F
-#define CONFIG_SYS_I2C_OFFSET		0x3000
 
 /*
  * General PCI
diff -purN u-boot-i2c.orig/include/configs/sbc8560.h u-boot-i2c/include/configs/sbc8560.h
--- u-boot-i2c.orig/include/configs/sbc8560.h	2009-02-12 10:43:41.000000000 -0800
+++ u-boot-i2c/include/configs/sbc8560.h	2009-02-12 10:46:00.000000000 -0800
@@ -222,13 +222,13 @@
 /*
  * I2C
  */
-#define CONFIG_FSL_I2C		/* Use FSL common I2C driver */
-#define CONFIG_HARD_I2C		/* I2C with hardware support*/
-#undef	CONFIG_SOFT_I2C			/* I2C bit-banged */
-#define CONFIG_SYS_I2C_SPEED		400000	/* I2C speed and slave address	*/
-#define CONFIG_SYS_I2C_SLAVE		0x7F
-#define CONFIG_SYS_I2C_NOPROBES	{0x69}	/* Don't probe these addrs */
-#define CONFIG_SYS_I2C_OFFSET		0x3000
+#define CONFIG_NEW_I2C
+#define CONFIG_FSL_I2C
+#define CONFIG_SYS_FSL_I2C_SPEED	400000	/* I2C speed and slave address */
+#define CONFIG_SYS_FSL_I2C_SLAVE	0x7F
+#define CONFIG_SYS_FSL_I2C_OFFSET	0x3000
+#define CONFIG_SYS_I2C_ADAPTERS		{&fsl_i2c_adap[0]}
+#define CONFIG_SYS_I2C_NOPROBES		{0x69}	/* Don't probe these addrs */
 
 #define CONFIG_SYS_PCI_MEM_BASE	0xC0000000
 #define CONFIG_SYS_PCI_MEM_PHYS	0xC0000000
diff -purN u-boot-i2c.orig/include/configs/sbc8641d.h u-boot-i2c/include/configs/sbc8641d.h
--- u-boot-i2c.orig/include/configs/sbc8641d.h	2009-02-12 10:43:41.000000000 -0800
+++ u-boot-i2c/include/configs/sbc8641d.h	2009-02-12 10:46:00.000000000 -0800
@@ -292,13 +292,13 @@
 /*
  * I2C
  */
-#define	CONFIG_FSL_I2C		/* Use FSL common I2C driver */
-#define	CONFIG_HARD_I2C		/* I2C with hardware support*/
-#undef	CONFIG_SOFT_I2C			/* I2C bit-banged */
-#define CONFIG_SYS_I2C_SPEED		400000	/* I2C speed and slave address */
-#define CONFIG_SYS_I2C_SLAVE		0x7F
-#define CONFIG_SYS_I2C_NOPROBES        {0x69}	/* Don't probe these addrs */
-#define CONFIG_SYS_I2C_OFFSET		0x3100
+#define CONFIG_NEW_I2C
+#define CONFIG_FSL_I2C
+#define CONFIG_SYS_FSL_I2C_SPEED	400000	/* I2C speed and slave address */
+#define CONFIG_SYS_FSL_I2C_SLAVE	0x7F
+#define CONFIG_SYS_FSL_I2C_OFFSET	0x3100
+#define CONFIG_SYS_I2C_ADAPTERS		{&fsl_i2c_adap[0]}
+#define CONFIG_SYS_I2C_NOPROBES		{0x69}	/* Don't probe these addrs */
 
 /*
  * RapidIO MMU
diff -purN u-boot-i2c.orig/include/configs/socrates.h u-boot-i2c/include/configs/socrates.h
--- u-boot-i2c.orig/include/configs/socrates.h	2009-02-12 10:43:41.000000000 -0800
+++ u-boot-i2c/include/configs/socrates.h	2009-02-12 10:46:00.000000000 -0800
@@ -235,16 +235,16 @@
 /*
  * I2C
  */
-#define CONFIG_FSL_I2C		/* Use FSL common I2C driver */
-#define CONFIG_HARD_I2C			/* I2C with hardware support	*/
-#undef	CONFIG_SOFT_I2C			/* I2C bit-banged		*/
-#define CONFIG_SYS_I2C_SPEED		102124	/* I2C speed and slave address	*/
-#define CONFIG_SYS_I2C_SLAVE		0x7F
-#define CONFIG_SYS_I2C_OFFSET		0x3000
-
-#define CONFIG_I2C_MULTI_BUS
-#define CONFIG_I2C_CMD_TREE
-#define CONFIG_SYS_I2C2_OFFSET		0x3100
+#define CONFIG_NEW_I2C
+#define CONFIG_SYS_NUM_I2C_ADAPTERS	2
+#define CONFIG_FSL_I2C
+#define CONFIG_SYS_FSL_I2C_SPEED	102124	/* I2C speed and slave address */
+#define CONFIG_SYS_FSL_I2C_SLAVE	0x7F
+#define CONFIG_SYS_FSL_I2C_OFFSET	0x3000
+#define CONFIG_SYS_FSL_I2C2_SPEED	102124	/* I2C speed and slave address */
+#define CONFIG_SYS_FSL_I2C2_SLAVE	0x7F
+#define CONFIG_SYS_FSL_I2C2_OFFSET	0x3100
+#define CONFIG_SYS_I2C_ADAPTERS		{&fsl_i2c_adap[0], &fsl_i2c_adap[1]}
 
 /* I2C RTC */
 #define CONFIG_RTC_RX8025		/* Use Epson rx8025 rtc via i2c	*/
diff -purN u-boot-i2c.orig/include/configs/spc1920.h u-boot-i2c/include/configs/spc1920.h
--- u-boot-i2c.orig/include/configs/spc1920.h	2009-02-12 10:43:41.000000000 -0800
+++ u-boot-i2c/include/configs/spc1920.h	2009-02-12 10:46:00.000000000 -0800
@@ -208,12 +208,12 @@
 #if defined(CONFIG_CMD_I2C)
 /* enable I2C and select the hardware/software driver */
 #undef CONFIG_HARD_I2C                 /* I2C with hardware support    */
-#define CONFIG_SOFT_I2C                1       /* I2C bit-banged               */
-
-#define CONFIG_SYS_I2C_SPEED          93000   /* 93 kHz is supposed to work   */
-#define CONFIG_SYS_I2C_SLAVE          0xFE
-
-#ifdef CONFIG_SOFT_I2C
+#define CONFIG_NEW_I2C
+#define CONFIG_SOFT_I2C			/* I2C bit-banged */
+#define I2C_SOFT_DECLARATIONS		I2C_SOFT_DEFS
+#define CONFIG_SYS_SOFT_I2C_SPEED	93000	/* 93 kHz is supposed to work */
+#define CONFIG_SYS_SOFT_I2C_SLAVE	0xFE
+#define CONFIG_SYS_I2C_ADAPTERS		{&soft_i2c_adap[0]}
 /*
  * Software (bit-bang) I2C driver configuration
  */
@@ -229,7 +229,6 @@
 #define I2C_SCL(bit)   if(bit) immr->im_cpm.cp_pbdat |=  PB_SCL; \
 		       else    immr->im_cpm.cp_pbdat &= ~PB_SCL
 #define I2C_DELAY      udelay(2)       /* 1/4 I2C clock duration */
-#endif /* CONFIG_SOFT_I2C */
 #endif
 
 /*-----------------------------------------------------------------------
diff -purN u-boot-i2c.orig/include/configs/stxgp3.h u-boot-i2c/include/configs/stxgp3.h
--- u-boot-i2c.orig/include/configs/stxgp3.h	2009-02-12 10:43:41.000000000 -0800
+++ u-boot-i2c/include/configs/stxgp3.h	2009-02-12 10:46:00.000000000 -0800
@@ -180,18 +180,12 @@
 /*
  * I2C
  */
-#define CONFIG_FSL_I2C		/* Use FSL common I2C driver */
-#define CONFIG_HARD_I2C		/* I2C with hardware support*/
-#undef	CONFIG_SOFT_I2C			/* I2C bit-banged */
-#define CONFIG_SYS_I2C_SPEED		400000	/* I2C speed and slave address	*/
-#define CONFIG_SYS_I2C_SLAVE		0x7F
-#if 0
-#define CONFIG_SYS_I2C_NOPROBES        {0x00}  /* Don't probe these addrs */
-#else
-/* I did the 'if 0' so we could keep the syntax above if ever needed. */
-#undef CONFIG_SYS_I2C_NOPROBES
-#endif
-#define CONFIG_SYS_I2C_OFFSET		0x3000
+#define CONFIG_NEW_I2C
+#define CONFIG_FSL_I2C
+#define CONFIG_SYS_FSL_I2C_SPEED	400000	/* I2C speed and slave address */
+#define CONFIG_SYS_FSL_I2C_SLAVE	0x7F
+#define CONFIG_SYS_FSL_I2C_OFFSET	0x3000
+#define CONFIG_SYS_I2C_ADAPTERS		{&fsl_i2c_adap[0]}
 
 /* RapdIO Map configuration, mapped 1:1.
 */
diff -purN u-boot-i2c.orig/include/configs/stxssa.h u-boot-i2c/include/configs/stxssa.h
--- u-boot-i2c.orig/include/configs/stxssa.h	2009-02-12 10:43:41.000000000 -0800
+++ u-boot-i2c/include/configs/stxssa.h	2009-02-12 10:46:00.000000000 -0800
@@ -197,13 +197,12 @@
 /*
  * I2C
  */
-#define CONFIG_FSL_I2C			/* Use FSL common I2C driver */
-#define  CONFIG_HARD_I2C		/* I2C with hardware support*/
-#undef	CONFIG_SOFT_I2C			/* I2C bit-banged */
-#define CONFIG_SYS_I2C_SPEED		400000	/* I2C speed and slave address	*/
-#define CONFIG_SYS_I2C_SLAVE		0x7F
-#undef CONFIG_SYS_I2C_NOPROBES
-#define CONFIG_SYS_I2C_OFFSET		0x3000
+#define CONFIG_NEW_I2C
+#define CONFIG_FSL_I2C
+#define CONFIG_SYS_FSL_I2C_SPEED	400000	/* I2C speed and slave address */
+#define CONFIG_SYS_FSL_I2C_SLAVE	0x7F
+#define CONFIG_SYS_FSL_I2C_OFFSET	0x3000
+#define CONFIG_SYS_I2C_ADAPTERS		{&fsl_i2c_adap[0]}
 
 /* I2C RTC */
 #define CONFIG_RTC_DS1337		/* This is really a DS1339 RTC	*/
diff -purN u-boot-i2c.orig/include/configs/uc100.h u-boot-i2c/include/configs/uc100.h
--- u-boot-i2c.orig/include/configs/uc100.h	2009-02-12 10:43:41.000000000 -0800
+++ u-boot-i2c/include/configs/uc100.h	2009-02-12 10:46:00.000000000 -0800
@@ -468,12 +468,12 @@
 
 /* enable I2C and select the hardware/software driver */
 #undef	CONFIG_HARD_I2C			/* I2C with hardware support	*/
-#define	CONFIG_SOFT_I2C         1	/* I2C bit-banged		*/
-
-#define CONFIG_SYS_I2C_SPEED		93000	/* 93 kHz is supposed to work	*/
-#define CONFIG_SYS_I2C_SLAVE		0xFE
-
-#ifdef CONFIG_SOFT_I2C
+#define CONFIG_NEW_I2C
+#define CONFIG_SOFT_I2C			/* I2C bit-banged */
+#define I2C_SOFT_DECLARATIONS		I2C_SOFT_DEFS
+#define CONFIG_SYS_SOFT_I2C_SPEED	93000	 /* 93 kHz is supposed to work */
+#define CONFIG_SYS_SOFT_I2C_SLAVE	0xFE
+#define CONFIG_SYS_I2C_ADAPTERS		{&soft_i2c_adap[0]}
 /*
  * Software (bit-bang) I2C driver configuration
  */
@@ -489,7 +489,6 @@
 #define I2C_SCL(bit)	if(bit) immr->im_cpm.cp_pbdat |=  PB_SCL; \
 			else    immr->im_cpm.cp_pbdat &= ~PB_SCL
 #define I2C_DELAY	udelay(2)	/* 1/4 I2C clock duration */
-#endif	/* CONFIG_SOFT_I2C */
 
 /*-----------------------------------------------------------------------
  * I2C EEPROM (24C164)
diff -purN u-boot-i2c.orig/include/configs/vct.h u-boot-i2c/include/configs/vct.h
--- u-boot-i2c.orig/include/configs/vct.h	2009-02-12 10:43:41.000000000 -0800
+++ u-boot-i2c/include/configs/vct.h	2009-02-12 10:46:00.000000000 -0800
@@ -235,11 +235,14 @@
  * I2C/EEPROM
  */
 #undef	CONFIG_HARD_I2C			/* I2C with hardware support	*/
-#define	CONFIG_SOFT_I2C			/* I2C bit-banged		*/
-
-#define CONFIG_SYS_I2C_SPEED		83000	/* 83 kHz is supposed to work	*/
-#define CONFIG_SYS_I2C_SLAVE		0x7f
+#define CONFIG_NEW_I2C
+#define CONFIG_SOFT_I2C			/* I2C bit-banged */
+#define I2C_SOFT_DECLARATIONS		I2C_SOFT_DEFS
+#define CONFIG_SYS_SOFT_I2C_SPEED	83000	/* 83 kHz is supposed to work */
+#define CONFIG_SYS_SOFT_I2C_SLAVE	0x7f
+#define CONFIG_SYS_I2C_ADAPTERS		{&soft_i2c_adap[0]}
 
+#define	CONFIG_SOFT_I2C			/* I2C bit-banged		*/
 /*
  * Software (bit-bang) I2C driver configuration
  */
diff -purN u-boot-i2c.orig/include/configs/voiceblue.h u-boot-i2c/include/configs/voiceblue.h
--- u-boot-i2c.orig/include/configs/voiceblue.h	2009-02-12 10:43:41.000000000 -0800
+++ u-boot-i2c/include/configs/voiceblue.h	2009-02-12 10:46:00.000000000 -0800
@@ -97,10 +97,11 @@
 #define CONFIG_DRIVER_SMC91111
 #define CONFIG_SMC91111_BASE	0x08000300
 
-#define CONFIG_HARD_I2C
-#define CONFIG_SYS_I2C_SPEED		100000
-#define CONFIG_SYS_I2C_SLAVE		1
-#define CONFIG_DRIVER_OMAP1510_I2C
+#define CONFIG_NEW_I2C
+#define CONFIG_OMAP1510_I2C
+#define CONFIG_SYS_OMAP1510_I2C_SPEED	100000	/* I2C speed and slave address */
+#define CONFIG_SYS_OMAP1510_I2C_SLAVE	1
+#define CONFIG_SYS_I2C_ADAPTERS		{&omap1510_i2c_adap}
 
 #define CONFIG_RTC_DS1307
 #define CONFIG_SYS_I2C_RTC_ADDR	0x68


More information about the U-Boot mailing list