diff options
author | Tony Lindgren <tony@atomide.com> | 2012-10-30 18:30:44 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2012-10-31 18:37:14 -0400 |
commit | 4e969010c55d72fbdc69333ce59392c7b530f6a3 (patch) | |
tree | c7f5d9ae1d99ae47722f63f7886e8919af68d96a /arch/arm/mach-omap1 | |
parent | 8280960181eae6e4039957044577b6ef7154220f (diff) |
ARM: OMAP1: Remove relative includes
As discussed on linux-arm-kernel, we want to avoid
relative includes for the arch/arm/*omap* code:
http://www.spinics.net/lists/linux-omap/msg80520.html
Note that eventually when the omap1 specific drivers
are fixed to not use cpu_is_omap macros and not depend
on mach/hardware.h, this patch can be reverted and these
headers can be local. But since just fixing the drivers for
omap2+ is already a big enough hassle, let's deal
with that properly first.
[tony@atomide.com: also drop unused include for ispvideo.c]
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap1')
-rw-r--r-- | arch/arm/mach-omap1/include/mach/entry-macro.S | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap1/include/mach/hardware.h | 5 | ||||
-rw-r--r-- | arch/arm/mach-omap1/include/mach/memory.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap1/include/mach/soc.h | 229 | ||||
-rw-r--r-- | arch/arm/mach-omap1/iomap.h | 3 | ||||
-rw-r--r-- | arch/arm/mach-omap1/sleep.S | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap1/soc.h | 229 |
7 files changed, 238 insertions, 234 deletions
diff --git a/arch/arm/mach-omap1/include/mach/entry-macro.S b/arch/arm/mach-omap1/include/mach/entry-macro.S index 88f08cab1717..78a8c6c24764 100644 --- a/arch/arm/mach-omap1/include/mach/entry-macro.S +++ b/arch/arm/mach-omap1/include/mach/entry-macro.S | |||
@@ -13,8 +13,6 @@ | |||
13 | #include <mach/hardware.h> | 13 | #include <mach/hardware.h> |
14 | #include <mach/irqs.h> | 14 | #include <mach/irqs.h> |
15 | 15 | ||
16 | #include "../../iomap.h" | ||
17 | |||
18 | .macro get_irqnr_preamble, base, tmp | 16 | .macro get_irqnr_preamble, base, tmp |
19 | .endm | 17 | .endm |
20 | 18 | ||
diff --git a/arch/arm/mach-omap1/include/mach/hardware.h b/arch/arm/mach-omap1/include/mach/hardware.h index dc3237bd72d2..5875a5098d35 100644 --- a/arch/arm/mach-omap1/include/mach/hardware.h +++ b/arch/arm/mach-omap1/include/mach/hardware.h | |||
@@ -39,7 +39,7 @@ | |||
39 | #include <asm/sizes.h> | 39 | #include <asm/sizes.h> |
40 | #ifndef __ASSEMBLER__ | 40 | #ifndef __ASSEMBLER__ |
41 | #include <asm/types.h> | 41 | #include <asm/types.h> |
42 | #include "../../mach-omap1/soc.h" | 42 | #include <mach/soc.h> |
43 | 43 | ||
44 | /* | 44 | /* |
45 | * NOTE: Please use ioremap + __raw_read/write where possible instead of these | 45 | * NOTE: Please use ioremap + __raw_read/write where possible instead of these |
@@ -72,6 +72,9 @@ static inline u32 omap_cs3_phys(void) | |||
72 | 72 | ||
73 | #endif /* ifndef __ASSEMBLER__ */ | 73 | #endif /* ifndef __ASSEMBLER__ */ |
74 | 74 | ||
75 | #define OMAP1_IO_OFFSET 0x01000000 /* Virtual IO = 0xfefb0000 */ | ||
76 | #define OMAP1_IO_ADDRESS(pa) IOMEM((pa) - OMAP1_IO_OFFSET) | ||
77 | |||
75 | #include <mach/serial.h> | 78 | #include <mach/serial.h> |
76 | 79 | ||
77 | /* | 80 | /* |
diff --git a/arch/arm/mach-omap1/include/mach/memory.h b/arch/arm/mach-omap1/include/mach/memory.h index 351ae4f2c514..3c2530523111 100644 --- a/arch/arm/mach-omap1/include/mach/memory.h +++ b/arch/arm/mach-omap1/include/mach/memory.h | |||
@@ -19,7 +19,7 @@ | |||
19 | * because of the strncmp(). | 19 | * because of the strncmp(). |
20 | */ | 20 | */ |
21 | #if defined(CONFIG_ARCH_OMAP15XX) && !defined(__ASSEMBLER__) | 21 | #if defined(CONFIG_ARCH_OMAP15XX) && !defined(__ASSEMBLER__) |
22 | #include "../../mach-omap1/soc.h" | 22 | #include <mach/soc.h> |
23 | 23 | ||
24 | /* | 24 | /* |
25 | * OMAP-1510 Local Bus address offset | 25 | * OMAP-1510 Local Bus address offset |
diff --git a/arch/arm/mach-omap1/include/mach/soc.h b/arch/arm/mach-omap1/include/mach/soc.h new file mode 100644 index 000000000000..6cf9c1cc2bef --- /dev/null +++ b/arch/arm/mach-omap1/include/mach/soc.h | |||
@@ -0,0 +1,229 @@ | |||
1 | /* | ||
2 | * OMAP cpu type detection | ||
3 | * | ||
4 | * Copyright (C) 2004, 2008 Nokia Corporation | ||
5 | * | ||
6 | * Copyright (C) 2009-11 Texas Instruments. | ||
7 | * | ||
8 | * Written by Tony Lindgren <tony.lindgren@nokia.com> | ||
9 | * | ||
10 | * Added OMAP4/5 specific defines - Santosh Shilimkar<santosh.shilimkar@ti.com> | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or modify | ||
13 | * it under the terms of the GNU General Public License as published by | ||
14 | * the Free Software Foundation; either version 2 of the License, or | ||
15 | * (at your option) any later version. | ||
16 | * | ||
17 | * This program is distributed in the hope that it will be useful, | ||
18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
20 | * GNU General Public License for more details. | ||
21 | * | ||
22 | * You should have received a copy of the GNU General Public License | ||
23 | * along with this program; if not, write to the Free Software | ||
24 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
25 | * | ||
26 | */ | ||
27 | |||
28 | #ifndef __ASM_ARCH_OMAP_CPU_H | ||
29 | #define __ASM_ARCH_OMAP_CPU_H | ||
30 | |||
31 | #ifndef __ASSEMBLY__ | ||
32 | |||
33 | #include <linux/bitops.h> | ||
34 | |||
35 | /* | ||
36 | * Test if multicore OMAP support is needed | ||
37 | */ | ||
38 | #undef MULTI_OMAP1 | ||
39 | #undef OMAP_NAME | ||
40 | |||
41 | #ifdef CONFIG_ARCH_OMAP730 | ||
42 | # ifdef OMAP_NAME | ||
43 | # undef MULTI_OMAP1 | ||
44 | # define MULTI_OMAP1 | ||
45 | # else | ||
46 | # define OMAP_NAME omap730 | ||
47 | # endif | ||
48 | #endif | ||
49 | #ifdef CONFIG_ARCH_OMAP850 | ||
50 | # ifdef OMAP_NAME | ||
51 | # undef MULTI_OMAP1 | ||
52 | # define MULTI_OMAP1 | ||
53 | # else | ||
54 | # define OMAP_NAME omap850 | ||
55 | # endif | ||
56 | #endif | ||
57 | #ifdef CONFIG_ARCH_OMAP15XX | ||
58 | # ifdef OMAP_NAME | ||
59 | # undef MULTI_OMAP1 | ||
60 | # define MULTI_OMAP1 | ||
61 | # else | ||
62 | # define OMAP_NAME omap1510 | ||
63 | # endif | ||
64 | #endif | ||
65 | #ifdef CONFIG_ARCH_OMAP16XX | ||
66 | # ifdef OMAP_NAME | ||
67 | # undef MULTI_OMAP1 | ||
68 | # define MULTI_OMAP1 | ||
69 | # else | ||
70 | # define OMAP_NAME omap16xx | ||
71 | # endif | ||
72 | #endif | ||
73 | |||
74 | /* | ||
75 | * omap_rev bits: | ||
76 | * CPU id bits (0730, 1510, 1710, 2422...) [31:16] | ||
77 | * CPU revision (See _REV_ defined in cpu.h) [15:08] | ||
78 | * CPU class bits (15xx, 16xx, 24xx, 34xx...) [07:00] | ||
79 | */ | ||
80 | unsigned int omap_rev(void); | ||
81 | |||
82 | /* | ||
83 | * Get the CPU revision for OMAP devices | ||
84 | */ | ||
85 | #define GET_OMAP_REVISION() ((omap_rev() >> 8) & 0xff) | ||
86 | |||
87 | /* | ||
88 | * Macros to group OMAP into cpu classes. | ||
89 | * These can be used in most places. | ||
90 | * cpu_is_omap7xx(): True for OMAP730, OMAP850 | ||
91 | * cpu_is_omap15xx(): True for OMAP1510, OMAP5910 and OMAP310 | ||
92 | * cpu_is_omap16xx(): True for OMAP1610, OMAP5912 and OMAP1710 | ||
93 | */ | ||
94 | #define GET_OMAP_CLASS (omap_rev() & 0xff) | ||
95 | |||
96 | #define IS_OMAP_CLASS(class, id) \ | ||
97 | static inline int is_omap ##class (void) \ | ||
98 | { \ | ||
99 | return (GET_OMAP_CLASS == (id)) ? 1 : 0; \ | ||
100 | } | ||
101 | |||
102 | #define GET_OMAP_SUBCLASS ((omap_rev() >> 20) & 0x0fff) | ||
103 | |||
104 | #define IS_OMAP_SUBCLASS(subclass, id) \ | ||
105 | static inline int is_omap ##subclass (void) \ | ||
106 | { \ | ||
107 | return (GET_OMAP_SUBCLASS == (id)) ? 1 : 0; \ | ||
108 | } | ||
109 | |||
110 | IS_OMAP_CLASS(7xx, 0x07) | ||
111 | IS_OMAP_CLASS(15xx, 0x15) | ||
112 | IS_OMAP_CLASS(16xx, 0x16) | ||
113 | |||
114 | #define cpu_is_omap7xx() 0 | ||
115 | #define cpu_is_omap15xx() 0 | ||
116 | #define cpu_is_omap16xx() 0 | ||
117 | |||
118 | #if defined(MULTI_OMAP1) | ||
119 | # if defined(CONFIG_ARCH_OMAP730) | ||
120 | # undef cpu_is_omap7xx | ||
121 | # define cpu_is_omap7xx() is_omap7xx() | ||
122 | # endif | ||
123 | # if defined(CONFIG_ARCH_OMAP850) | ||
124 | # undef cpu_is_omap7xx | ||
125 | # define cpu_is_omap7xx() is_omap7xx() | ||
126 | # endif | ||
127 | # if defined(CONFIG_ARCH_OMAP15XX) | ||
128 | # undef cpu_is_omap15xx | ||
129 | # define cpu_is_omap15xx() is_omap15xx() | ||
130 | # endif | ||
131 | # if defined(CONFIG_ARCH_OMAP16XX) | ||
132 | # undef cpu_is_omap16xx | ||
133 | # define cpu_is_omap16xx() is_omap16xx() | ||
134 | # endif | ||
135 | #else | ||
136 | # if defined(CONFIG_ARCH_OMAP730) | ||
137 | # undef cpu_is_omap7xx | ||
138 | # define cpu_is_omap7xx() 1 | ||
139 | # endif | ||
140 | # if defined(CONFIG_ARCH_OMAP850) | ||
141 | # undef cpu_is_omap7xx | ||
142 | # define cpu_is_omap7xx() 1 | ||
143 | # endif | ||
144 | # if defined(CONFIG_ARCH_OMAP15XX) | ||
145 | # undef cpu_is_omap15xx | ||
146 | # define cpu_is_omap15xx() 1 | ||
147 | # endif | ||
148 | # if defined(CONFIG_ARCH_OMAP16XX) | ||
149 | # undef cpu_is_omap16xx | ||
150 | # define cpu_is_omap16xx() 1 | ||
151 | # endif | ||
152 | #endif | ||
153 | |||
154 | /* | ||
155 | * Macros to detect individual cpu types. | ||
156 | * These are only rarely needed. | ||
157 | * cpu_is_omap310(): True for OMAP310 | ||
158 | * cpu_is_omap1510(): True for OMAP1510 | ||
159 | * cpu_is_omap1610(): True for OMAP1610 | ||
160 | * cpu_is_omap1611(): True for OMAP1611 | ||
161 | * cpu_is_omap5912(): True for OMAP5912 | ||
162 | * cpu_is_omap1621(): True for OMAP1621 | ||
163 | * cpu_is_omap1710(): True for OMAP1710 | ||
164 | */ | ||
165 | #define GET_OMAP_TYPE ((omap_rev() >> 16) & 0xffff) | ||
166 | |||
167 | #define IS_OMAP_TYPE(type, id) \ | ||
168 | static inline int is_omap ##type (void) \ | ||
169 | { \ | ||
170 | return (GET_OMAP_TYPE == (id)) ? 1 : 0; \ | ||
171 | } | ||
172 | |||
173 | IS_OMAP_TYPE(310, 0x0310) | ||
174 | IS_OMAP_TYPE(1510, 0x1510) | ||
175 | IS_OMAP_TYPE(1610, 0x1610) | ||
176 | IS_OMAP_TYPE(1611, 0x1611) | ||
177 | IS_OMAP_TYPE(5912, 0x1611) | ||
178 | IS_OMAP_TYPE(1621, 0x1621) | ||
179 | IS_OMAP_TYPE(1710, 0x1710) | ||
180 | |||
181 | #define cpu_is_omap310() 0 | ||
182 | #define cpu_is_omap1510() 0 | ||
183 | #define cpu_is_omap1610() 0 | ||
184 | #define cpu_is_omap5912() 0 | ||
185 | #define cpu_is_omap1611() 0 | ||
186 | #define cpu_is_omap1621() 0 | ||
187 | #define cpu_is_omap1710() 0 | ||
188 | |||
189 | /* These are needed to compile common code */ | ||
190 | #ifdef CONFIG_ARCH_OMAP1 | ||
191 | #define cpu_is_omap242x() 0 | ||
192 | #define cpu_is_omap2430() 0 | ||
193 | #define cpu_is_omap243x() 0 | ||
194 | #define cpu_is_omap24xx() 0 | ||
195 | #define cpu_is_omap34xx() 0 | ||
196 | #define cpu_is_omap44xx() 0 | ||
197 | #define soc_is_omap54xx() 0 | ||
198 | #define soc_is_am33xx() 0 | ||
199 | #define cpu_class_is_omap1() 1 | ||
200 | #define cpu_class_is_omap2() 0 | ||
201 | #endif | ||
202 | |||
203 | /* | ||
204 | * Whether we have MULTI_OMAP1 or not, we still need to distinguish | ||
205 | * between 310 vs. 1510 and 1611B/5912 vs. 1710. | ||
206 | */ | ||
207 | |||
208 | #if defined(CONFIG_ARCH_OMAP15XX) | ||
209 | # undef cpu_is_omap310 | ||
210 | # undef cpu_is_omap1510 | ||
211 | # define cpu_is_omap310() is_omap310() | ||
212 | # define cpu_is_omap1510() is_omap1510() | ||
213 | #endif | ||
214 | |||
215 | #if defined(CONFIG_ARCH_OMAP16XX) | ||
216 | # undef cpu_is_omap1610 | ||
217 | # undef cpu_is_omap1611 | ||
218 | # undef cpu_is_omap5912 | ||
219 | # undef cpu_is_omap1621 | ||
220 | # undef cpu_is_omap1710 | ||
221 | # define cpu_is_omap1610() is_omap1610() | ||
222 | # define cpu_is_omap1611() is_omap1611() | ||
223 | # define cpu_is_omap5912() is_omap5912() | ||
224 | # define cpu_is_omap1621() is_omap1621() | ||
225 | # define cpu_is_omap1710() is_omap1710() | ||
226 | #endif | ||
227 | |||
228 | #endif /* __ASSEMBLY__ */ | ||
229 | #endif | ||
diff --git a/arch/arm/mach-omap1/iomap.h b/arch/arm/mach-omap1/iomap.h index 330c4716b028..f4e2d7a21365 100644 --- a/arch/arm/mach-omap1/iomap.h +++ b/arch/arm/mach-omap1/iomap.h | |||
@@ -22,9 +22,6 @@ | |||
22 | * 675 Mass Ave, Cambridge, MA 02139, USA. | 22 | * 675 Mass Ave, Cambridge, MA 02139, USA. |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #define OMAP1_IO_OFFSET 0x01000000 /* Virtual IO = 0xfefb0000 */ | ||
26 | #define OMAP1_IO_ADDRESS(pa) IOMEM((pa) - OMAP1_IO_OFFSET) | ||
27 | |||
28 | /* | 25 | /* |
29 | * ---------------------------------------------------------------------------- | 26 | * ---------------------------------------------------------------------------- |
30 | * Omap1 specific IO mapping | 27 | * Omap1 specific IO mapping |
diff --git a/arch/arm/mach-omap1/sleep.S b/arch/arm/mach-omap1/sleep.S index 0e628743bd03..a908c51839a4 100644 --- a/arch/arm/mach-omap1/sleep.S +++ b/arch/arm/mach-omap1/sleep.S | |||
@@ -36,6 +36,8 @@ | |||
36 | 36 | ||
37 | #include <asm/assembler.h> | 37 | #include <asm/assembler.h> |
38 | 38 | ||
39 | #include <mach/hardware.h> | ||
40 | |||
39 | #include "iomap.h" | 41 | #include "iomap.h" |
40 | #include "pm.h" | 42 | #include "pm.h" |
41 | 43 | ||
diff --git a/arch/arm/mach-omap1/soc.h b/arch/arm/mach-omap1/soc.h index 6cf9c1cc2bef..69daf0187b1d 100644 --- a/arch/arm/mach-omap1/soc.h +++ b/arch/arm/mach-omap1/soc.h | |||
@@ -1,229 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * OMAP cpu type detection | 2 | * We can move mach/soc.h here once the drivers are fixed |
3 | * | ||
4 | * Copyright (C) 2004, 2008 Nokia Corporation | ||
5 | * | ||
6 | * Copyright (C) 2009-11 Texas Instruments. | ||
7 | * | ||
8 | * Written by Tony Lindgren <tony.lindgren@nokia.com> | ||
9 | * | ||
10 | * Added OMAP4/5 specific defines - Santosh Shilimkar<santosh.shilimkar@ti.com> | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or modify | ||
13 | * it under the terms of the GNU General Public License as published by | ||
14 | * the Free Software Foundation; either version 2 of the License, or | ||
15 | * (at your option) any later version. | ||
16 | * | ||
17 | * This program is distributed in the hope that it will be useful, | ||
18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
20 | * GNU General Public License for more details. | ||
21 | * | ||
22 | * You should have received a copy of the GNU General Public License | ||
23 | * along with this program; if not, write to the Free Software | ||
24 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
25 | * | ||
26 | */ | 3 | */ |
27 | 4 | #include <mach/soc.h> | |
28 | #ifndef __ASM_ARCH_OMAP_CPU_H | ||
29 | #define __ASM_ARCH_OMAP_CPU_H | ||
30 | |||
31 | #ifndef __ASSEMBLY__ | ||
32 | |||
33 | #include <linux/bitops.h> | ||
34 | |||
35 | /* | ||
36 | * Test if multicore OMAP support is needed | ||
37 | */ | ||
38 | #undef MULTI_OMAP1 | ||
39 | #undef OMAP_NAME | ||
40 | |||
41 | #ifdef CONFIG_ARCH_OMAP730 | ||
42 | # ifdef OMAP_NAME | ||
43 | # undef MULTI_OMAP1 | ||
44 | # define MULTI_OMAP1 | ||
45 | # else | ||
46 | # define OMAP_NAME omap730 | ||
47 | # endif | ||
48 | #endif | ||
49 | #ifdef CONFIG_ARCH_OMAP850 | ||
50 | # ifdef OMAP_NAME | ||
51 | # undef MULTI_OMAP1 | ||
52 | # define MULTI_OMAP1 | ||
53 | # else | ||
54 | # define OMAP_NAME omap850 | ||
55 | # endif | ||
56 | #endif | ||
57 | #ifdef CONFIG_ARCH_OMAP15XX | ||
58 | # ifdef OMAP_NAME | ||
59 | # undef MULTI_OMAP1 | ||
60 | # define MULTI_OMAP1 | ||
61 | # else | ||
62 | # define OMAP_NAME omap1510 | ||
63 | # endif | ||
64 | #endif | ||
65 | #ifdef CONFIG_ARCH_OMAP16XX | ||
66 | # ifdef OMAP_NAME | ||
67 | # undef MULTI_OMAP1 | ||
68 | # define MULTI_OMAP1 | ||
69 | # else | ||
70 | # define OMAP_NAME omap16xx | ||
71 | # endif | ||
72 | #endif | ||
73 | |||
74 | /* | ||
75 | * omap_rev bits: | ||
76 | * CPU id bits (0730, 1510, 1710, 2422...) [31:16] | ||
77 | * CPU revision (See _REV_ defined in cpu.h) [15:08] | ||
78 | * CPU class bits (15xx, 16xx, 24xx, 34xx...) [07:00] | ||
79 | */ | ||
80 | unsigned int omap_rev(void); | ||
81 | |||
82 | /* | ||
83 | * Get the CPU revision for OMAP devices | ||
84 | */ | ||
85 | #define GET_OMAP_REVISION() ((omap_rev() >> 8) & 0xff) | ||
86 | |||
87 | /* | ||
88 | * Macros to group OMAP into cpu classes. | ||
89 | * These can be used in most places. | ||
90 | * cpu_is_omap7xx(): True for OMAP730, OMAP850 | ||
91 | * cpu_is_omap15xx(): True for OMAP1510, OMAP5910 and OMAP310 | ||
92 | * cpu_is_omap16xx(): True for OMAP1610, OMAP5912 and OMAP1710 | ||
93 | */ | ||
94 | #define GET_OMAP_CLASS (omap_rev() & 0xff) | ||
95 | |||
96 | #define IS_OMAP_CLASS(class, id) \ | ||
97 | static inline int is_omap ##class (void) \ | ||
98 | { \ | ||
99 | return (GET_OMAP_CLASS == (id)) ? 1 : 0; \ | ||
100 | } | ||
101 | |||
102 | #define GET_OMAP_SUBCLASS ((omap_rev() >> 20) & 0x0fff) | ||
103 | |||
104 | #define IS_OMAP_SUBCLASS(subclass, id) \ | ||
105 | static inline int is_omap ##subclass (void) \ | ||
106 | { \ | ||
107 | return (GET_OMAP_SUBCLASS == (id)) ? 1 : 0; \ | ||
108 | } | ||
109 | |||
110 | IS_OMAP_CLASS(7xx, 0x07) | ||
111 | IS_OMAP_CLASS(15xx, 0x15) | ||
112 | IS_OMAP_CLASS(16xx, 0x16) | ||
113 | |||
114 | #define cpu_is_omap7xx() 0 | ||
115 | #define cpu_is_omap15xx() 0 | ||
116 | #define cpu_is_omap16xx() 0 | ||
117 | |||
118 | #if defined(MULTI_OMAP1) | ||
119 | # if defined(CONFIG_ARCH_OMAP730) | ||
120 | # undef cpu_is_omap7xx | ||
121 | # define cpu_is_omap7xx() is_omap7xx() | ||
122 | # endif | ||
123 | # if defined(CONFIG_ARCH_OMAP850) | ||
124 | # undef cpu_is_omap7xx | ||
125 | # define cpu_is_omap7xx() is_omap7xx() | ||
126 | # endif | ||
127 | # if defined(CONFIG_ARCH_OMAP15XX) | ||
128 | # undef cpu_is_omap15xx | ||
129 | # define cpu_is_omap15xx() is_omap15xx() | ||
130 | # endif | ||
131 | # if defined(CONFIG_ARCH_OMAP16XX) | ||
132 | # undef cpu_is_omap16xx | ||
133 | # define cpu_is_omap16xx() is_omap16xx() | ||
134 | # endif | ||
135 | #else | ||
136 | # if defined(CONFIG_ARCH_OMAP730) | ||
137 | # undef cpu_is_omap7xx | ||
138 | # define cpu_is_omap7xx() 1 | ||
139 | # endif | ||
140 | # if defined(CONFIG_ARCH_OMAP850) | ||
141 | # undef cpu_is_omap7xx | ||
142 | # define cpu_is_omap7xx() 1 | ||
143 | # endif | ||
144 | # if defined(CONFIG_ARCH_OMAP15XX) | ||
145 | # undef cpu_is_omap15xx | ||
146 | # define cpu_is_omap15xx() 1 | ||
147 | # endif | ||
148 | # if defined(CONFIG_ARCH_OMAP16XX) | ||
149 | # undef cpu_is_omap16xx | ||
150 | # define cpu_is_omap16xx() 1 | ||
151 | # endif | ||
152 | #endif | ||
153 | |||
154 | /* | ||
155 | * Macros to detect individual cpu types. | ||
156 | * These are only rarely needed. | ||
157 | * cpu_is_omap310(): True for OMAP310 | ||
158 | * cpu_is_omap1510(): True for OMAP1510 | ||
159 | * cpu_is_omap1610(): True for OMAP1610 | ||
160 | * cpu_is_omap1611(): True for OMAP1611 | ||
161 | * cpu_is_omap5912(): True for OMAP5912 | ||
162 | * cpu_is_omap1621(): True for OMAP1621 | ||
163 | * cpu_is_omap1710(): True for OMAP1710 | ||
164 | */ | ||
165 | #define GET_OMAP_TYPE ((omap_rev() >> 16) & 0xffff) | ||
166 | |||
167 | #define IS_OMAP_TYPE(type, id) \ | ||
168 | static inline int is_omap ##type (void) \ | ||
169 | { \ | ||
170 | return (GET_OMAP_TYPE == (id)) ? 1 : 0; \ | ||
171 | } | ||
172 | |||
173 | IS_OMAP_TYPE(310, 0x0310) | ||
174 | IS_OMAP_TYPE(1510, 0x1510) | ||
175 | IS_OMAP_TYPE(1610, 0x1610) | ||
176 | IS_OMAP_TYPE(1611, 0x1611) | ||
177 | IS_OMAP_TYPE(5912, 0x1611) | ||
178 | IS_OMAP_TYPE(1621, 0x1621) | ||
179 | IS_OMAP_TYPE(1710, 0x1710) | ||
180 | |||
181 | #define cpu_is_omap310() 0 | ||
182 | #define cpu_is_omap1510() 0 | ||
183 | #define cpu_is_omap1610() 0 | ||
184 | #define cpu_is_omap5912() 0 | ||
185 | #define cpu_is_omap1611() 0 | ||
186 | #define cpu_is_omap1621() 0 | ||
187 | #define cpu_is_omap1710() 0 | ||
188 | |||
189 | /* These are needed to compile common code */ | ||
190 | #ifdef CONFIG_ARCH_OMAP1 | ||
191 | #define cpu_is_omap242x() 0 | ||
192 | #define cpu_is_omap2430() 0 | ||
193 | #define cpu_is_omap243x() 0 | ||
194 | #define cpu_is_omap24xx() 0 | ||
195 | #define cpu_is_omap34xx() 0 | ||
196 | #define cpu_is_omap44xx() 0 | ||
197 | #define soc_is_omap54xx() 0 | ||
198 | #define soc_is_am33xx() 0 | ||
199 | #define cpu_class_is_omap1() 1 | ||
200 | #define cpu_class_is_omap2() 0 | ||
201 | #endif | ||
202 | |||
203 | /* | ||
204 | * Whether we have MULTI_OMAP1 or not, we still need to distinguish | ||
205 | * between 310 vs. 1510 and 1611B/5912 vs. 1710. | ||
206 | */ | ||
207 | |||
208 | #if defined(CONFIG_ARCH_OMAP15XX) | ||
209 | # undef cpu_is_omap310 | ||
210 | # undef cpu_is_omap1510 | ||
211 | # define cpu_is_omap310() is_omap310() | ||
212 | # define cpu_is_omap1510() is_omap1510() | ||
213 | #endif | ||
214 | |||
215 | #if defined(CONFIG_ARCH_OMAP16XX) | ||
216 | # undef cpu_is_omap1610 | ||
217 | # undef cpu_is_omap1611 | ||
218 | # undef cpu_is_omap5912 | ||
219 | # undef cpu_is_omap1621 | ||
220 | # undef cpu_is_omap1710 | ||
221 | # define cpu_is_omap1610() is_omap1610() | ||
222 | # define cpu_is_omap1611() is_omap1611() | ||
223 | # define cpu_is_omap5912() is_omap5912() | ||
224 | # define cpu_is_omap1621() is_omap1621() | ||
225 | # define cpu_is_omap1710() is_omap1710() | ||
226 | #endif | ||
227 | |||
228 | #endif /* __ASSEMBLY__ */ | ||
229 | #endif | ||