[U-Boot] PATCH 5/8 Multi-adapter multi-bus I2C

ksi at koi8.net ksi at koi8.net
Sat Feb 7 02:07:43 CET 2009


Signed-off-by: Sergey Kubushyn <ksi at koi8.net>      
---
diff --git a/include/configs/IDS8247.h b/include/configs/IDS8247.h
index fbcbddb..407a162 100644
--- a/include/configs/IDS8247.h
+++ b/include/configs/IDS8247.h
@@ -72,10 +72,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		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
  */
diff --git a/include/configs/IP860.h b/include/configs/IP860.h
index b9c5713..88b9fad 100644
--- a/include/configs/IP860.h
+++ b/include/configs/IP860.h
@@ -59,7 +59,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_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
  */
@@ -76,9 +81,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	/* EEPROM X24C16		*/
 # define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1	/* bytes of address		*/
 /* mask of address bits that overflow into the "EEPROM chip address"    */
diff --git a/include/configs/IPHASE4539.h b/include/configs/IPHASE4539.h
index 3cb6cf7..9d24695 100644
--- a/include/configs/IPHASE4539.h
+++ b/include/configs/IPHASE4539.h
@@ -109,14 +109,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)
@@ -126,7 +127,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 */
 
 
 /*
diff --git a/include/configs/KUP4K.h b/include/configs/KUP4K.h
index a829984..08f99eb 100644
--- a/include/configs/KUP4K.h
+++ b/include/configs/KUP4K.h
@@ -107,12 +107,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
  */
@@ -128,7 +128,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 */
 
 
 /*-----------------------------------------------------------------------
diff --git a/include/configs/M52277EVB.h b/include/configs/M52277EVB.h
index 5d5966f..9bb3978 100644
--- a/include/configs/M52277EVB.h
+++ b/include/configs/M52277EVB.h
@@ -144,13 +144,13 @@
 #define CONFIG_MCFTMR
 #undef CONFIG_MCFPIT
 
-/* I2c */
+/* I2C */
+#define CONFIG_NEW_I2C
 #define CONFIG_FSL_I2C
-#define CONFIG_HARD_I2C		/* I2C with hardware support */
-#undef	CONFIG_SOFT_I2C		/* I2C bit-banged               */
-#define CONFIG_SYS_I2C_SPEED		80000	/* I2C speed and slave address  */
-#define CONFIG_SYS_I2C_SLAVE		0x7F
-#define CONFIG_SYS_I2C_OFFSET		0x58000
+#define CONFIG_SYS_FSL_I2C_SPEED	80000	/* I2C speed and slave address  */
+#define CONFIG_SYS_FSL_I2C_SLAVE	0x7F
+#define CONFIG_SYS_FSL_I2C_OFFSET	0x58000
+#define CONFIG_SYS_I2C_ADAPTERS		{&fsl_i2c_adap[0]}
 #define CONFIG_SYS_IMMR			CONFIG_SYS_MBAR
 
 /* DSPI and Serial Flash */
diff --git a/include/configs/M5235EVB.h b/include/configs/M5235EVB.h
index 8c66f87..c5779fb 100644
--- a/include/configs/M5235EVB.h
+++ b/include/configs/M5235EVB.h
@@ -101,12 +101,12 @@
 #undef CONFIG_MCFPIT
 
 /* I2C */
+#define CONFIG_NEW_I2C
 #define CONFIG_FSL_I2C
-#define CONFIG_HARD_I2C		/* I2C with hw support */
-#undef CONFIG_SOFT_I2C		/* I2C bit-banged */
-#define CONFIG_SYS_I2C_SPEED		80000
-#define CONFIG_SYS_I2C_SLAVE		0x7F
-#define CONFIG_SYS_I2C_OFFSET		0x00000300
+#define CONFIG_SYS_FSL_I2C_SPEED	80000
+#define CONFIG_SYS_FSL_I2C_SLAVE	0x7F
+#define CONFIG_SYS_FSL_I2C_OFFSET	0x00000300
+#define CONFIG_SYS_I2C_ADAPTERS		{&fsl_i2c_adap[0]}
 #define CONFIG_SYS_IMMR		CONFIG_SYS_MBAR
 #define CONFIG_SYS_I2C_PINMUX_REG	(gpio->par_qspi)
 #define CONFIG_SYS_I2C_PINMUX_CLR	~(GPIO_PAR_FECI2C_SCL_MASK | GPIO_PAR_FECI2C_SDA_MASK)
