summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap
diff options
context:
space:
mode:
authorAlexander Aring <a.aring@phytec.de>2011-12-21 08:50:27 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2011-12-21 12:46:01 +0100
commit8007b25bdfa353cbce71c849a41f474604648ebf (patch)
tree322bf1a8d57ea2c1d357dba91ee3f2393e31896a /arch/arm/mach-omap
parent56d0d5012f2771fe6a5667bec1ef2334c5a6c005 (diff)
downloadbarebox-8007b25bdfa353cbce71c849a41f474604648ebf.tar.gz
barebox-8007b25bdfa353cbce71c849a41f474604648ebf.tar.xz
i2c-omap: add i2c omap4 support
Added i2c support for omap4. Tested on pcm049. Driver based on linux kernel implementation. Also added a shift to access 16-bit registers to make support for OMAP730/850 possible. If accessing a non existing slave the bus will go into arbitration mode. It's unable to recover from it. Signed-off-by: Alexander Aring <a.aring@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-omap')
-rw-r--r--arch/arm/mach-omap/include/mach/generic.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm/mach-omap/include/mach/generic.h b/arch/arm/mach-omap/include/mach/generic.h
index a2dd229c1c..c801a068e3 100644
--- a/arch/arm/mach-omap/include/mach/generic.h
+++ b/arch/arm/mach-omap/include/mach/generic.h
@@ -5,6 +5,7 @@
/* I2C controller revisions present on specific hardware */
#define OMAP_I2C_REV_ON_2430 0x36
#define OMAP_I2C_REV_ON_3430 0x3C
+#define OMAP_I2C_REV_ON_4430 0x40
#ifdef CONFIG_ARCH_OMAP
#define cpu_is_omap2430() (1)
@@ -17,3 +18,9 @@
#else
#define cpu_is_omap34xx() (0)
#endif
+
+#ifdef CONFIG_ARCH_OMAP4
+#define cpu_is_omap4xxx() (1)
+#else
+#define cpu_is_omap4xxx() (0)
+#endif