X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=include%2Fasm-ppc%2Fi2c.h;h=37847666db1a600a08a065320e9c9ec494adaa91;hb=d239d74b1c937984bc519083a8e7de373a390f06;hp=fa9d164e9aaf00f2738259f5601c90d9a11d3d63;hpb=84bd92bdda05e6aaae3150ed6ef957b3a67398b7;p=people%2Fms%2Fu-boot.git diff --git a/include/asm-ppc/i2c.h b/include/asm-ppc/i2c.h index fa9d164e9a..37847666db 100644 --- a/include/asm-ppc/i2c.h +++ b/include/asm-ppc/i2c.h @@ -79,23 +79,20 @@ typedef struct i2c #endif #define I2C_TIMEOUT (CFG_HZ/4) -#ifndef CFG_IMMRBAR -#error CFG_IMMRBAR is not defined in /include/configs/${BOARD}.h +#ifndef CFG_IMMR +#error CFG_IMMR is not defined in /include/configs/${BOARD}.h #endif #ifndef CFG_I2C_OFFSET #error CFG_I2C_OFFSET is not defined in /include/configs/${BOARD}.h #endif -#if defined(CONFIG_MPC8349ADS) || defined(CONFIG_TQM834X) -/* - * MPC8349 have two i2c bus - */ -extern i2c_t * mpc8349_i2c; -#define I2C mpc8349_i2c -#else -#define I2C ((i2c_t*)(CFG_IMMRBAR + CFG_I2C_OFFSET)) -#endif +#define I2C_1 ((i2c_t*)(CFG_IMMR + CFG_I2C_OFFSET)) + +/* Optional support for second I2C bus */ +#ifdef CFG_I2C2_OFFSET +#define I2C_2 ((i2c_t*)(CFG_IMMR + CFG_I2C2_OFFSET)) +#endif /* CFG_I2C2_OFFSET */ #define I2C_READ 1 #define I2C_WRITE 0