diff --git a/include/configs/M5253DEMO.h b/include/configs/M5253DEMO.h
index 378e45a..6e8c06f 100644
--- a/include/configs/M5253DEMO.h
+++ b/include/configs/M5253DEMO.h
@@ -119,11 +119,12 @@
 #define CONFIG_HOSTNAME		M5253DEMO
 
 /* I2C */
+#define CONFIG_NEW_I2C
 #define CONFIG_FSL_I2C
-#define CONFIG_HARD_I2C		/* I2C with hw support */
-#define CONFIG_SYS_I2C_SPEED		80000
-#define CONFIG_SYS_I2C_SLAVE		0x7F
-#define CONFIG_SYS_I2C_OFFSET		0x00000280
+#define CONFIG_SYS_FSL_I2C_SPEED	80000
+#define CONFIG_SYS_FSL_I2C_SLAVE	0x7F
+#define CONFIG_SYS_FSL_I2C_OFFSET	0x00000280
+#define CONFIG_SYS_I2C_ADAPTERS		{&fsl_i2c_adap[0]}
 #define CONFIG_SYS_IMMR		CONFIG_SYS_MBAR
 #define CONFIG_SYS_I2C_PINMUX_REG	(*(u32 *) (CONFIG_SYS_MBAR+0x19C))
 #define CONFIG_SYS_I2C_PINMUX_CLR	(0xFFFFE7FF)
diff --git a/include/configs/M5271EVB.h b/include/configs/M5271EVB.h
index 7ddeb55..bb4a212 100644
--- a/include/configs/M5271EVB.h
+++ b/include/configs/M5271EVB.h
@@ -108,12 +108,12 @@
 #endif
 
 /* I2C */
+#define CONFIG_NEW_I2C
 #define CONFIG_FSL_I2C
-#define CONFIG_HARD_I2C		/* I2C with hw support */
-#undef CONFIG_SOFT_I2C		/* I2C bit-banged */
-#define CONFIG_SYS_I2C_SPEED		80000
-#define CONFIG_SYS_I2C_SLAVE		0x7F
-#define CONFIG_SYS_I2C_OFFSET		0x00000300
+#define CONFIG_SYS_FSL_I2C_SPEED	80000
+#define CONFIG_SYS_FSL_I2C_SLAVE	0x7F
+#define CONFIG_SYS_FSL_I2C_OFFSET	0x00000300
+#define CONFIG_SYS_I2C_ADAPTERS		{&fsl_i2c_adap[0]}
 #define CONFIG_SYS_IMMR		CONFIG_SYS_MBAR
 
 #define CONFIG_BOOTDELAY	1	/* autoboot after 5 seconds */
diff --git a/include/configs/M5275EVB.h b/include/configs/M5275EVB.h
index db48d76..a77ccd0 100644
--- a/include/configs/M5275EVB.h
+++ b/include/configs/M5275EVB.h
@@ -111,12 +111,12 @@
 #endif
 
 /* I2C */
+#define CONFIG_NEW_I2C
 #define CONFIG_FSL_I2C
-#define CONFIG_HARD_I2C		/* I2C with hw support */
-#undef CONFIG_SOFT_I2C
-#define CONFIG_SYS_I2C_SPEED		80000
-#define CONFIG_SYS_I2C_SLAVE		0x7F
-#define CONFIG_SYS_I2C_OFFSET		0x00000300
+#define CONFIG_SYS_FSL_I2C_SPEED	80000
+#define CONFIG_SYS_FSL_I2C_SLAVE	0x7F
+#define CONFIG_SYS_FSL_I2C_OFFSET	0x00000300
+#define CONFIG_SYS_I2C_ADAPTERS		{&fsl_i2c_adap[0]}
 #define CONFIG_SYS_IMMR		CONFIG_SYS_MBAR
 #define CONFIG_SYS_I2C_PINMUX_REG	(gpio_reg->par_feci2c)
 #define CONFIG_SYS_I2C_PINMUX_CLR	(0xFFF0)
