Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 1 | /* |
| 2 | * arch/arm/plat-omap/include/mach/cpu.h |
| 3 | * |
| 4 | * OMAP cpu type detection |
| 5 | * |
| 6 | * Copyright (C) 2004, 2008 Nokia Corporation |
| 7 | * |
Nishant Kamat | e49c4d2 | 2011-02-17 09:55:03 -0800 | [diff] [blame] | 8 | * Copyright (C) 2009-11 Texas Instruments. |
Santosh Shilimkar | 4416907 | 2009-05-28 14:16:04 -0700 | [diff] [blame] | 9 | * |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 10 | * Written by Tony Lindgren <tony.lindgren@nokia.com> |
| 11 | * |
R Sricharan | b13e80a | 2012-04-19 17:42:19 +0530 | [diff] [blame] | 12 | * Added OMAP4/5 specific defines - Santosh Shilimkar<santosh.shilimkar@ti.com> |
Santosh Shilimkar | 4416907 | 2009-05-28 14:16:04 -0700 | [diff] [blame] | 13 | * |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 14 | * This program is free software; you can redistribute it and/or modify |
| 15 | * it under the terms of the GNU General Public License as published by |
| 16 | * the Free Software Foundation; either version 2 of the License, or |
| 17 | * (at your option) any later version. |
| 18 | * |
| 19 | * This program is distributed in the hope that it will be useful, |
| 20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 22 | * GNU General Public License for more details. |
| 23 | * |
| 24 | * You should have received a copy of the GNU General Public License |
| 25 | * along with this program; if not, write to the Free Software |
| 26 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 27 | * |
| 28 | */ |
| 29 | |
| 30 | #ifndef __ASM_ARCH_OMAP_CPU_H |
| 31 | #define __ASM_ARCH_OMAP_CPU_H |
| 32 | |
Tony Lindgren | dbc0416 | 2012-08-31 10:59:07 -0700 | [diff] [blame] | 33 | #ifndef __ASSEMBLY__ |
| 34 | |
Sanjeev Premi | 8384ce0 | 2009-11-22 10:10:53 -0800 | [diff] [blame] | 35 | #include <linux/bitops.h> |
Tony Lindgren | dc84328 | 2012-10-03 11:23:43 -0700 | [diff] [blame] | 36 | |
| 37 | /* |
| 38 | * Test if multicore OMAP support is needed |
| 39 | */ |
| 40 | #undef MULTI_OMAP1 |
| 41 | #undef MULTI_OMAP2 |
| 42 | #undef OMAP_NAME |
| 43 | |
| 44 | #ifdef CONFIG_ARCH_OMAP730 |
| 45 | # ifdef OMAP_NAME |
| 46 | # undef MULTI_OMAP1 |
| 47 | # define MULTI_OMAP1 |
| 48 | # else |
| 49 | # define OMAP_NAME omap730 |
| 50 | # endif |
| 51 | #endif |
| 52 | #ifdef CONFIG_ARCH_OMAP850 |
| 53 | # ifdef OMAP_NAME |
| 54 | # undef MULTI_OMAP1 |
| 55 | # define MULTI_OMAP1 |
| 56 | # else |
| 57 | # define OMAP_NAME omap850 |
| 58 | # endif |
| 59 | #endif |
| 60 | #ifdef CONFIG_ARCH_OMAP15XX |
| 61 | # ifdef OMAP_NAME |
| 62 | # undef MULTI_OMAP1 |
| 63 | # define MULTI_OMAP1 |
| 64 | # else |
| 65 | # define OMAP_NAME omap1510 |
| 66 | # endif |
| 67 | #endif |
| 68 | #ifdef CONFIG_ARCH_OMAP16XX |
| 69 | # ifdef OMAP_NAME |
| 70 | # undef MULTI_OMAP1 |
| 71 | # define MULTI_OMAP1 |
| 72 | # else |
| 73 | # define OMAP_NAME omap16xx |
| 74 | # endif |
| 75 | #endif |
| 76 | #ifdef CONFIG_ARCH_OMAP2PLUS |
| 77 | # if (defined(OMAP_NAME) || defined(MULTI_OMAP1)) |
| 78 | # error "OMAP1 and OMAP2PLUS can't be selected at the same time" |
| 79 | # endif |
| 80 | #endif |
| 81 | #ifdef CONFIG_SOC_OMAP2420 |
| 82 | # ifdef OMAP_NAME |
| 83 | # undef MULTI_OMAP2 |
| 84 | # define MULTI_OMAP2 |
| 85 | # else |
| 86 | # define OMAP_NAME omap2420 |
| 87 | # endif |
| 88 | #endif |
| 89 | #ifdef CONFIG_SOC_OMAP2430 |
| 90 | # ifdef OMAP_NAME |
| 91 | # undef MULTI_OMAP2 |
| 92 | # define MULTI_OMAP2 |
| 93 | # else |
| 94 | # define OMAP_NAME omap2430 |
| 95 | # endif |
| 96 | #endif |
| 97 | #ifdef CONFIG_ARCH_OMAP3 |
| 98 | # ifdef OMAP_NAME |
| 99 | # undef MULTI_OMAP2 |
| 100 | # define MULTI_OMAP2 |
| 101 | # else |
| 102 | # define OMAP_NAME omap3 |
| 103 | # endif |
| 104 | #endif |
| 105 | #ifdef CONFIG_ARCH_OMAP4 |
| 106 | # ifdef OMAP_NAME |
| 107 | # undef MULTI_OMAP2 |
| 108 | # define MULTI_OMAP2 |
| 109 | # else |
| 110 | # define OMAP_NAME omap4 |
| 111 | # endif |
| 112 | #endif |
| 113 | |
| 114 | #ifdef CONFIG_SOC_OMAP5 |
| 115 | # ifdef OMAP_NAME |
| 116 | # undef MULTI_OMAP2 |
| 117 | # define MULTI_OMAP2 |
| 118 | # else |
| 119 | # define OMAP_NAME omap5 |
| 120 | # endif |
| 121 | #endif |
| 122 | |
| 123 | #ifdef CONFIG_SOC_AM33XX |
| 124 | # ifdef OMAP_NAME |
| 125 | # undef MULTI_OMAP2 |
| 126 | # define MULTI_OMAP2 |
| 127 | # else |
| 128 | # define OMAP_NAME am33xx |
| 129 | # endif |
| 130 | #endif |
Sanjeev Premi | 8384ce0 | 2009-11-22 10:10:53 -0800 | [diff] [blame] | 131 | |
Kevin Hilman | 8e25ad9 | 2009-06-23 13:30:23 +0300 | [diff] [blame] | 132 | /* |
| 133 | * Omap device type i.e. EMU/HS/TST/GP/BAD |
| 134 | */ |
| 135 | #define OMAP2_DEVICE_TYPE_TEST 0 |
| 136 | #define OMAP2_DEVICE_TYPE_EMU 1 |
| 137 | #define OMAP2_DEVICE_TYPE_SEC 2 |
| 138 | #define OMAP2_DEVICE_TYPE_GP 3 |
| 139 | #define OMAP2_DEVICE_TYPE_BAD 4 |
| 140 | |
| 141 | int omap_type(void); |
| 142 | |
Tony Lindgren | a882314 | 2008-12-10 17:36:30 -0800 | [diff] [blame] | 143 | /* |
Lauri Leukkunen | 84a3434 | 2008-12-10 17:36:31 -0800 | [diff] [blame] | 144 | * omap_rev bits: |
Tony Lindgren | a882314 | 2008-12-10 17:36:30 -0800 | [diff] [blame] | 145 | * CPU id bits (0730, 1510, 1710, 2422...) [31:16] |
| 146 | * CPU revision (See _REV_ defined in cpu.h) [15:08] |
| 147 | * CPU class bits (15xx, 16xx, 24xx, 34xx...) [07:00] |
| 148 | */ |
Lauri Leukkunen | 84a3434 | 2008-12-10 17:36:31 -0800 | [diff] [blame] | 149 | unsigned int omap_rev(void); |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 150 | |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 151 | /* |
Sanjeev Premi | 048f4bd | 2009-11-22 10:10:54 -0800 | [diff] [blame] | 152 | * Get the CPU revision for OMAP devices |
| 153 | */ |
| 154 | #define GET_OMAP_REVISION() ((omap_rev() >> 8) & 0xff) |
| 155 | |
| 156 | /* |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 157 | * Macros to group OMAP into cpu classes. |
| 158 | * These can be used in most places. |
Zebediah C. McClure | ae302f4 | 2009-03-23 18:07:39 -0700 | [diff] [blame] | 159 | * cpu_is_omap7xx(): True for OMAP730, OMAP850 |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 160 | * cpu_is_omap15xx(): True for OMAP1510, OMAP5910 and OMAP310 |
| 161 | * cpu_is_omap16xx(): True for OMAP1610, OMAP5912 and OMAP1710 |
| 162 | * cpu_is_omap24xx(): True for OMAP2420, OMAP2422, OMAP2423, OMAP2430 |
| 163 | * cpu_is_omap242x(): True for OMAP2420, OMAP2422, OMAP2423 |
| 164 | * cpu_is_omap243x(): True for OMAP2430 |
| 165 | * cpu_is_omap343x(): True for OMAP3430 |
Abhijit Pagare | c6a6e6e | 2010-01-26 20:12:51 -0700 | [diff] [blame] | 166 | * cpu_is_omap443x(): True for OMAP4430 |
Aneesh V | fa54dcc | 2011-07-02 08:00:21 +0530 | [diff] [blame] | 167 | * cpu_is_omap446x(): True for OMAP4460 |
Leonid Iziumtsev | ec023e4 | 2011-12-13 10:46:44 -0800 | [diff] [blame] | 168 | * cpu_is_omap447x(): True for OMAP4470 |
R Sricharan | b13e80a | 2012-04-19 17:42:19 +0530 | [diff] [blame] | 169 | * soc_is_omap543x(): True for OMAP5430, OMAP5432 |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 170 | */ |
Lauri Leukkunen | 84a3434 | 2008-12-10 17:36:31 -0800 | [diff] [blame] | 171 | #define GET_OMAP_CLASS (omap_rev() & 0xff) |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 172 | |
| 173 | #define IS_OMAP_CLASS(class, id) \ |
| 174 | static inline int is_omap ##class (void) \ |
| 175 | { \ |
| 176 | return (GET_OMAP_CLASS == (id)) ? 1 : 0; \ |
| 177 | } |
| 178 | |
Afzal Mohammed | 9954119 | 2011-12-13 10:46:43 -0800 | [diff] [blame] | 179 | #define GET_AM_CLASS ((omap_rev() >> 24) & 0xff) |
| 180 | |
| 181 | #define IS_AM_CLASS(class, id) \ |
| 182 | static inline int is_am ##class (void) \ |
| 183 | { \ |
| 184 | return (GET_AM_CLASS == (id)) ? 1 : 0; \ |
| 185 | } |
| 186 | |
Hemant Pedanekar | a920360 | 2011-12-13 10:46:44 -0800 | [diff] [blame] | 187 | #define GET_TI_CLASS ((omap_rev() >> 24) & 0xff) |
| 188 | |
| 189 | #define IS_TI_CLASS(class, id) \ |
| 190 | static inline int is_ti ##class (void) \ |
| 191 | { \ |
| 192 | return (GET_TI_CLASS == (id)) ? 1 : 0; \ |
| 193 | } |
| 194 | |
Lauri Leukkunen | 84a3434 | 2008-12-10 17:36:31 -0800 | [diff] [blame] | 195 | #define GET_OMAP_SUBCLASS ((omap_rev() >> 20) & 0x0fff) |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 196 | |
| 197 | #define IS_OMAP_SUBCLASS(subclass, id) \ |
| 198 | static inline int is_omap ##subclass (void) \ |
| 199 | { \ |
| 200 | return (GET_OMAP_SUBCLASS == (id)) ? 1 : 0; \ |
| 201 | } |
| 202 | |
Hemant Pedanekar | 4bd7be2 | 2011-02-16 08:31:39 -0800 | [diff] [blame] | 203 | #define IS_TI_SUBCLASS(subclass, id) \ |
| 204 | static inline int is_ti ##subclass (void) \ |
| 205 | { \ |
| 206 | return (GET_OMAP_SUBCLASS == (id)) ? 1 : 0; \ |
| 207 | } |
| 208 | |
Afzal Mohammed | 9954119 | 2011-12-13 10:46:43 -0800 | [diff] [blame] | 209 | #define IS_AM_SUBCLASS(subclass, id) \ |
| 210 | static inline int is_am ##subclass (void) \ |
| 211 | { \ |
| 212 | return (GET_OMAP_SUBCLASS == (id)) ? 1 : 0; \ |
| 213 | } |
| 214 | |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 215 | IS_OMAP_CLASS(7xx, 0x07) |
| 216 | IS_OMAP_CLASS(15xx, 0x15) |
| 217 | IS_OMAP_CLASS(16xx, 0x16) |
| 218 | IS_OMAP_CLASS(24xx, 0x24) |
| 219 | IS_OMAP_CLASS(34xx, 0x34) |
Santosh Shilimkar | b570e0e | 2009-12-11 16:16:34 -0800 | [diff] [blame] | 220 | IS_OMAP_CLASS(44xx, 0x44) |
Kevin Hilman | 68a88b9 | 2012-04-30 16:37:10 -0700 | [diff] [blame] | 221 | IS_AM_CLASS(35xx, 0x35) |
R Sricharan | b13e80a | 2012-04-19 17:42:19 +0530 | [diff] [blame] | 222 | IS_OMAP_CLASS(54xx, 0x54) |
Afzal Mohammed | 9954119 | 2011-12-13 10:46:43 -0800 | [diff] [blame] | 223 | IS_AM_CLASS(33xx, 0x33) |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 224 | |
Hemant Pedanekar | a920360 | 2011-12-13 10:46:44 -0800 | [diff] [blame] | 225 | IS_TI_CLASS(81xx, 0x81) |
| 226 | |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 227 | IS_OMAP_SUBCLASS(242x, 0x242) |
| 228 | IS_OMAP_SUBCLASS(243x, 0x243) |
| 229 | IS_OMAP_SUBCLASS(343x, 0x343) |
Nishanth Menon | 2456a10 | 2009-11-22 10:10:56 -0800 | [diff] [blame] | 230 | IS_OMAP_SUBCLASS(363x, 0x363) |
Santosh Shilimkar | b570e0e | 2009-12-11 16:16:34 -0800 | [diff] [blame] | 231 | IS_OMAP_SUBCLASS(443x, 0x443) |
Aneesh V | fa54dcc | 2011-07-02 08:00:21 +0530 | [diff] [blame] | 232 | IS_OMAP_SUBCLASS(446x, 0x446) |
Leonid Iziumtsev | ec023e4 | 2011-12-13 10:46:44 -0800 | [diff] [blame] | 233 | IS_OMAP_SUBCLASS(447x, 0x447) |
R Sricharan | b13e80a | 2012-04-19 17:42:19 +0530 | [diff] [blame] | 234 | IS_OMAP_SUBCLASS(543x, 0x543) |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 235 | |
Hemant Pedanekar | 4bd7be2 | 2011-02-16 08:31:39 -0800 | [diff] [blame] | 236 | IS_TI_SUBCLASS(816x, 0x816) |
Hemant Pedanekar | 4390f5b | 2011-12-13 10:46:45 -0800 | [diff] [blame] | 237 | IS_TI_SUBCLASS(814x, 0x814) |
Afzal Mohammed | 9954119 | 2011-12-13 10:46:43 -0800 | [diff] [blame] | 238 | IS_AM_SUBCLASS(335x, 0x335) |
Hemant Pedanekar | 4bd7be2 | 2011-02-16 08:31:39 -0800 | [diff] [blame] | 239 | |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 240 | #define cpu_is_omap7xx() 0 |
| 241 | #define cpu_is_omap15xx() 0 |
| 242 | #define cpu_is_omap16xx() 0 |
| 243 | #define cpu_is_omap24xx() 0 |
| 244 | #define cpu_is_omap242x() 0 |
| 245 | #define cpu_is_omap243x() 0 |
| 246 | #define cpu_is_omap34xx() 0 |
| 247 | #define cpu_is_omap343x() 0 |
Hemant Pedanekar | a920360 | 2011-12-13 10:46:44 -0800 | [diff] [blame] | 248 | #define cpu_is_ti81xx() 0 |
Hemant Pedanekar | 4bd7be2 | 2011-02-16 08:31:39 -0800 | [diff] [blame] | 249 | #define cpu_is_ti816x() 0 |
Hemant Pedanekar | 4390f5b | 2011-12-13 10:46:45 -0800 | [diff] [blame] | 250 | #define cpu_is_ti814x() 0 |
Kevin Hilman | 68a88b9 | 2012-04-30 16:37:10 -0700 | [diff] [blame] | 251 | #define soc_is_am35xx() 0 |
Vaibhav Hiremath | 971b8a9 | 2012-07-05 08:05:15 -0700 | [diff] [blame] | 252 | #define soc_is_am33xx() 0 |
| 253 | #define soc_is_am335x() 0 |
Santosh Shilimkar | 4416907 | 2009-05-28 14:16:04 -0700 | [diff] [blame] | 254 | #define cpu_is_omap44xx() 0 |
| 255 | #define cpu_is_omap443x() 0 |
Aneesh V | fa54dcc | 2011-07-02 08:00:21 +0530 | [diff] [blame] | 256 | #define cpu_is_omap446x() 0 |
Leonid Iziumtsev | ec023e4 | 2011-12-13 10:46:44 -0800 | [diff] [blame] | 257 | #define cpu_is_omap447x() 0 |
R Sricharan | b13e80a | 2012-04-19 17:42:19 +0530 | [diff] [blame] | 258 | #define soc_is_omap54xx() 0 |
| 259 | #define soc_is_omap543x() 0 |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 260 | |
| 261 | #if defined(MULTI_OMAP1) |
| 262 | # if defined(CONFIG_ARCH_OMAP730) |
| 263 | # undef cpu_is_omap7xx |
| 264 | # define cpu_is_omap7xx() is_omap7xx() |
| 265 | # endif |
Zebediah C. McClure | ae302f4 | 2009-03-23 18:07:39 -0700 | [diff] [blame] | 266 | # if defined(CONFIG_ARCH_OMAP850) |
| 267 | # undef cpu_is_omap7xx |
| 268 | # define cpu_is_omap7xx() is_omap7xx() |
| 269 | # endif |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 270 | # if defined(CONFIG_ARCH_OMAP15XX) |
| 271 | # undef cpu_is_omap15xx |
| 272 | # define cpu_is_omap15xx() is_omap15xx() |
| 273 | # endif |
| 274 | # if defined(CONFIG_ARCH_OMAP16XX) |
| 275 | # undef cpu_is_omap16xx |
| 276 | # define cpu_is_omap16xx() is_omap16xx() |
| 277 | # endif |
| 278 | #else |
| 279 | # if defined(CONFIG_ARCH_OMAP730) |
| 280 | # undef cpu_is_omap7xx |
| 281 | # define cpu_is_omap7xx() 1 |
| 282 | # endif |
Zebediah C. McClure | ae302f4 | 2009-03-23 18:07:39 -0700 | [diff] [blame] | 283 | # if defined(CONFIG_ARCH_OMAP850) |
| 284 | # undef cpu_is_omap7xx |
| 285 | # define cpu_is_omap7xx() 1 |
| 286 | # endif |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 287 | # if defined(CONFIG_ARCH_OMAP15XX) |
| 288 | # undef cpu_is_omap15xx |
| 289 | # define cpu_is_omap15xx() 1 |
| 290 | # endif |
| 291 | # if defined(CONFIG_ARCH_OMAP16XX) |
| 292 | # undef cpu_is_omap16xx |
| 293 | # define cpu_is_omap16xx() 1 |
| 294 | # endif |
| 295 | #endif |
| 296 | |
| 297 | #if defined(MULTI_OMAP2) |
Tony Lindgren | 088ef95 | 2010-02-12 12:26:47 -0800 | [diff] [blame] | 298 | # if defined(CONFIG_ARCH_OMAP2) |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 299 | # undef cpu_is_omap24xx |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 300 | # define cpu_is_omap24xx() is_omap24xx() |
Kevin Hilman | 54c44fb | 2010-03-10 17:16:30 +0000 | [diff] [blame] | 301 | # endif |
Tony Lindgren | 59b479e | 2011-01-27 16:39:40 -0800 | [diff] [blame] | 302 | # if defined (CONFIG_SOC_OMAP2420) |
Kevin Hilman | 54c44fb | 2010-03-10 17:16:30 +0000 | [diff] [blame] | 303 | # undef cpu_is_omap242x |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 304 | # define cpu_is_omap242x() is_omap242x() |
Kevin Hilman | 54c44fb | 2010-03-10 17:16:30 +0000 | [diff] [blame] | 305 | # endif |
Tony Lindgren | 59b479e | 2011-01-27 16:39:40 -0800 | [diff] [blame] | 306 | # if defined (CONFIG_SOC_OMAP2430) |
Kevin Hilman | 54c44fb | 2010-03-10 17:16:30 +0000 | [diff] [blame] | 307 | # undef cpu_is_omap243x |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 308 | # define cpu_is_omap243x() is_omap243x() |
| 309 | # endif |
Tony Lindgren | a8eb7ca | 2010-02-12 12:26:48 -0800 | [diff] [blame] | 310 | # if defined(CONFIG_ARCH_OMAP3) |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 311 | # undef cpu_is_omap34xx |
| 312 | # undef cpu_is_omap343x |
| 313 | # define cpu_is_omap34xx() is_omap34xx() |
| 314 | # define cpu_is_omap343x() is_omap343x() |
| 315 | # endif |
| 316 | #else |
Tony Lindgren | 088ef95 | 2010-02-12 12:26:47 -0800 | [diff] [blame] | 317 | # if defined(CONFIG_ARCH_OMAP2) |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 318 | # undef cpu_is_omap24xx |
| 319 | # define cpu_is_omap24xx() 1 |
| 320 | # endif |
Tony Lindgren | 59b479e | 2011-01-27 16:39:40 -0800 | [diff] [blame] | 321 | # if defined(CONFIG_SOC_OMAP2420) |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 322 | # undef cpu_is_omap242x |
| 323 | # define cpu_is_omap242x() 1 |
| 324 | # endif |
Tony Lindgren | 59b479e | 2011-01-27 16:39:40 -0800 | [diff] [blame] | 325 | # if defined(CONFIG_SOC_OMAP2430) |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 326 | # undef cpu_is_omap243x |
| 327 | # define cpu_is_omap243x() 1 |
| 328 | # endif |
Tony Lindgren | a8eb7ca | 2010-02-12 12:26:48 -0800 | [diff] [blame] | 329 | # if defined(CONFIG_ARCH_OMAP3) |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 330 | # undef cpu_is_omap34xx |
| 331 | # define cpu_is_omap34xx() 1 |
| 332 | # endif |
Tony Lindgren | 59b479e | 2011-01-27 16:39:40 -0800 | [diff] [blame] | 333 | # if defined(CONFIG_SOC_OMAP3430) |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 334 | # undef cpu_is_omap343x |
| 335 | # define cpu_is_omap343x() 1 |
| 336 | # endif |
| 337 | #endif |
| 338 | |
| 339 | /* |
| 340 | * Macros to detect individual cpu types. |
| 341 | * These are only rarely needed. |
Paul Bolle | d2ba779 | 2012-06-26 23:12:47 +0200 | [diff] [blame] | 342 | * cpu_is_omap310(): True for OMAP310 |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 343 | * cpu_is_omap1510(): True for OMAP1510 |
| 344 | * cpu_is_omap1610(): True for OMAP1610 |
| 345 | * cpu_is_omap1611(): True for OMAP1611 |
| 346 | * cpu_is_omap5912(): True for OMAP5912 |
| 347 | * cpu_is_omap1621(): True for OMAP1621 |
| 348 | * cpu_is_omap1710(): True for OMAP1710 |
| 349 | * cpu_is_omap2420(): True for OMAP2420 |
| 350 | * cpu_is_omap2422(): True for OMAP2422 |
| 351 | * cpu_is_omap2423(): True for OMAP2423 |
| 352 | * cpu_is_omap2430(): True for OMAP2430 |
| 353 | * cpu_is_omap3430(): True for OMAP3430 |
| 354 | */ |
Lauri Leukkunen | 84a3434 | 2008-12-10 17:36:31 -0800 | [diff] [blame] | 355 | #define GET_OMAP_TYPE ((omap_rev() >> 16) & 0xffff) |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 356 | |
| 357 | #define IS_OMAP_TYPE(type, id) \ |
| 358 | static inline int is_omap ##type (void) \ |
| 359 | { \ |
| 360 | return (GET_OMAP_TYPE == (id)) ? 1 : 0; \ |
| 361 | } |
| 362 | |
| 363 | IS_OMAP_TYPE(310, 0x0310) |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 364 | IS_OMAP_TYPE(1510, 0x1510) |
| 365 | IS_OMAP_TYPE(1610, 0x1610) |
| 366 | IS_OMAP_TYPE(1611, 0x1611) |
| 367 | IS_OMAP_TYPE(5912, 0x1611) |
| 368 | IS_OMAP_TYPE(1621, 0x1621) |
| 369 | IS_OMAP_TYPE(1710, 0x1710) |
| 370 | IS_OMAP_TYPE(2420, 0x2420) |
| 371 | IS_OMAP_TYPE(2422, 0x2422) |
| 372 | IS_OMAP_TYPE(2423, 0x2423) |
| 373 | IS_OMAP_TYPE(2430, 0x2430) |
| 374 | IS_OMAP_TYPE(3430, 0x3430) |
| 375 | |
| 376 | #define cpu_is_omap310() 0 |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 377 | #define cpu_is_omap1510() 0 |
| 378 | #define cpu_is_omap1610() 0 |
| 379 | #define cpu_is_omap5912() 0 |
| 380 | #define cpu_is_omap1611() 0 |
| 381 | #define cpu_is_omap1621() 0 |
| 382 | #define cpu_is_omap1710() 0 |
| 383 | #define cpu_is_omap2420() 0 |
| 384 | #define cpu_is_omap2422() 0 |
| 385 | #define cpu_is_omap2423() 0 |
| 386 | #define cpu_is_omap2430() 0 |
| 387 | #define cpu_is_omap3430() 0 |
Nishanth Menon | 2456a10 | 2009-11-22 10:10:56 -0800 | [diff] [blame] | 388 | #define cpu_is_omap3630() 0 |
R Sricharan | b13e80a | 2012-04-19 17:42:19 +0530 | [diff] [blame] | 389 | #define soc_is_omap5430() 0 |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 390 | |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 391 | /* |
| 392 | * Whether we have MULTI_OMAP1 or not, we still need to distinguish |
Paul Bolle | 0fb3784 | 2012-06-26 23:13:29 +0200 | [diff] [blame] | 393 | * between 310 vs. 1510 and 1611B/5912 vs. 1710. |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 394 | */ |
Tony Lindgren | a9f82d1 | 2009-10-05 13:31:43 -0700 | [diff] [blame] | 395 | |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 396 | #if defined(CONFIG_ARCH_OMAP15XX) |
| 397 | # undef cpu_is_omap310 |
| 398 | # undef cpu_is_omap1510 |
| 399 | # define cpu_is_omap310() is_omap310() |
| 400 | # define cpu_is_omap1510() is_omap1510() |
| 401 | #endif |
| 402 | |
| 403 | #if defined(CONFIG_ARCH_OMAP16XX) |
| 404 | # undef cpu_is_omap1610 |
| 405 | # undef cpu_is_omap1611 |
| 406 | # undef cpu_is_omap5912 |
| 407 | # undef cpu_is_omap1621 |
| 408 | # undef cpu_is_omap1710 |
| 409 | # define cpu_is_omap1610() is_omap1610() |
| 410 | # define cpu_is_omap1611() is_omap1611() |
| 411 | # define cpu_is_omap5912() is_omap5912() |
| 412 | # define cpu_is_omap1621() is_omap1621() |
| 413 | # define cpu_is_omap1710() is_omap1710() |
| 414 | #endif |
| 415 | |
Tony Lindgren | 088ef95 | 2010-02-12 12:26:47 -0800 | [diff] [blame] | 416 | #if defined(CONFIG_ARCH_OMAP2) |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 417 | # undef cpu_is_omap2420 |
| 418 | # undef cpu_is_omap2422 |
| 419 | # undef cpu_is_omap2423 |
| 420 | # undef cpu_is_omap2430 |
| 421 | # define cpu_is_omap2420() is_omap2420() |
| 422 | # define cpu_is_omap2422() is_omap2422() |
| 423 | # define cpu_is_omap2423() is_omap2423() |
| 424 | # define cpu_is_omap2430() is_omap2430() |
| 425 | #endif |
| 426 | |
Tony Lindgren | a8eb7ca | 2010-02-12 12:26:48 -0800 | [diff] [blame] | 427 | #if defined(CONFIG_ARCH_OMAP3) |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 428 | # undef cpu_is_omap3430 |
Hemant Pedanekar | a920360 | 2011-12-13 10:46:44 -0800 | [diff] [blame] | 429 | # undef cpu_is_ti81xx |
Hemant Pedanekar | 4bd7be2 | 2011-02-16 08:31:39 -0800 | [diff] [blame] | 430 | # undef cpu_is_ti816x |
Hemant Pedanekar | 4390f5b | 2011-12-13 10:46:45 -0800 | [diff] [blame] | 431 | # undef cpu_is_ti814x |
Kevin Hilman | 68a88b9 | 2012-04-30 16:37:10 -0700 | [diff] [blame] | 432 | # undef soc_is_am35xx |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 433 | # define cpu_is_omap3430() is_omap3430() |
Nishanth Menon | 2456a10 | 2009-11-22 10:10:56 -0800 | [diff] [blame] | 434 | # undef cpu_is_omap3630 |
| 435 | # define cpu_is_omap3630() is_omap363x() |
Hemant Pedanekar | a920360 | 2011-12-13 10:46:44 -0800 | [diff] [blame] | 436 | # define cpu_is_ti81xx() is_ti81xx() |
Hemant Pedanekar | 4bd7be2 | 2011-02-16 08:31:39 -0800 | [diff] [blame] | 437 | # define cpu_is_ti816x() is_ti816x() |
Hemant Pedanekar | 4390f5b | 2011-12-13 10:46:45 -0800 | [diff] [blame] | 438 | # define cpu_is_ti814x() is_ti814x() |
Kevin Hilman | 68a88b9 | 2012-04-30 16:37:10 -0700 | [diff] [blame] | 439 | # define soc_is_am35xx() is_am35xx() |
Vaibhav Hiremath | 1c213ba | 2012-07-05 08:05:15 -0700 | [diff] [blame] | 440 | #endif |
| 441 | |
| 442 | # if defined(CONFIG_SOC_AM33XX) |
Vaibhav Hiremath | 971b8a9 | 2012-07-05 08:05:15 -0700 | [diff] [blame] | 443 | # undef soc_is_am33xx |
| 444 | # undef soc_is_am335x |
| 445 | # define soc_is_am33xx() is_am33xx() |
| 446 | # define soc_is_am335x() is_am335x() |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 447 | #endif |
| 448 | |
Santosh Shilimkar | 4416907 | 2009-05-28 14:16:04 -0700 | [diff] [blame] | 449 | # if defined(CONFIG_ARCH_OMAP4) |
| 450 | # undef cpu_is_omap44xx |
| 451 | # undef cpu_is_omap443x |
Aneesh V | fa54dcc | 2011-07-02 08:00:21 +0530 | [diff] [blame] | 452 | # undef cpu_is_omap446x |
Leonid Iziumtsev | ec023e4 | 2011-12-13 10:46:44 -0800 | [diff] [blame] | 453 | # undef cpu_is_omap447x |
Santosh Shilimkar | b570e0e | 2009-12-11 16:16:34 -0800 | [diff] [blame] | 454 | # define cpu_is_omap44xx() is_omap44xx() |
| 455 | # define cpu_is_omap443x() is_omap443x() |
Aneesh V | fa54dcc | 2011-07-02 08:00:21 +0530 | [diff] [blame] | 456 | # define cpu_is_omap446x() is_omap446x() |
Leonid Iziumtsev | ec023e4 | 2011-12-13 10:46:44 -0800 | [diff] [blame] | 457 | # define cpu_is_omap447x() is_omap447x() |
Santosh Shilimkar | 4416907 | 2009-05-28 14:16:04 -0700 | [diff] [blame] | 458 | # endif |
| 459 | |
R Sricharan | b13e80a | 2012-04-19 17:42:19 +0530 | [diff] [blame] | 460 | # if defined(CONFIG_SOC_OMAP5) |
| 461 | # undef soc_is_omap54xx |
| 462 | # undef soc_is_omap543x |
| 463 | # define soc_is_omap54xx() is_omap54xx() |
| 464 | # define soc_is_omap543x() is_omap543x() |
| 465 | #endif |
| 466 | |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 467 | /* Macros to detect if we have OMAP1 or OMAP2 */ |
Zebediah C. McClure | ae302f4 | 2009-03-23 18:07:39 -0700 | [diff] [blame] | 468 | #define cpu_class_is_omap1() (cpu_is_omap7xx() || cpu_is_omap15xx() || \ |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 469 | cpu_is_omap16xx()) |
Santosh Shilimkar | 4416907 | 2009-05-28 14:16:04 -0700 | [diff] [blame] | 470 | #define cpu_class_is_omap2() (cpu_is_omap24xx() || cpu_is_omap34xx() || \ |
Vaibhav Hiremath | 90f7f9a | 2012-08-07 19:44:01 +0530 | [diff] [blame] | 471 | cpu_is_omap44xx() || soc_is_omap54xx() || \ |
| 472 | soc_is_am33xx()) |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 473 | |
Tony Lindgren | a882314 | 2008-12-10 17:36:30 -0800 | [diff] [blame] | 474 | /* Various silicon revisions for omap2 */ |
| 475 | #define OMAP242X_CLASS 0x24200024 |
Sanjeev Premi | 76abab2 | 2010-10-01 16:35:24 -0700 | [diff] [blame] | 476 | #define OMAP2420_REV_ES1_0 OMAP242X_CLASS |
Paul Walmsley | 057673d | 2011-09-13 19:52:15 -0600 | [diff] [blame] | 477 | #define OMAP2420_REV_ES2_0 (OMAP242X_CLASS | (0x1 << 8)) |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 478 | |
Tony Lindgren | a882314 | 2008-12-10 17:36:30 -0800 | [diff] [blame] | 479 | #define OMAP243X_CLASS 0x24300024 |
Sanjeev Premi | 76abab2 | 2010-10-01 16:35:24 -0700 | [diff] [blame] | 480 | #define OMAP2430_REV_ES1_0 OMAP243X_CLASS |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 481 | |
Tony Lindgren | a882314 | 2008-12-10 17:36:30 -0800 | [diff] [blame] | 482 | #define OMAP343X_CLASS 0x34300034 |
Sanjeev Premi | 76abab2 | 2010-10-01 16:35:24 -0700 | [diff] [blame] | 483 | #define OMAP3430_REV_ES1_0 OMAP343X_CLASS |
Paul Walmsley | 057673d | 2011-09-13 19:52:15 -0600 | [diff] [blame] | 484 | #define OMAP3430_REV_ES2_0 (OMAP343X_CLASS | (0x1 << 8)) |
| 485 | #define OMAP3430_REV_ES2_1 (OMAP343X_CLASS | (0x2 << 8)) |
| 486 | #define OMAP3430_REV_ES3_0 (OMAP343X_CLASS | (0x3 << 8)) |
| 487 | #define OMAP3430_REV_ES3_1 (OMAP343X_CLASS | (0x4 << 8)) |
| 488 | #define OMAP3430_REV_ES3_1_2 (OMAP343X_CLASS | (0x5 << 8)) |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 489 | |
Sanjeev Premi | 76abab2 | 2010-10-01 16:35:24 -0700 | [diff] [blame] | 490 | #define OMAP363X_CLASS 0x36300034 |
| 491 | #define OMAP3630_REV_ES1_0 OMAP363X_CLASS |
Paul Walmsley | 057673d | 2011-09-13 19:52:15 -0600 | [diff] [blame] | 492 | #define OMAP3630_REV_ES1_1 (OMAP363X_CLASS | (0x1 << 8)) |
| 493 | #define OMAP3630_REV_ES1_2 (OMAP363X_CLASS | (0x2 << 8)) |
Nishanth Menon | 2456a10 | 2009-11-22 10:10:56 -0800 | [diff] [blame] | 494 | |
Hemant Pedanekar | 4bd7be2 | 2011-02-16 08:31:39 -0800 | [diff] [blame] | 495 | #define TI816X_CLASS 0x81600034 |
| 496 | #define TI8168_REV_ES1_0 TI816X_CLASS |
Paul Walmsley | 057673d | 2011-09-13 19:52:15 -0600 | [diff] [blame] | 497 | #define TI8168_REV_ES1_1 (TI816X_CLASS | (0x1 << 8)) |
Hemant Pedanekar | 4bd7be2 | 2011-02-16 08:31:39 -0800 | [diff] [blame] | 498 | |
Hemant Pedanekar | 4390f5b | 2011-12-13 10:46:45 -0800 | [diff] [blame] | 499 | #define TI814X_CLASS 0x81400034 |
| 500 | #define TI8148_REV_ES1_0 TI814X_CLASS |
| 501 | #define TI8148_REV_ES2_0 (TI814X_CLASS | (0x1 << 8)) |
| 502 | #define TI8148_REV_ES2_1 (TI814X_CLASS | (0x2 << 8)) |
| 503 | |
Kevin Hilman | 68a88b9 | 2012-04-30 16:37:10 -0700 | [diff] [blame] | 504 | #define AM35XX_CLASS 0x35170034 |
| 505 | #define AM35XX_REV_ES1_0 AM35XX_CLASS |
| 506 | #define AM35XX_REV_ES1_1 (AM35XX_CLASS | (0x1 << 8)) |
| 507 | |
Vaibhav Hiremath | 1c213ba | 2012-07-05 08:05:15 -0700 | [diff] [blame] | 508 | #define AM335X_CLASS 0x33500033 |
Afzal Mohammed | 9954119 | 2011-12-13 10:46:43 -0800 | [diff] [blame] | 509 | #define AM335X_REV_ES1_0 AM335X_CLASS |
| 510 | |
Santosh Shilimkar | b570e0e | 2009-12-11 16:16:34 -0800 | [diff] [blame] | 511 | #define OMAP443X_CLASS 0x44300044 |
Nishant Kamat | e49c4d2 | 2011-02-17 09:55:03 -0800 | [diff] [blame] | 512 | #define OMAP4430_REV_ES1_0 (OMAP443X_CLASS | (0x10 << 8)) |
| 513 | #define OMAP4430_REV_ES2_0 (OMAP443X_CLASS | (0x20 << 8)) |
| 514 | #define OMAP4430_REV_ES2_1 (OMAP443X_CLASS | (0x21 << 8)) |
| 515 | #define OMAP4430_REV_ES2_2 (OMAP443X_CLASS | (0x22 << 8)) |
David Anders | 55035c1 | 2011-12-13 10:46:44 -0800 | [diff] [blame] | 516 | #define OMAP4430_REV_ES2_3 (OMAP443X_CLASS | (0x23 << 8)) |
Santosh Shilimkar | 4416907 | 2009-05-28 14:16:04 -0700 | [diff] [blame] | 517 | |
Aneesh V | fa54dcc | 2011-07-02 08:00:21 +0530 | [diff] [blame] | 518 | #define OMAP446X_CLASS 0x44600044 |
| 519 | #define OMAP4460_REV_ES1_0 (OMAP446X_CLASS | (0x10 << 8)) |
Chris Lalancette | 33ee0db | 2012-05-09 09:45:02 -0700 | [diff] [blame] | 520 | #define OMAP4460_REV_ES1_1 (OMAP446X_CLASS | (0x11 << 8)) |
Aneesh V | fa54dcc | 2011-07-02 08:00:21 +0530 | [diff] [blame] | 521 | |
Leonid Iziumtsev | ec023e4 | 2011-12-13 10:46:44 -0800 | [diff] [blame] | 522 | #define OMAP447X_CLASS 0x44700044 |
| 523 | #define OMAP4470_REV_ES1_0 (OMAP447X_CLASS | (0x10 << 8)) |
| 524 | |
R Sricharan | b13e80a | 2012-04-19 17:42:19 +0530 | [diff] [blame] | 525 | #define OMAP54XX_CLASS 0x54000054 |
| 526 | #define OMAP5430_REV_ES1_0 (OMAP54XX_CLASS | (0x30 << 16) | (0x10 << 8)) |
| 527 | #define OMAP5432_REV_ES1_0 (OMAP54XX_CLASS | (0x32 << 16) | (0x10 << 8)) |
| 528 | |
Vaibhav Hiremath | 4de34f3 | 2011-12-19 15:50:15 +0530 | [diff] [blame] | 529 | void omap2xxx_check_revision(void); |
| 530 | void omap3xxx_check_revision(void); |
| 531 | void omap4xxx_check_revision(void); |
R Sricharan | b13e80a | 2012-04-19 17:42:19 +0530 | [diff] [blame] | 532 | void omap5xxx_check_revision(void); |
Vaibhav Hiremath | 4de34f3 | 2011-12-19 15:50:15 +0530 | [diff] [blame] | 533 | void omap3xxx_check_features(void); |
| 534 | void ti81xx_check_features(void); |
| 535 | void omap4xxx_check_features(void); |
Tony Lindgren | a9f82d1 | 2009-10-05 13:31:43 -0700 | [diff] [blame] | 536 | |
Sanjeev Premi | 8384ce0 | 2009-11-22 10:10:53 -0800 | [diff] [blame] | 537 | /* |
| 538 | * Runtime detection of OMAP3 features |
Paul Walmsley | b02b917 | 2011-10-06 17:18:45 -0600 | [diff] [blame] | 539 | * |
| 540 | * OMAP3_HAS_IO_CHAIN_CTRL: Some later members of the OMAP3 chip |
| 541 | * family have OS-level control over the I/O chain clock. This is |
| 542 | * to avoid a window during which wakeups could potentially be lost |
| 543 | * during powerdomain transitions. If this bit is set, it |
| 544 | * indicates that the chip does support OS-level control of this |
| 545 | * feature. |
Sanjeev Premi | 8384ce0 | 2009-11-22 10:10:53 -0800 | [diff] [blame] | 546 | */ |
Aneesh V | cc0170b | 2011-07-02 08:00:22 +0530 | [diff] [blame] | 547 | extern u32 omap_features; |
Sanjeev Premi | 8384ce0 | 2009-11-22 10:10:53 -0800 | [diff] [blame] | 548 | |
| 549 | #define OMAP3_HAS_L2CACHE BIT(0) |
| 550 | #define OMAP3_HAS_IVA BIT(1) |
| 551 | #define OMAP3_HAS_SGX BIT(2) |
| 552 | #define OMAP3_HAS_NEON BIT(3) |
| 553 | #define OMAP3_HAS_ISP BIT(4) |
Vishwanath BS | 7356f0b | 2010-02-22 22:09:10 -0700 | [diff] [blame] | 554 | #define OMAP3_HAS_192MHZ_CLK BIT(5) |
stanley.miao | ad0c63f | 2010-08-02 14:21:40 +0300 | [diff] [blame] | 555 | #define OMAP3_HAS_IO_WAKEUP BIT(6) |
Hemant Pedanekar | 4bd7be2 | 2011-02-16 08:31:39 -0800 | [diff] [blame] | 556 | #define OMAP3_HAS_SDRC BIT(7) |
Paul Walmsley | b02b917 | 2011-10-06 17:18:45 -0600 | [diff] [blame] | 557 | #define OMAP3_HAS_IO_CHAIN_CTRL BIT(8) |
| 558 | #define OMAP4_HAS_MPU_1GHZ BIT(9) |
| 559 | #define OMAP4_HAS_MPU_1_2GHZ BIT(10) |
| 560 | #define OMAP4_HAS_MPU_1_5GHZ BIT(11) |
Aneesh V | cc0170b | 2011-07-02 08:00:22 +0530 | [diff] [blame] | 561 | |
Sanjeev Premi | 8384ce0 | 2009-11-22 10:10:53 -0800 | [diff] [blame] | 562 | |
| 563 | #define OMAP3_HAS_FEATURE(feat,flag) \ |
| 564 | static inline unsigned int omap3_has_ ##feat(void) \ |
| 565 | { \ |
Aneesh V | cc0170b | 2011-07-02 08:00:22 +0530 | [diff] [blame] | 566 | return omap_features & OMAP3_HAS_ ##flag; \ |
Sanjeev Premi | 8384ce0 | 2009-11-22 10:10:53 -0800 | [diff] [blame] | 567 | } \ |
| 568 | |
| 569 | OMAP3_HAS_FEATURE(l2cache, L2CACHE) |
| 570 | OMAP3_HAS_FEATURE(sgx, SGX) |
| 571 | OMAP3_HAS_FEATURE(iva, IVA) |
| 572 | OMAP3_HAS_FEATURE(neon, NEON) |
| 573 | OMAP3_HAS_FEATURE(isp, ISP) |
Vishwanath BS | 7356f0b | 2010-02-22 22:09:10 -0700 | [diff] [blame] | 574 | OMAP3_HAS_FEATURE(192mhz_clk, 192MHZ_CLK) |
stanley.miao | ad0c63f | 2010-08-02 14:21:40 +0300 | [diff] [blame] | 575 | OMAP3_HAS_FEATURE(io_wakeup, IO_WAKEUP) |
Hemant Pedanekar | 4bd7be2 | 2011-02-16 08:31:39 -0800 | [diff] [blame] | 576 | OMAP3_HAS_FEATURE(sdrc, SDRC) |
Paul Walmsley | b02b917 | 2011-10-06 17:18:45 -0600 | [diff] [blame] | 577 | OMAP3_HAS_FEATURE(io_chain_ctrl, IO_CHAIN_CTRL) |
Sanjeev Premi | 8384ce0 | 2009-11-22 10:10:53 -0800 | [diff] [blame] | 578 | |
Aneesh V | cc0170b | 2011-07-02 08:00:22 +0530 | [diff] [blame] | 579 | /* |
| 580 | * Runtime detection of OMAP4 features |
| 581 | */ |
Aneesh V | cc0170b | 2011-07-02 08:00:22 +0530 | [diff] [blame] | 582 | #define OMAP4_HAS_FEATURE(feat, flag) \ |
| 583 | static inline unsigned int omap4_has_ ##feat(void) \ |
| 584 | { \ |
| 585 | return omap_features & OMAP4_HAS_ ##flag; \ |
| 586 | } \ |
| 587 | |
| 588 | OMAP4_HAS_FEATURE(mpu_1ghz, MPU_1GHZ) |
| 589 | OMAP4_HAS_FEATURE(mpu_1_2ghz, MPU_1_2GHZ) |
| 590 | OMAP4_HAS_FEATURE(mpu_1_5ghz, MPU_1_5GHZ) |
| 591 | |
Tony Lindgren | dbc0416 | 2012-08-31 10:59:07 -0700 | [diff] [blame] | 592 | #endif /* __ASSEMBLY__ */ |
Tony Lindgren | a9f82d1 | 2009-10-05 13:31:43 -0700 | [diff] [blame] | 593 | #endif |