summaryrefslogtreecommitdiffstats
path: root/extras/recipes-kernel/linux/linux-omap/base/0011-ARM-OMAP-add-omap_rev_-macros.patch
diff options
context:
space:
mode:
Diffstat (limited to 'extras/recipes-kernel/linux/linux-omap/base/0011-ARM-OMAP-add-omap_rev_-macros.patch')
-rw-r--r--extras/recipes-kernel/linux/linux-omap/base/0011-ARM-OMAP-add-omap_rev_-macros.patch81
1 files changed, 81 insertions, 0 deletions
diff --git a/extras/recipes-kernel/linux/linux-omap/base/0011-ARM-OMAP-add-omap_rev_-macros.patch b/extras/recipes-kernel/linux/linux-omap/base/0011-ARM-OMAP-add-omap_rev_-macros.patch
new file mode 100644
index 00000000..b89302bc
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/base/0011-ARM-OMAP-add-omap_rev_-macros.patch
@@ -0,0 +1,81 @@
1From 8b34449d7eb89e1ae1c1c84f90ef5ea1e397787e Mon Sep 17 00:00:00 2001
2From: Koen Kooi <koen@dominion.thruhere.net>
3Date: Tue, 23 Nov 2010 11:40:20 +0100
4Subject: [PATCH 11/28] ARM: OMAP: add omap_rev_* macros
5
6This is just to make the SGX modules build that depend on omap_rev_lt_3_0
7
8Signed-off-by: Koen Kooi <koen@beagleboard.org>
9---
10 arch/arm/plat-omap/include/plat/cpu.h | 55 +++++++++++++++++++++++++++++++++
11 1 files changed, 55 insertions(+), 0 deletions(-)
12
13diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h
14index 3fd8b40..1a8c347 100644
15--- a/arch/arm/plat-omap/include/plat/cpu.h
16+++ b/arch/arm/plat-omap/include/plat/cpu.h
17@@ -394,6 +394,61 @@ IS_OMAP_TYPE(3517, 0x3517)
18 #define OMAP4430_REV_ES2_0 0x44301044
19
20 /*
21+ * Silicon revisions
22+ */
23+#define OMAP_ES_1_0 0x00
24+#define OMAP_ES_2_0 0x10
25+#define OMAP_ES_2_1 0x20
26+#define OMAP_ES_3_0 0x30
27+#define OMAP_ES_3_1 0x40
28+
29+#define OMAP_REV_MASK 0x0000ff00
30+#define OMAP_REV_BITS ((omap_rev() & OMAP_REV_MASK) >> 8)
31+
32+#define OMAP_REV_IS(revid) \
33+static inline u8 omap_rev_is_ ##revid (void) \
34+{ \
35+ return (OMAP_REV_BITS == OMAP_ES_ ##revid) ? 1 : 0; \
36+}
37+
38+#define OMAP_REV_LT(revid) \
39+static inline u8 omap_rev_lt_ ##revid (void) \
40+{ \
41+ return (OMAP_REV_BITS < OMAP_ES_ ##revid) ? 1 : 0; \
42+}
43+
44+#define OMAP_REV_LE(revid) \
45+static inline u8 omap_rev_le_ ##revid (void) \
46+{ \
47+ return (OMAP_REV_BITS <= OMAP_ES_ ##revid) ? 1 : 0; \
48+}
49+
50+#define OMAP_REV_GT(revid) \
51+static inline u8 omap_rev_gt_ ##revid (void) \
52+{ \
53+ return (OMAP_REV_BITS > OMAP_ES_ ##revid) ? 1 : 0; \
54+}
55+
56+#define OMAP_REV_GE(revid) \
57+static inline u8 omap_rev_ge_ ##revid (void) \
58+{ \
59+ return (OMAP_REV_BITS >= OMAP_ES_ ##revid) ? 1 : 0; \
60+}
61+
62+#define OMAP_REV_FUNCTIONS(revid) \
63+ OMAP_REV_IS(revid) \
64+ OMAP_REV_LT(revid) \
65+ OMAP_REV_LE(revid) \
66+ OMAP_REV_GT(revid) \
67+ OMAP_REV_GE(revid)
68+
69+OMAP_REV_FUNCTIONS(1_0)
70+OMAP_REV_FUNCTIONS(2_0)
71+OMAP_REV_FUNCTIONS(2_1)
72+OMAP_REV_FUNCTIONS(3_0)
73+OMAP_REV_FUNCTIONS(3_1)
74+
75+/*
76 * omap_chip bits
77 *
78 * CHIP_IS_OMAP{2420,2430,3430} indicate that a particular structure is
79--
801.6.6.1
81