n900
Attachment '0155.1-omap3-modified-Add-macros-for-comparing-si-revision.patch'
Download 1 diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h
2 index 9b38e4b..61bdae8 100644
3 --- a/arch/arm/plat-omap/include/plat/cpu.h
4 +++ b/arch/arm/plat-omap/include/plat/cpu.h
5 @@ -394,6 +394,61 @@ IS_OMAP_TYPE(3517, 0x3517)
6 #define OMAP4430_REV_ES2_0 0x44301044
7
8 /*
9 + * Silicon revisions
10 + */
11 +#define OMAP_ES_1_0 0x00
12 +#define OMAP_ES_2_0 0x10
13 +#define OMAP_ES_2_1 0x20
14 +#define OMAP_ES_3_0 0x30
15 +#define OMAP_ES_3_1 0x40
16 +
17 +#define OMAP_REV_MASK 0x0000ff00
18 +#define OMAP_REV_BITS ((omap_rev() & OMAP_REV_MASK) >> 8)
19 +
20 +#define OMAP_REV_IS(revid) \
21 +static inline u8 omap_rev_is_ ##revid (void) \
22 +{ \
23 + return (OMAP_REV_BITS == OMAP_ES_ ##revid) ? 1 : 0; \
24 +}
25 +
26 +#define OMAP_REV_LT(revid) \
27 +static inline u8 omap_rev_lt_ ##revid (void) \
28 +{ \
29 + return (OMAP_REV_BITS < OMAP_ES_ ##revid) ? 1 : 0; \
30 +}
31 +
32 +#define OMAP_REV_LE(revid) \
33 +static inline u8 omap_rev_le_ ##revid (void) \
34 +{ \
35 + return (OMAP_REV_BITS <= OMAP_ES_ ##revid) ? 1 : 0; \
36 +}
37 +
38 +#define OMAP_REV_GT(revid) \
39 +static inline u8 omap_rev_gt_ ##revid (void) \
40 +{ \
41 + return (OMAP_REV_BITS > OMAP_ES_ ##revid) ? 1 : 0; \
42 +}
43 +
44 +#define OMAP_REV_GE(revid) \
45 +static inline u8 omap_rev_ge_ ##revid (void) \
46 +{ \
47 + return (OMAP_REV_BITS >= OMAP_ES_ ##revid) ? 1 : 0; \
48 +}
49 +
50 +#define OMAP_REV_FUNCTIONS(revid) \
51 + OMAP_REV_IS(revid) \
52 + OMAP_REV_LT(revid) \
53 + OMAP_REV_LE(revid) \
54 + OMAP_REV_GT(revid) \
55 + OMAP_REV_GE(revid)
56 +
57 +OMAP_REV_FUNCTIONS(1_0)
58 +OMAP_REV_FUNCTIONS(2_0)
59 +OMAP_REV_FUNCTIONS(2_1)
60 +OMAP_REV_FUNCTIONS(3_0)
61 +OMAP_REV_FUNCTIONS(3_1)
62 +
63 +/*
64 * omap_chip bits
65 *
66 * CHIP_IS_OMAP{2420,2430,3430} indicate that a particular structure is
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.You are not allowed to attach a file to this page.