]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - arch/arm/mach-omap1/i2c.c
omap1: I2C mux and clocks for omap7xx
[net-next-2.6.git] / arch / arm / mach-omap1 / i2c.c
index bc9d12bc1c61e48864b96bd90c9dba268b997301..1bf4735e27a636285ad512f26b5cff0b7b519748 100644 (file)
 
 #include <plat/i2c.h>
 #include <plat/mux.h>
+#include <plat/cpu.h>
 
 int __init omap_register_i2c_bus(int bus_id, u32 clkrate,
                          struct i2c_board_info const *info,
                          unsigned len)
 {
-       omap_cfg_reg(I2C_SDA);
-       omap_cfg_reg(I2C_SCL);
+       if (cpu_is_omap7xx()) {
+               omap_cfg_reg(I2C_7XX_SDA);
+               omap_cfg_reg(I2C_7XX_SCL);
+       } else {
+               omap_cfg_reg(I2C_SDA);
+               omap_cfg_reg(I2C_SCL);
+       }
 
        return omap_plat_register_i2c_bus(bus_id, clkrate, info, len);
 }