[PATCH] Enable I2C bus switching
Syed Mohammed Khasim
khasim at ti.com
Tue Jan 5 16:22:36 CET 2010
OMAP3 supports Multiple I2C channels, this patch allows
us to use i2c dev <bus no> command to switch between busses.
Signed-off-by: Syed Mohammed Khasim <khasim at ti.com>
---
drivers/i2c/omap24xx_i2c.c | 5 +++++
include/configs/omap3_beagle.h | 4 ++++
2 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/drivers/i2c/omap24xx_i2c.c b/drivers/i2c/omap24xx_i2c.c
index ff18991..a9250be 100644
--- a/drivers/i2c/omap24xx_i2c.c
+++ b/drivers/i2c/omap24xx_i2c.c
@@ -435,3 +435,8 @@ int i2c_set_bus_num(unsigned int bus)
return 0;
}
+
+int i2c_get_bus_num(void)
+{
+ return ((int) current_bus);
+}
diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h
index d1c9cd0..fa26b35 100644
--- a/include/configs/omap3_beagle.h
+++ b/include/configs/omap3_beagle.h
@@ -100,6 +100,10 @@
/* DDR - I use Micron DDR */
#define CONFIG_OMAP3_MICRON_DDR 1
+/* Enable Multi Bus support for I2C */
+#define CONFIG_I2C_MULTI_BUS 1
+#define CONFIG_SYS_I2C_NOPROBES {0x0,0x0}
+
/* commands to include */
#include <config_cmd_default.h>
--
1.5.6.3
More information about the U-Boot
mailing list