arch/powerpc: Simplify some calculations using ARRAY_SIZE() macro.
[oweals/u-boot.git] / arch / powerpc / cpu / mpc8260 / i2c.c
index fc8d2ef82c5950972fe4cb54fc59b3a45ed99ddc..a0de101329140e6ae5fb4ab465485cf046d34687 100644 (file)
@@ -9,6 +9,7 @@
  */
 
 #include <common.h>
+#include <console.h>
 
 #if defined(CONFIG_HARD_I2C)
 
@@ -730,23 +731,9 @@ unsigned int i2c_get_bus_num(void)
 
 int i2c_set_bus_num(unsigned int bus)
 {
-#if defined(CONFIG_I2C_MUX)
-       if (bus < CONFIG_SYS_MAX_I2C_BUS) {
-               i2c_bus_num = bus;
-       } else {
-               int ret;
-
-               ret = i2x_mux_select_mux(bus);
-               if (ret == 0)
-                       i2c_bus_num = bus;
-               else
-                       return ret;
-       }
-#else
        if (bus >= CONFIG_SYS_MAX_I2C_BUS)
                return -1;
        i2c_bus_num = bus;
-#endif
        return 0;
 }