aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/u-boot/u-boot-git/beagleboard/0001-Enable-I2C-bus-switching.patch
blob: 551e44a67a156f10f605765d14307c315ec040d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
From 5b5eb18bfb80fa9595eb258a911a94f2807e7497 Mon Sep 17 00:00:00 2001
From: Syed Mohammed Khasim <khasim@ti.com>
Date: Mon, 18 Jan 2010 18:11:14 +0530
Subject: [PATCH 01/50] Enable I2C bus switching

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@ti.com>
Acked-by: Heiko Schocher <hs@denx.de>
(cherry picked from commit 9bb1c3501c8f098dac6e224c99e409ebf92b0ab9)
---
 drivers/i2c/omap24xx_i2c.c     |    5 +++++
 include/configs/omap3_beagle.h |    6 ++++++
 2 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/drivers/i2c/omap24xx_i2c.c b/drivers/i2c/omap24xx_i2c.c
index ff18991..e8c8184 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 08d79ac..d522c77 100644
--- a/include/configs/omap3_beagle.h
+++ b/include/configs/omap3_beagle.h
@@ -100,6 +100,12 @@
 /* DDR - I use Micron DDR */
 #define CONFIG_OMAP3_MICRON_DDR		1
 
+/* Enable Multi Bus support for I2C */
+#define CONFIG_I2C_MULTI_BUS		1
+
+/* Probe all devices */
+#define CONFIG_SYS_I2C_NOPROBES		{0x0, 0x0}
+
 /* USB */
 #define CONFIG_MUSB_UDC			1
 #define CONFIG_USB_OMAP3		1
-- 
1.6.6.1