mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 23:24:38 +00:00
i2c.h: Provide a default CONFIG_SYS_I2C_SLAVE value
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>
This commit is contained in:
parent
e7563aff17
commit
9c90a2c8e8
5 changed files with 10 additions and 19 deletions
|
@ -401,10 +401,6 @@ eeprom_probe (unsigned dev_addr, unsigned offset)
|
||||||
#define CONFIG_SYS_I2C_SPEED 50000
|
#define CONFIG_SYS_I2C_SPEED 50000
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CONFIG_SYS_I2C_SLAVE
|
|
||||||
#define CONFIG_SYS_I2C_SLAVE 0xFE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void eeprom_init (void)
|
void eeprom_init (void)
|
||||||
{
|
{
|
||||||
#if defined(CONFIG_SPI)
|
#if defined(CONFIG_SPI)
|
||||||
|
|
|
@ -58,9 +58,6 @@ static unsigned int i2c_bus_num __attribute__ ((section (".data"))) = 0;
|
||||||
#define CONFIG_SYS_I2C_SPEED 50000
|
#define CONFIG_SYS_I2C_SPEED 50000
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CONFIG_SYS_I2C_SLAVE
|
|
||||||
#define CONFIG_SYS_I2C_SLAVE 0xFE
|
|
||||||
#endif
|
|
||||||
/*-----------------------------------------------------------------------
|
/*-----------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -56,10 +56,6 @@
|
||||||
#define CONFIG_SYS_I2C_SPEED 50000
|
#define CONFIG_SYS_I2C_SPEED 50000
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CONFIG_SYS_I2C_SLAVE
|
|
||||||
#define CONFIG_SYS_I2C_SLAVE 0xFE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define ONE_BILLION 1000000000
|
#define ONE_BILLION 1000000000
|
||||||
|
|
||||||
#define SDRAM0_CFG_DCE 0x80000000
|
#define SDRAM0_CFG_DCE 0x80000000
|
||||||
|
|
|
@ -66,10 +66,6 @@
|
||||||
#define CONFIG_SYS_I2C_SPEED 50000
|
#define CONFIG_SYS_I2C_SPEED 50000
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CONFIG_SYS_I2C_SLAVE
|
|
||||||
#define CONFIG_SYS_I2C_SLAVE 0xFE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define ONE_BILLION 1000000000
|
#define ONE_BILLION 1000000000
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -78,16 +78,22 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_8xx
|
#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.
|
* future, we'll define these in all 8xx board config files.
|
||||||
*/
|
*/
|
||||||
#ifndef CONFIG_SYS_I2C_SPEED
|
#ifndef CONFIG_SYS_I2C_SPEED
|
||||||
#define CONFIG_SYS_I2C_SPEED 50000
|
#define CONFIG_SYS_I2C_SPEED 50000
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CONFIG_SYS_I2C_SLAVE
|
|
||||||
#define CONFIG_SYS_I2C_SLAVE 0xFE
|
|
||||||
#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
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue