mirror of
https://github.com/linux-sunxi/u-boot-sunxi.git
synced 2024-02-12 11:16:03 +08:00
[PATCH] PPC4xx: Add support for multiple I2C busses
This patch adds support for multiple I2C busses on the PPC4xx platforms. Define CONFIG_I2C_MULTI_BUS in the board config file to make use of this feature. It also merges the 405 and 440 i2c header files into one common file 4xx_i2c.h. Also the 4xx i2c reset procedure is reworked since I experienced some problems with the first access on the 440SPe Katmai board. Signed-off-by: Stefan Roese <sr@denx.de>
This commit is contained in:
@ -46,6 +46,16 @@
|
||||
*/
|
||||
#define I2C_RXTX_LEN 128 /* maximum tx/rx buffer length */
|
||||
|
||||
#if defined(CONFIG_I2C_MULTI_BUS)
|
||||
#define CFG_MAX_I2C_BUS 2
|
||||
#define I2C_GET_BUS() i2c_get_bus_num()
|
||||
#define I2C_SET_BUS(a) i2c_set_bus_num(a)
|
||||
#else
|
||||
#define CFG_MAX_I2C_BUS 1
|
||||
#define I2C_GET_BUS() 0
|
||||
#define I2C_SET_BUS(a)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Initialization, must be called once on start up, may be called
|
||||
* repeatedly to change the speed and slave addresses.
|
||||
|
Reference in New Issue
Block a user