diff --git a/include/configs/M53017EVB.h b/include/configs/M53017EVB.h
index df54c60..8c2eadf 100644
--- a/include/configs/M53017EVB.h
+++ b/include/configs/M53017EVB.h
@@ -98,12 +98,12 @@
 #undef CONFIG_MCFPIT
 
 /* I2C */
+#define CONFIG_NEW_I2C
 #define CONFIG_FSL_I2C
-#define CONFIG_HARD_I2C			/* I2C with hw support */
-#undef CONFIG_SOFT_I2C			/* I2C bit-banged */
-#define CONFIG_SYS_I2C_SPEED		80000
-#define CONFIG_SYS_I2C_SLAVE		0x7F
-#define CONFIG_SYS_I2C_OFFSET		0x58000
+#define CONFIG_SYS_FSL_I2C_SPEED	80000
+#define CONFIG_SYS_FSL_I2C_SLAVE	0x7F
+#define CONFIG_SYS_FSL_I2C_OFFSET	0x58000
+#define CONFIG_SYS_I2C_ADAPTERS		{&fsl_i2c_adap[0]}
 #define CONFIG_SYS_IMMR			CONFIG_SYS_MBAR
 
 #define CONFIG_BOOTDELAY		1	/* autoboot after 5 seconds */
diff --git a/include/configs/M5329EVB.h b/include/configs/M5329EVB.h
index 1f1586a..afc834b 100644
--- a/include/configs/M5329EVB.h
+++ b/include/configs/M5329EVB.h
@@ -97,12 +97,12 @@
 #undef CONFIG_MCFPIT
 
 /* I2C */
+#define CONFIG_NEW_I2C
 #define CONFIG_FSL_I2C
-#define CONFIG_HARD_I2C			/* I2C with hw support */
-#undef CONFIG_SOFT_I2C			/* I2C bit-banged */
-#define CONFIG_SYS_I2C_SPEED		80000
-#define CONFIG_SYS_I2C_SLAVE		0x7F
-#define CONFIG_SYS_I2C_OFFSET		0x58000
+#define CONFIG_SYS_FSL_I2C_SPEED	80000
+#define CONFIG_SYS_FSL_I2C_SLAVE	0x7F
+#define CONFIG_SYS_FSL_I2C_OFFSET	0x58000
+#define CONFIG_SYS_I2C_ADAPTERS		{&fsl_i2c_adap[0]}
 #define CONFIG_SYS_IMMR		CONFIG_SYS_MBAR
 
 #define CONFIG_BOOTDELAY	1	/* autoboot after 5 seconds */
diff --git a/include/configs/M5373EVB.h b/include/configs/M5373EVB.h
index 1991687..ac1aa45 100644
--- a/include/configs/M5373EVB.h
+++ b/include/configs/M5373EVB.h
@@ -97,12 +97,12 @@
 #undef CONFIG_MCFPIT
 
 /* I2C */
+#define CONFIG_NEW_I2C
 #define CONFIG_FSL_I2C
-#define CONFIG_HARD_I2C		/* I2C with hw support */
-#undef CONFIG_SOFT_I2C		/* I2C bit-banged */
-#define CONFIG_SYS_I2C_SPEED		80000
-#define CONFIG_SYS_I2C_SLAVE		0x7F
-#define CONFIG_SYS_I2C_OFFSET		0x58000
+#define CONFIG_SYS_FSL_I2C_SPEED	80000
+#define CONFIG_SYS_FSL_I2C_SLAVE	0x7F
+#define CONFIG_SYS_FSL_I2C_OFFSET	0x58000
+#define CONFIG_SYS_I2C_ADAPTERS		{&fsl_i2c_adap[0]}
 #define CONFIG_SYS_IMMR		CONFIG_SYS_MBAR
 
 #define CONFIG_BOOTDELAY	1	/* autoboot after 5 seconds */
