]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
i2c.h: Provide a default CONFIG_SYS_I2C_SLAVE value
authorPeter Tyser <ptyser@xes-inc.com>
Fri, 24 Apr 2009 20:34:05 +0000 (15:34 -0500)
committerWolfgang Denk <wd@denx.de>
Fri, 12 Jun 2009 18:39:45 +0000 (20:39 +0200)
Many boards/controllers/drivers don't support an I2C slave interface,
however CONFIG_SYS_I2C_SLAVE is used in common code so provide a
default

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
common/cmd_eeprom.c
cpu/mpc8260/i2c.c
cpu/ppc4xx/40x_spd_sdram.c
cpu/ppc4xx/44x_spd_ddr.c
include/i2c.h

index e598bf1ec43540102caec79328729b2a5a60bbd5..f749087ebc707544f80391f953cdbab48b0cd696 100644 (file)
@@ -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)
index 35cf8f1434660dc4ce3e23cc80af85eb14543198..2b954b48fcb4ceb1c0826f4579d73435e73980dd 100644 (file)
@@ -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
 /*-----------------------------------------------------------------------
  */
 
index 57861b3595a6d50a50102e9388e93bb9fe08ce4e..75bd70dc66170f5181ee7db1119b90573f42f706 100644 (file)
 #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
index 153391e59841aae7b6966942e03d3164711b9dbc..f26fcdaa1e98c028b116652edb4e1c7f59b0dc79 100644 (file)
 #define CONFIG_SYS_I2C_SPEED   50000
 #endif
 
-#ifndef CONFIG_SYS_I2C_SLAVE
-#define CONFIG_SYS_I2C_SLAVE   0xFE
-#endif
-
 #define ONE_BILLION    1000000000
 
 /*
index f8a59a6699cad4e2afdc3f1e9267d38406f06771..668e754e2a804d325c0dc915237ff6a222af0787 100644 (file)
 #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
 
 /*