]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - glsdk/meta-ti-glsdk.git/blob - recipes-bsp/linux/linux-omap-2.6.37rc/0009-ARM-OMAP-add-omap_rev_-macros.patch
1c5d8dfd78f0b4f1b6cafd89cd2a2024322ff207
[glsdk/meta-ti-glsdk.git] / recipes-bsp / linux / linux-omap-2.6.37rc / 0009-ARM-OMAP-add-omap_rev_-macros.patch
1 From 1beed5ee3301a9756c8cd2672d487c568c562e81 Mon Sep 17 00:00:00 2001
2 From: Koen Kooi <koen@dominion.thruhere.net>
3 Date: Tue, 23 Nov 2010 11:40:20 +0100
4 Subject: [PATCH 09/29] ARM: OMAP: add omap_rev_* macros
6 This is just to make the SGX modules build that depend on omap_rev_lt_3_0
8 Signed-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(-)
13 diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h
14 index 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 -- 
80 1.6.6.1