summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/cmd_eeprom.c4
-rw-r--r--cpu/mpc8260/i2c.c3
-rw-r--r--cpu/ppc4xx/40x_spd_sdram.c4
-rw-r--r--cpu/ppc4xx/44x_spd_ddr.c4
-rw-r--r--include/i2c.h12
5 files changed, 9 insertions, 18 deletions
diff --git a/common/cmd_eeprom.c b/common/cmd_eeprom.c
index e598bf1ec43..f749087ebc7 100644
--- a/common/cmd_eeprom.c
+++ b/common/cmd_eeprom.c
@@ -401,10 +401,6 @@ eeprom_probe (unsigned dev_addr, unsigned offset)
#define CONFIG_SYS_I2C_SPEED 50000
#endif
-#ifndef CONFIG_SYS_I2C_SLAVE
-#define CONFIG_SYS_I2C_SLAVE 0xFE
-#endif
-
void eeprom_init (void)
{
#if defined(CONFIG_SPI)
diff --git a/cpu/mpc8260/i2c.c b/cpu/mpc8260/i2c.c
index 35cf8f14346..2b954b48fcb 100644
--- a/cpu/mpc8260/i2c.c
+++ b/cpu/mpc8260/i2c.c
@@ -58,9 +58,6 @@ static unsigned int i2c_bus_num __attribute__ ((section (".data"))) = 0;
#define CONFIG_SYS_I2C_SPEED 50000
#endif
-#ifndef CONFIG_SYS_I2C_SLAVE
-#define CONFIG_SYS_I2C_SLAVE 0xFE
-#endif
/*-----------------------------------------------------------------------
*/
diff --git a/cpu/ppc4xx/40x_spd_sdram.c b/cpu/ppc4xx/40x_spd_sdram.c
index 57861b3595a..75bd70dc661 100644
--- a/cpu/ppc4xx/40x_spd_sdram.c
+++ b/cpu/ppc4xx/40x_spd_sdram.c
@@ -56,10 +56,6 @@
#define CONFIG_SYS_I2C_SPEED 50000
#endif
-#ifndef CONFIG_SYS_I2C_SLAVE
-#define CONFIG_SYS_I2C_SLAVE 0xFE
-#endif
-
#define ONE_BILLION 1000000000
#define SDRAM0_CFG_DCE 0x80000000
diff --git a/cpu/ppc4xx/44x_spd_ddr.c b/cpu/ppc4xx/44x_spd_ddr.c
index 153391e5984..f26fcdaa1e9 100644
--- a/cpu/ppc4xx/44x_spd_ddr.c
+++ b/cpu/ppc4xx/44x_spd_ddr.c
@@ -66,10 +66,6 @@
#define CONFIG_SYS_I2C_SPEED 50000
#endif
-#ifndef CONFIG_SYS_I2C_SLAVE
-#define CONFIG_SYS_I2C_SLAVE 0xFE
-#endif
-
#define ONE_BILLION 1000000000
/*
diff --git a/include/i2c.h b/include/i2c.h
index f8a59a6699c..668e754e2a8 100644
--- a/include/i2c.h
+++ b/include/i2c.h
@@ -78,16 +78,22 @@
#endif
#ifdef CONFIG_8xx
-/* Set default values for the I2C bus speed and slave address on 8xx. In the
+/* Set default value for the I2C bus speed on 8xx. In the
* future, we'll define these in all 8xx board config files.
*/
#ifndef CONFIG_SYS_I2C_SPEED
#define CONFIG_SYS_I2C_SPEED 50000
#endif
+#endif
+/*
+ * Many boards/controllers/drivers don't support an I2C slave interface so
+ * provide a default slave address for them for use in common code. A real
+ * value for CONFIG_SYS_I2C_SLAVE should be defined for any board which does
+ * support a slave interface.
+ */
#ifndef CONFIG_SYS_I2C_SLAVE
-#define CONFIG_SYS_I2C_SLAVE 0xFE
-#endif
+#define CONFIG_SYS_I2C_SLAVE 0xfe
#endif
/*