diff --git a/include/configs/M54451EVB.h b/include/configs/M54451EVB.h
index 45f7016..f478be8 100644
--- a/include/configs/M54451EVB.h
+++ b/include/configs/M54451EVB.h
@@ -157,12 +157,12 @@
 #undef CONFIG_MCFPIT
 
 /* I2c */
+#define CONFIG_NEW_I2C
 #define CONFIG_FSL_I2C
-#define CONFIG_HARD_I2C		/* I2C with hardware support */
-#undef	CONFIG_SOFT_I2C		/* I2C bit-banged               */
-#define CONFIG_SYS_I2C_SPEED		80000	/* I2C speed and slave address  */
-#define CONFIG_SYS_I2C_SLAVE		0x7F
-#define CONFIG_SYS_I2C_OFFSET		0x58000
+#define CONFIG_SYS_FSL_I2C_SPEED	80000	/* I2C speed and slave address  */
+#define CONFIG_SYS_FSL_I2C_SLAVE	0x7F
+#define CONFIG_SYS_FSL_I2C_OFFSET	0x58000
+#define CONFIG_SYS_I2C_ADAPTERS		{&fsl_i2c_adap[0]}
 #define CONFIG_SYS_IMMR		CONFIG_SYS_MBAR
 
 /* DSPI and Serial Flash */
diff --git a/include/configs/M54455EVB.h b/include/configs/M54455EVB.h
index 101dced..d507988 100644
--- a/include/configs/M54455EVB.h
+++ b/include/configs/M54455EVB.h
@@ -192,12 +192,12 @@
 #undef CONFIG_MCFPIT
 
 /* I2c */
+#define CONFIG_NEW_I2C
 #define CONFIG_FSL_I2C
-#define CONFIG_HARD_I2C		/* I2C with hardware support */
-#undef	CONFIG_SOFT_I2C		/* I2C bit-banged               */
-#define CONFIG_SYS_I2C_SPEED		80000	/* I2C speed and slave address  */
-#define CONFIG_SYS_I2C_SLAVE		0x7F
-#define CONFIG_SYS_I2C_OFFSET		0x58000
+#define CONFIG_SYS_FSL_I2C_SPEED	80000	/* I2C speed and slave address  */
+#define CONFIG_SYS_FSL_I2C_SLAVE	0x7F
+#define CONFIG_SYS_FSLI2C_OFFSET	0x58000
+#define CONFIG_SYS_I2C_ADAPTERS		{&fsl_i2c_adap[0]}
 #define CONFIG_SYS_IMMR		CONFIG_SYS_MBAR
 
 /* DSPI and Serial Flash */
diff --git a/include/configs/M5475EVB.h b/include/configs/M5475EVB.h
index e48de15..e9a9c74 100644
--- a/include/configs/M5475EVB.h
+++ b/include/configs/M5475EVB.h
@@ -122,12 +122,12 @@
 #endif
 
 /* I2C */
+#define CONFIG_NEW_I2C
 #define CONFIG_FSL_I2C
-#define CONFIG_HARD_I2C		/* I2C with hw support */
-#undef CONFIG_SOFT_I2C		/* I2C bit-banged */
-#define CONFIG_SYS_I2C_SPEED		80000
-#define CONFIG_SYS_I2C_SLAVE		0x7F
-#define CONFIG_SYS_I2C_OFFSET		0x00008F00
+#define CONFIG_SYS_FSL_I2C_SPEED	80000
+#define CONFIG_SYS_FSL_I2C_SLAVE	0x7F
+#define CONFIG_SYS_FSL_I2C_OFFSET	0x00008F00
+#define CONFIG_SYS_I2C_ADAPTERS		{&fsl_i2c_adap[0]}
 #define CONFIG_SYS_IMMR		CONFIG_SYS_MBAR
 
 /* PCI */
