]> git.sur5r.net Git - u-boot/blobdiff - include/i2c.h
soft_i2c: prevent compiler warnings if driver does not use CPU Pins.
[u-boot] / include / i2c.h
index a51c16464ffbb3069dca9dcdebfec81d37cbfb11..a6e797a3835e90ec2989607cc27520c1d3df46c9 100644 (file)
 #define CFG_SPD_BUS_NUM                0
 #endif
 
+#ifndef I2C_SOFT_DECLARATIONS
+# if defined(CONFIG_MPC8260)
+#  define I2C_SOFT_DECLARATIONS volatile ioport_t *iop = ioport_addr((immap_t *)CFG_IMMR, I2C_PORT);
+# elif defined(CONFIG_8xx)
+#  define I2C_SOFT_DECLARATIONS        volatile immap_t *immr = (immap_t *)CFG_IMMR;
+# else
+#  define I2C_SOFT_DECLARATIONS
+# endif
+#endif
 /*
  * Initialization, must be called once on start up, may be called
  * repeatedly to change the speed and slave addresses.