[U-Boot] [PATCH] 10/12 Multiadapter/multibus I2C, configs part 3

ksi at koi8.net ksi at koi8.net
Thu Feb 12 23:29:18 CET 2009


Signed-off-by: Sergey Kubushyn <ksi at koi8.net>
---
diff -purN u-boot-i2c.orig/include/configs/MPC8555CDS.h u-boot-i2c/include/configs/MPC8555CDS.h
--- u-boot-i2c.orig/include/configs/MPC8555CDS.h	2009-02-12 10:43:41.000000000 -0800
+++ u-boot-i2c/include/configs/MPC8555CDS.h	2009-02-12 10:46:00.000000000 -0800
@@ -320,13 +320,13 @@ extern unsigned long get_clock_freq(void
 /*
  * 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 */
 
 /* EEPROM */
 #define CONFIG_ID_EEPROM
diff -purN u-boot-i2c.orig/include/configs/MPC8560ADS.h u-boot-i2c/include/configs/MPC8560ADS.h
--- u-boot-i2c.orig/include/configs/MPC8560ADS.h	2009-02-12 10:43:41.000000000 -0800
+++ u-boot-i2c/include/configs/MPC8560ADS.h	2009-02-12 10:46:00.000000000 -0800
@@ -291,13 +291,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 */
 
 /* RapidIO MMU */
 #define CONFIG_SYS_RIO_MEM_VIRT	0xc0000000	/* base address */
diff -purN u-boot-i2c.orig/include/configs/MPC8568MDS.h u-boot-i2c/include/configs/MPC8568MDS.h
--- u-boot-i2c.orig/include/configs/MPC8568MDS.h	2009-02-12 10:43:41.000000000 -0800
+++ u-boot-i2c/include/configs/MPC8568MDS.h	2009-02-12 10:46:00.000000000 -0800
@@ -306,17 +306,18 @@ extern unsigned long get_clock_freq(void
 /*
  * 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_I2C_MULTI_BUS
-#define CONFIG_I2C_CMD_TREE
-#define CONFIG_SYS_I2C_SPEED		400000	/* I2C speed and slave address */
+#define CONFIG_NEW_I2C
+#define CONFIG_SYS_NUM_I2C_ADAPTERS	2
+#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_FSL_I2C2_SPEED	400000	/* 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]}
+#define CONFIG_SYS_I2C_NOPROBES		{{0,0x69}} /* Don't probe these addrs */
 #define CONFIG_SYS_I2C_EEPROM_ADDR	0x52
-#define CONFIG_SYS_I2C_SLAVE		0x7F
-#define CONFIG_SYS_I2C_NOPROBES        {{0,0x69}}	/* Don't probe these addrs */
-#define CONFIG_SYS_I2C_OFFSET		0x3000
-#define CONFIG_SYS_I2C2_OFFSET		0x3100
 
 /*
  * General PCI
diff -purN u-boot-i2c.orig/include/configs/MPC8572DS.h u-boot-i2c/include/configs/MPC8572DS.h
--- u-boot-i2c.orig/include/configs/MPC8572DS.h	2009-02-12 10:43:41.000000000 -0800
+++ u-boot-i2c/include/configs/MPC8572DS.h	2009-02-12 10:46:00.000000000 -0800
@@ -373,17 +373,18 @@ extern unsigned long get_board_ddr_clk(u
 #define CONFIG_FIT_VERBOSE	1 /* enable fit_format_{error,warning}() */
 
 /* 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_I2C_MULTI_BUS
-#define CONFIG_I2C_CMD_TREE
-#define CONFIG_SYS_I2C_SPEED		400000	/* I2C speed and slave address */
+#define CONFIG_NEW_I2C
+#define CONFIG_SYS_NUM_I2C_ADAPTERS	2
+#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_FSL_I2C2_SPEED	400000	/* 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]}
+#define CONFIG_SYS_I2C_NOPROBES		{{0,0x29}} /* Don't probe these addrs */
 #define CONFIG_SYS_I2C_EEPROM_ADDR	0x57
-#define CONFIG_SYS_I2C_SLAVE		0x7F
-#define CONFIG_SYS_I2C_NOPROBES	{{0,0x29}}/* Don't probe these addrs */
-#define CONFIG_SYS_I2C_OFFSET		0x3000
-#define CONFIG_SYS_I2C2_OFFSET		0x3100
 
 /*
  * I2C2 EEPROM
diff -purN u-boot-i2c.orig/include/configs/MPC8610HPCD.h u-boot-i2c/include/configs/MPC8610HPCD.h
--- u-boot-i2c.orig/include/configs/MPC8610HPCD.h	2009-02-12 10:43:41.000000000 -0800
+++ u-boot-i2c/include/configs/MPC8610HPCD.h	2009-02-12 10:46:00.000000000 -0800
@@ -261,13 +261,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 */
 
 /*
  * General PCI
diff -purN u-boot-i2c.orig/include/configs/MPC8641HPCN.h u-boot-i2c/include/configs/MPC8641HPCN.h
--- u-boot-i2c.orig/include/configs/MPC8641HPCN.h	2009-02-12 10:43:41.000000000 -0800
+++ u-boot-i2c/include/configs/MPC8641HPCN.h	2009-02-12 10:46:00.000000000 -0800
@@ -310,13 +310,13 @@ extern unsigned long get_board_sys_clk(u
 /*
  * 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/MVBLM7.h u-boot-i2c/include/configs/MVBLM7.h
--- u-boot-i2c.orig/include/configs/MVBLM7.h	2009-02-12 10:43:41.000000000 -0800
+++ u-boot-i2c/include/configs/MVBLM7.h	2009-02-12 10:46:00.000000000 -0800
@@ -42,23 +42,22 @@
 #define CONFIG_PCI
 #define CONFIG_83XX_GENERIC_PCI
 #define CONFIG_PCI_SKIP_HOST_BRIDGE
-#define CONFIG_HARD_I2C
 #define CONFIG_TSEC_ENET
 #define CONFIG_MPC8XXX_SPI
 #define CONFIG_HARD_SPI
 #define MVBLM7_MMC_CS   0x04000000
 
 /* I2C */
-#undef CONFIG_SOFT_I2C
-
+#define CONFIG_NEW_I2C
+#define CONFIG_SYS_NUM_I2C_ADAPTERS	2
 #define CONFIG_FSL_I2C
-#define CONFIG_I2C_MULTI_BUS
-#define CONFIG_I2C_CMD_TREE
-#define CONFIG_SYS_I2C_OFFSET		0x3000
-#define CONFIG_SYS_I2C2_OFFSET		0x3100
-
-#define CONFIG_SYS_I2C_SPEED		100000
-#define CONFIG_SYS_I2C_SLAVE		0x7F
+#define CONFIG_SYS_FSL_I2C_SPEED	100000	/* 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	100000	/* 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]}
 
 /*
  * DDR Setup
diff -purN u-boot-i2c.orig/include/configs/NC650.h u-boot-i2c/include/configs/NC650.h
--- u-boot-i2c.orig/include/configs/NC650.h	2009-02-12 10:43:41.000000000 -0800
+++ u-boot-i2c/include/configs/NC650.h	2009-02-12 10:46:00.000000000 -0800
@@ -104,10 +104,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		100000	/* 100 kHz			*/
-#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	100000
+#define CONFIG_SYS_SOFT_I2C_SLAVE	0x7f
+#define CONFIG_SYS_I2C_ADAPTERS		{&soft_i2c_adap[0]}
 /*
  * Software (bit-bang) I2C driver configuration
  */
diff -purN u-boot-i2c.orig/include/configs/PM826.h u-boot-i2c/include/configs/PM826.h
--- u-boot-i2c.orig/include/configs/PM826.h	2009-02-12 10:43:41.000000000 -0800
+++ u-boot-i2c/include/configs/PM826.h	2009-02-12 10:46:00.000000000 -0800
@@ -54,9 +54,12 @@
 
 /* enable I2C and select the hardware/software driver */
 #undef  CONFIG_HARD_I2C
-#define CONFIG_SOFT_I2C		1	/* I2C bit-banged		*/
-# define CONFIG_SYS_I2C_SPEED		50000
-# 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	50000
+#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/PM828.h u-boot-i2c/include/configs/PM828.h
--- u-boot-i2c.orig/include/configs/PM828.h	2009-02-12 10:43:41.000000000 -0800
+++ u-boot-i2c/include/configs/PM828.h	2009-02-12 10:46:00.000000000 -0800
@@ -54,9 +54,12 @@
 
 /* enable I2C and select the hardware/software driver */
 #undef	CONFIG_HARD_I2C
-#define CONFIG_SOFT_I2C		1	/* I2C bit-banged		*/
-# define CONFIG_SYS_I2C_SPEED		50000
-# 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	50000
+#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/PM854.h u-boot-i2c/include/configs/PM854.h
--- u-boot-i2c.orig/include/configs/PM854.h	2009-02-12 10:43:41.000000000 -0800
+++ u-boot-i2c/include/configs/PM854.h	2009-02-12 10:46:00.000000000 -0800
@@ -194,13 +194,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 */
 
 /*
  * EEPROM configuration
diff -purN u-boot-i2c.orig/include/configs/PM856.h u-boot-i2c/include/configs/PM856.h
--- u-boot-i2c.orig/include/configs/PM856.h	2009-02-12 10:43:41.000000000 -0800
+++ u-boot-i2c/include/configs/PM856.h	2009-02-12 10:46:00.000000000 -0800
@@ -191,13 +191,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 */
 
 /*
  * EEPROM configuration
diff -purN u-boot-i2c.orig/include/configs/RRvision.h u-boot-i2c/include/configs/RRvision.h
--- u-boot-i2c.orig/include/configs/RRvision.h	2009-02-12 10:43:41.000000000 -0800
+++ u-boot-i2c/include/configs/RRvision.h	2009-02-12 10:46:00.000000000 -0800
@@ -119,12 +119,12 @@
 
 /* enable I2C and select the hardware/software driver */
 #undef	CONFIG_HARD_I2C			/* I2C with hardware support	*/
-#define	CONFIG_SOFT_I2C			/* I2C bit-banged		*/
-
-# define CONFIG_SYS_I2C_SPEED		50000	/* 50 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	50000
+#define CONFIG_SYS_SOFT_I2C_SLAVE	0xFE
+#define CONFIG_SYS_I2C_ADAPTERS		{&soft_i2c_adap[0]}
 /*
  * Software (bit-bang) I2C driver configuration
  */
@@ -140,7 +140,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(1)	/* 1/4 I2C clock duration */
-#endif	/* CONFIG_SOFT_I2C */
 
 
 /*
diff -purN u-boot-i2c.orig/include/configs/Sandpoint8240.h u-boot-i2c/include/configs/Sandpoint8240.h
--- u-boot-i2c.orig/include/configs/Sandpoint8240.h	2009-02-12 10:43:41.000000000 -0800
+++ u-boot-i2c/include/configs/Sandpoint8240.h	2009-02-12 10:46:00.000000000 -0800
@@ -209,6 +209,11 @@
 
 #ifdef CONFIG_SOFT_I2C
 #error "Soft I2C is not configured properly.  Please review!"
+#define CONFIG_NEW_I2C
+#define I2C_SOFT_DECLARATIONS		I2C_SOFT_DEFS
+#define CONFIG_SYS_SOFT_I2C_SPEED	50000
+#define CONFIG_SYS_SOFT_I2C_SLAVE	0xFE
+#define CONFIG_SYS_I2C_ADAPTERS		{&soft_i2c_adap[0]}
 #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)
diff -purN u-boot-i2c.orig/include/configs/Sandpoint8245.h u-boot-i2c/include/configs/Sandpoint8245.h
--- u-boot-i2c.orig/include/configs/Sandpoint8245.h	2009-02-12 10:43:41.000000000 -0800
+++ u-boot-i2c/include/configs/Sandpoint8245.h	2009-02-12 10:46:00.000000000 -0800
@@ -179,6 +179,11 @@
 
 #ifdef CONFIG_SOFT_I2C
 #error "Soft I2C is not configured properly.  Please review!"
+#define CONFIG_NEW_I2C
+#define I2C_SOFT_DECLARATIONS		I2C_SOFT_DEFS
+#define CONFIG_SYS_SOFT_I2C_SPEED	50000
+#define CONFIG_SYS_SOFT_I2C_SLAVE	0xFE
+#define CONFIG_SYS_I2C_ADAPTERS		{&soft_i2c_adap[0]}
 #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)
diff -purN u-boot-i2c.orig/include/configs/SBC8540.h u-boot-i2c/include/configs/SBC8540.h
--- u-boot-i2c.orig/include/configs/SBC8540.h	2009-02-12 10:43:41.000000000 -0800
+++ u-boot-i2c/include/configs/SBC8540.h	2009-02-12 10:46:00.000000000 -0800
@@ -234,13 +234,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/SCM.h u-boot-i2c/include/configs/SCM.h
--- u-boot-i2c.orig/include/configs/SCM.h	2009-02-12 10:43:41.000000000 -0800
+++ u-boot-i2c/include/configs/SCM.h	2009-02-12 10:46:00.000000000 -0800
@@ -74,14 +74,15 @@
 
 /* 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		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
  */
-
 #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)
diff -purN u-boot-i2c.orig/include/configs/SIMPC8313.h u-boot-i2c/include/configs/SIMPC8313.h
--- u-boot-i2c.orig/include/configs/SIMPC8313.h	2009-02-12 10:43:41.000000000 -0800
+++ u-boot-i2c/include/configs/SIMPC8313.h	2009-02-12 10:46:00.000000000 -0800
@@ -217,15 +217,17 @@
 #define CONFIG_SYS_PROMPT_HUSH_PS2	"> "
 
 /* I2C */
-#define CONFIG_HARD_I2C			/* I2C with hardware support*/
+#define CONFIG_NEW_I2C
+#define CONFIG_SYS_NUM_I2C_ADAPTERS	2
 #define CONFIG_FSL_I2C
-#define CONFIG_I2C_MULTI_BUS
-#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_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_FSL_I2C2_SPEED	400000	/* 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]}
 #define CONFIG_SYS_I2C_NOPROBES		{{0,0x69}} /* Don't probe these addrs */
-#define CONFIG_SYS_I2C_OFFSET		0x3000
-#define CONFIG_SYS_I2C2_OFFSET		0x3100
 
 /*
  * General PCI
diff -purN u-boot-i2c.orig/include/configs/SMN42.h u-boot-i2c/include/configs/SMN42.h
--- u-boot-i2c.orig/include/configs/SMN42.h	2009-02-12 10:43:41.000000000 -0800
+++ u-boot-i2c/include/configs/SMN42.h	2009-02-12 10:46:00.000000000 -0800
@@ -78,17 +78,13 @@
 
 /* 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_NEW_I2C
+#define CONFIG_SOFT_I2C			/* I2C bit-banged */
+#define I2C_SOFT_DECLARATIONS		I2C_SOFT_DEFS
+#define CONFIG_SYS_SOFT_I2C_SPEED	10000
 /* this would be 0xAE if E0, E1 and E2 were pulled high */
-#define CONFIG_SYS_I2C_SLAVE		0xA0
-#define CONFIG_SYS_I2C_EEPROM_ADDR	(0xA0 >> 1)
-#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 /* 16 bit address */
-#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 6 /* 64 bytes per write */
-#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 20
-/* not used but required by devices.c */
-#define CONFIG_SYS_I2C_SPEED 10000
-
-#ifdef CONFIG_SOFT_I2C
+#define CONFIG_SYS_SOFT_I2C_SLAVE	0xA0
+#define CONFIG_SYS_I2C_ADAPTERS		{&soft_i2c_adap[0]}
 /*
  * Software (bit-bang) I2C driver configuration
  */
@@ -107,7 +103,11 @@
 					      i2ctmp = GET32(IO0DIR); \
 					      i2ctmp &= ~SDA; \
 						  PUT32(IO0DIR, i2ctmp); }
-#endif /* CONFIG_SOFT_I2C */
+
+#define CONFIG_SYS_I2C_EEPROM_ADDR	(0xA0 >> 1)
+#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 /* 16 bit address */
+#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 6 /* 64 bytes per write */
+#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 20
 
 
 /*
diff -purN u-boot-i2c.orig/include/configs/SX1.h u-boot-i2c/include/configs/SX1.h
--- u-boot-i2c.orig/include/configs/SX1.h	2009-02-12 10:43:41.000000000 -0800
+++ u-boot-i2c/include/configs/SX1.h	2009-02-12 10:46:00.000000000 -0800
@@ -81,10 +81,11 @@
 /*
  * I2C configuration
  */
-#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_ENV_OVERWRITE
 
diff -purN u-boot-i2c.orig/include/configs/SXNI855T.h u-boot-i2c/include/configs/SXNI855T.h
--- u-boot-i2c.orig/include/configs/SXNI855T.h	2009-02-12 10:43:41.000000000 -0800
+++ u-boot-i2c/include/configs/SXNI855T.h	2009-02-12 10:46:00.000000000 -0800
@@ -119,7 +119,12 @@
 
 #define	CONFIG_RTC_DS1306		/* Dallas 1306 real time clock	*/
 
-#define	CONFIG_SOFT_I2C			/* I2C bit-banged		*/
+#define CONFIG_NEW_I2C
+#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	0xFE
+#define CONFIG_SYS_I2C_ADAPTERS		{&soft_i2c_adap[0]}
 /*
  * Software (bit-bang) I2C driver configuration
  */
@@ -136,8 +141,6 @@
 			else    immr->im_cpm.cp_pbdat &= ~PB_SCL
 #define I2C_DELAY	udelay(5)	/* 1/4 I2C clock duration */
 
-# define CONFIG_SYS_I2C_SPEED		50000
-# define CONFIG_SYS_I2C_SLAVE		0xFE
 # define CONFIG_SYS_I2C_EEPROM_ADDR	0x50	/* Atmel 24C64			*/
 # define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2	/* two byte address		*/
 


More information about the U-Boot mailing list