diff --git a/include/configs/M5485EVB.h b/include/configs/M5485EVB.h
index 28bf0ad..42b5373 100644
--- a/include/configs/M5485EVB.h
+++ b/include/configs/M5485EVB.h
@@ -119,12 +119,12 @@
 #endif
 
 /* I2C */
+#define CONFIG_NEW_I2C
 #define CONFIG_FSL_I2C
-#define CONFIG_HARD_I2C		/* I2C with hw support */
-#undef CONFIG_SOFT_I2C		/* I2C bit-banged */
-#define CONFIG_SYS_I2C_SPEED		80000
-#define CONFIG_SYS_I2C_SLAVE		0x7F
-#define CONFIG_SYS_I2C_OFFSET		0x00008F00
+#define CONFIG_SYS_FSL_I2C_SPEED	80000
+#define CONFIG_SYS_FSL_I2C_SLAVE	0x7F
+#define CONFIG_SYS_FSL_I2C_OFFSET	0x00008F00
+#define CONFIG_SYS_I2C_ADAPTERS		{&fsl_i2c_adap[0]}
 #define CONFIG_SYS_IMMR		CONFIG_SYS_MBAR
 
 /* PCI */
diff --git a/include/configs/MHPC.h b/include/configs/MHPC.h
index 8e7f9cd..fb95677 100644
--- a/include/configs/MHPC.h
+++ b/include/configs/MHPC.h
@@ -72,7 +72,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_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
  */
@@ -89,8 +94,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	/* EEPROM X24C04		*/
 #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN		1	/* bytes of address		*/
 /* mask of address bits that overflow into the "EEPROM chip address"	*/
diff --git a/include/configs/MPC8313ERDB.h b/include/configs/MPC8313ERDB.h
index 58a26e1..3abed49 100644
--- a/include/configs/MPC8313ERDB.h
+++ b/include/configs/MPC8313ERDB.h
@@ -318,15 +318,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_I2C_NOPROBES	{{0,0x69}} /* Don't probe these addrs */
-#define CONFIG_SYS_I2C_OFFSET		0x3000
-#define CONFIG_SYS_I2C2_OFFSET		0x3100
+#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 */
 
 /*
  * General PCI
diff --git a/include/configs/MPC8315ERDB.h b/include/configs/MPC8315ERDB.h
index a04868e..33c540a 100644
--- a/include/configs/MPC8315ERDB.h
+++ b/include/configs/MPC8315ERDB.h
@@ -272,13 +272,13 @@
 #define CONFIG_OF_STDOUT_VIA_ALIAS	1
 
 /* I2C */
-#define CONFIG_HARD_I2C		/* I2C with hardware support */
+#define CONFIG_NEW_I2C
 #define CONFIG_FSL_I2C
-#define CONFIG_SYS_I2C_SPEED		400000 /* I2C speed and slave address */
-#define CONFIG_SYS_I2C_SLAVE		0x7F
-#define CONFIG_SYS_I2C_NOPROBES	{0x51} /* Don't probe these addrs */
-#define CONFIG_SYS_I2C_OFFSET		0x3000
-#define CONFIG_SYS_I2C2_OFFSET		0x3100
+#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		{0x51}	/* Don't probe these addrs */
 
 /*
  * Board info - revision and where boot from
diff --git a/include/configs/MPC8323ERDB.h b/include/configs/MPC8323ERDB.h
index c6ac91a..49270bb 100644
--- a/include/configs/MPC8323ERDB.h
+++ b/include/configs/MPC8323ERDB.h
@@ -313,13 +313,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_SYS_I2C_SPEED	400000	/* I2C speed and slave address */
-#define CONFIG_SYS_I2C_SLAVE	0x7F
-#define CONFIG_SYS_I2C_NOPROBES	{0x51}	/* Don't probe these addrs */
-#define CONFIG_SYS_I2C_OFFSET	0x3000
+#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		{0x51}	/* Don't probe these addrs */
 
 /*
  * Config on-board EEPROM
diff --git a/include/configs/MPC832XEMDS.h b/include/configs/MPC832XEMDS.h
index bc56e68..0918858 100644
--- a/include/configs/MPC832XEMDS.h
+++ b/include/configs/MPC832XEMDS.h
@@ -323,13 +323,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_SYS_I2C_SPEED	400000	/* I2C speed and slave address */
-#define CONFIG_SYS_I2C_SLAVE	0x7F
-#define CONFIG_SYS_I2C_NOPROBES	{0x51}	/* Don't probe these addrs */
-#define CONFIG_SYS_I2C_OFFSET	0x3000
+#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		{0x51}	/* Don't probe these addrs */
 
 /*
  * Config on-board RTC
diff --git a/include/configs/MPC8349EMDS.h b/include/configs/MPC8349EMDS.h
index 8e82aac..8a6b155 100644
--- a/include/configs/MPC8349EMDS.h
+++ b/include/configs/MPC8349EMDS.h
@@ -347,16 +347,17 @@
 #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_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_I2C_NOPROBES	{{0,0x69}}	/* Don't probe these addrs */
-#define CONFIG_SYS_I2C_OFFSET		0x3000
-#define CONFIG_SYS_I2C2_OFFSET		0x3100
+#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 */
 
 /* SPI */
 #define CONFIG_MPC8XXX_SPI
diff --git a/include/configs/MPC8349ITX.h b/include/configs/MPC8349ITX.h
index 14cbc45..9073383 100644
--- a/include/configs/MPC8349ITX.h
+++ b/include/configs/MPC8349ITX.h
@@ -90,31 +90,29 @@
  */
 
 /* I2C */
-#ifdef CONFIG_HARD_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_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]}
+/* Don't probe these addresses: */
+#define CONFIG_SYS_I2C_NOPROBES		{{1, CONFIG_SYS_I2C_8574_ADDR1}, \
+				 	 {1, CONFIG_SYS_I2C_8574_ADDR2}, \
+				 	 {1, CONFIG_SYS_I2C_8574A_ADDR1}, \
+				 	 {1, CONFIG_SYS_I2C_8574A_ADDR2}}
 #define CONFIG_SYS_SPD_BUS_NUM		1	/* The I2C bus for SPD */
-
 #define CONFIG_SYS_I2C_8574_ADDR1	0x20	/* I2C1, PCF8574 */
 #define CONFIG_SYS_I2C_8574_ADDR2	0x21	/* I2C1, PCF8574 */
 #define CONFIG_SYS_I2C_8574A_ADDR1	0x38	/* I2C1, PCF8574A */
 #define CONFIG_SYS_I2C_8574A_ADDR2	0x39	/* I2C1, PCF8574A */
 #define CONFIG_SYS_I2C_EEPROM_ADDR	0x50	/* I2C0, Board EEPROM */
-#define CONFIG_SYS_I2C_RTC_ADDR	0x68	/* I2C1, DS1339 RTC*/
-#define SPD_EEPROM_ADDRESS	0x51	/* I2C1, DDR */
-
-#define CONFIG_SYS_I2C_SPEED		400000	/* I2C speed and slave address */
-#define CONFIG_SYS_I2C_SLAVE		0x7F
-
-/* Don't probe these addresses: */
-#define CONFIG_SYS_I2C_NOPROBES	{{1, CONFIG_SYS_I2C_8574_ADDR1}, \
-				 {1, CONFIG_SYS_I2C_8574_ADDR2}, \
-				 {1, CONFIG_SYS_I2C_8574A_ADDR1}, \
-				 {1, CONFIG_SYS_I2C_8574A_ADDR2}}
+#define CONFIG_SYS_I2C_RTC_ADDR		0x68	/* I2C1, DS1339 RTC*/
+#define SPD_EEPROM_ADDRESS		0x51	/* I2C1, DDR */
 /* Bit definitions for the 8574[A] I2C expander */
 #define I2C_8574_REVISION	0x03	/* Board revision, 00=0.0, 01=0.1, 10=1.0 */
 #define I2C_8574_CF		0x08	/* 1=Compact flash absent, 0=present */
@@ -122,10 +120,6 @@
 #define I2C_8574_PCI66		0x20	/* 0=33MHz PCI, 1=66MHz PCI */
 #define I2C_8574_FLASHSIDE	0x40	/* 0=Reset vector from U4, 1=from U7*/
 
-#undef CONFIG_SOFT_I2C
-
-#endif
-
 /* Compact Flash */
 #ifdef CONFIG_COMPACT_FLASH
 
diff --git a/include/configs/MPC8360EMDS.h b/include/configs/MPC8360EMDS.h
index fbd2457..c8c86cb 100644
--- a/include/configs/MPC8360EMDS.h
+++ b/include/configs/MPC8360EMDS.h
@@ -348,14 +348,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_SYS_I2C_SPEED	400000	/* I2C speed and slave address */
-#define CONFIG_SYS_I2C_SLAVE	0x7F
-#define CONFIG_SYS_I2C_NOPROBES	{0x52} /* Don't probe these addrs */
-#define CONFIG_SYS_I2C_OFFSET	0x3000
-#define CONFIG_SYS_I2C2_OFFSET 0x3100
+#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		{0x52}	/* Don't probe these addrs */
 
 /*
  * Config on-board RTC
diff --git a/include/configs/MPC8360ERDK.h b/include/configs/MPC8360ERDK.h
index c20f86a..0a51454 100644
--- a/include/configs/MPC8360ERDK.h
+++ b/include/configs/MPC8360ERDK.h
@@ -261,16 +261,17 @@
 #define CONFIG_OF_STDOUT_VIA_ALIAS
 
 /* I2C */
-#define CONFIG_HARD_I2C		/* I2C with hardware support */
-#undef	CONFIG_SOFT_I2C		/* I2C bit-banged */
+#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_I2C_NOPROBES	{{0x52}} /* Don't probe these addrs */
-#define CONFIG_SYS_I2C_OFFSET	0x3000
-#define CONFIG_SYS_I2C2_OFFSET 0x3100
+#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,0x52}} /* Don't probe these addrs */
 
 /*
  * General PCI
diff --git a/include/configs/MPC837XEMDS.h b/include/configs/MPC837XEMDS.h
index 0dd6ef5..1c99d28 100644
--- a/include/configs/MPC837XEMDS.h
+++ b/include/configs/MPC837XEMDS.h
@@ -320,14 +320,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_SYS_I2C_SPEED		400000 /* I2C speed and slave address */
-#define CONFIG_SYS_I2C_SLAVE		0x7F
-#define CONFIG_SYS_I2C_NOPROBES	{0x51} /* Don't probe these addrs */
-#define CONFIG_SYS_I2C_OFFSET		0x3000
-#define CONFIG_SYS_I2C2_OFFSET		0x3100
+#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		{0x51}	/* Don't probe these addrs */
 
 /*
  * Config on-board RTC
diff --git a/include/configs/MPC837XERDB.h b/include/configs/MPC837XERDB.h
index f281c59..f3d48f7 100644
--- a/include/configs/MPC837XERDB.h
+++ b/include/configs/MPC837XERDB.h
@@ -342,14 +342,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_SYS_I2C_SPEED		400000 /* I2C speed and slave address */
-#define CONFIG_SYS_I2C_SLAVE		0x7F
-#define CONFIG_SYS_I2C_NOPROBES	{0x51} /* Don't probe these addrs */
-#define CONFIG_SYS_I2C_OFFSET		0x3000
-#define CONFIG_SYS_I2C2_OFFSET		0x3100
+#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		{0x51}	/* Don't probe these addrs */
 
 /*
  * Config on-board RTC
diff --git a/include/configs/MPC8536DS.h b/include/configs/MPC8536DS.h
index e379d53..5caf20a 100644
--- a/include/configs/MPC8536DS.h
+++ b/include/configs/MPC8536DS.h
@@ -331,16 +331,17 @@ extern unsigned long get_board_ddr_clk(unsigned long dummy);
 /*
  * 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_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
+#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 */
 
 /*
  * I2C2 EEPROM


More information about the U-Boot mailing list