cpu.h 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515
  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. *
  8. * Copyright (C) 2009-11 Texas Instruments.
  9. *
  10. * Written by Tony Lindgren <tony.lindgren@nokia.com>
  11. *
  12. * Added OMAP4 specific defines - Santosh Shilimkar<santosh.shilimkar@ti.com>
  13. *
  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. #ifndef __ASM_ARCH_OMAP_CPU_H
  30. #define __ASM_ARCH_OMAP_CPU_H
  31. #include <linux/bitops.h>
  32. #include <plat/multi.h>
  33. /*
  34. * Omap device type i.e. EMU/HS/TST/GP/BAD
  35. */
  36. #define OMAP2_DEVICE_TYPE_TEST 0
  37. #define OMAP2_DEVICE_TYPE_EMU 1
  38. #define OMAP2_DEVICE_TYPE_SEC 2
  39. #define OMAP2_DEVICE_TYPE_GP 3
  40. #define OMAP2_DEVICE_TYPE_BAD 4
  41. int omap_type(void);
  42. /*
  43. * omap_rev bits:
  44. * CPU id bits (0730, 1510, 1710, 2422...) [31:16]
  45. * CPU revision (See _REV_ defined in cpu.h) [15:08]
  46. * CPU class bits (15xx, 16xx, 24xx, 34xx...) [07:00]
  47. */
  48. unsigned int omap_rev(void);
  49. /*
  50. * Get the CPU revision for OMAP devices
  51. */
  52. #define GET_OMAP_REVISION() ((omap_rev() >> 8) & 0xff)
  53. /*
  54. * Macros to group OMAP into cpu classes.
  55. * These can be used in most places.
  56. * cpu_is_omap7xx(): True for OMAP730, OMAP850
  57. * cpu_is_omap15xx(): True for OMAP1510, OMAP5910 and OMAP310
  58. * cpu_is_omap16xx(): True for OMAP1610, OMAP5912 and OMAP1710
  59. * cpu_is_omap24xx(): True for OMAP2420, OMAP2422, OMAP2423, OMAP2430
  60. * cpu_is_omap242x(): True for OMAP2420, OMAP2422, OMAP2423
  61. * cpu_is_omap243x(): True for OMAP2430
  62. * cpu_is_omap343x(): True for OMAP3430
  63. * cpu_is_omap443x(): True for OMAP4430
  64. * cpu_is_omap446x(): True for OMAP4460
  65. * cpu_is_omap447x(): True for OMAP4470
  66. */
  67. #define GET_OMAP_CLASS (omap_rev() & 0xff)
  68. #define IS_OMAP_CLASS(class, id) \
  69. static inline int is_omap ##class (void) \
  70. { \
  71. return (GET_OMAP_CLASS == (id)) ? 1 : 0; \
  72. }
  73. #define GET_AM_CLASS ((omap_rev() >> 24) & 0xff)
  74. #define IS_AM_CLASS(class, id) \
  75. static inline int is_am ##class (void) \
  76. { \
  77. return (GET_AM_CLASS == (id)) ? 1 : 0; \
  78. }
  79. #define GET_TI_CLASS ((omap_rev() >> 24) & 0xff)
  80. #define IS_TI_CLASS(class, id) \
  81. static inline int is_ti ##class (void) \
  82. { \
  83. return (GET_TI_CLASS == (id)) ? 1 : 0; \
  84. }
  85. #define GET_OMAP_SUBCLASS ((omap_rev() >> 20) & 0x0fff)
  86. #define IS_OMAP_SUBCLASS(subclass, id) \
  87. static inline int is_omap ##subclass (void) \
  88. { \
  89. return (GET_OMAP_SUBCLASS == (id)) ? 1 : 0; \
  90. }
  91. #define IS_TI_SUBCLASS(subclass, id) \
  92. static inline int is_ti ##subclass (void) \
  93. { \
  94. return (GET_OMAP_SUBCLASS == (id)) ? 1 : 0; \
  95. }
  96. #define IS_AM_SUBCLASS(subclass, id) \
  97. static inline int is_am ##subclass (void) \
  98. { \
  99. return (GET_OMAP_SUBCLASS == (id)) ? 1 : 0; \
  100. }
  101. IS_OMAP_CLASS(7xx, 0x07)
  102. IS_OMAP_CLASS(15xx, 0x15)
  103. IS_OMAP_CLASS(16xx, 0x16)
  104. IS_OMAP_CLASS(24xx, 0x24)
  105. IS_OMAP_CLASS(34xx, 0x34)
  106. IS_OMAP_CLASS(44xx, 0x44)
  107. IS_AM_CLASS(33xx, 0x33)
  108. IS_TI_CLASS(81xx, 0x81)
  109. IS_OMAP_SUBCLASS(242x, 0x242)
  110. IS_OMAP_SUBCLASS(243x, 0x243)
  111. IS_OMAP_SUBCLASS(343x, 0x343)
  112. IS_OMAP_SUBCLASS(363x, 0x363)
  113. IS_OMAP_SUBCLASS(443x, 0x443)
  114. IS_OMAP_SUBCLASS(446x, 0x446)
  115. IS_OMAP_SUBCLASS(447x, 0x447)
  116. IS_TI_SUBCLASS(816x, 0x816)
  117. IS_TI_SUBCLASS(814x, 0x814)
  118. IS_AM_SUBCLASS(335x, 0x335)
  119. #define cpu_is_omap7xx() 0
  120. #define cpu_is_omap15xx() 0
  121. #define cpu_is_omap16xx() 0
  122. #define cpu_is_omap24xx() 0
  123. #define cpu_is_omap242x() 0
  124. #define cpu_is_omap243x() 0
  125. #define cpu_is_omap34xx() 0
  126. #define cpu_is_omap343x() 0
  127. #define cpu_is_ti81xx() 0
  128. #define cpu_is_ti816x() 0
  129. #define cpu_is_ti814x() 0
  130. #define cpu_is_am33xx() 0
  131. #define cpu_is_am335x() 0
  132. #define cpu_is_omap44xx() 0
  133. #define cpu_is_omap443x() 0
  134. #define cpu_is_omap446x() 0
  135. #define cpu_is_omap447x() 0
  136. #if defined(MULTI_OMAP1)
  137. # if defined(CONFIG_ARCH_OMAP730)
  138. # undef cpu_is_omap7xx
  139. # define cpu_is_omap7xx() is_omap7xx()
  140. # endif
  141. # if defined(CONFIG_ARCH_OMAP850)
  142. # undef cpu_is_omap7xx
  143. # define cpu_is_omap7xx() is_omap7xx()
  144. # endif
  145. # if defined(CONFIG_ARCH_OMAP15XX)
  146. # undef cpu_is_omap15xx
  147. # define cpu_is_omap15xx() is_omap15xx()
  148. # endif
  149. # if defined(CONFIG_ARCH_OMAP16XX)
  150. # undef cpu_is_omap16xx
  151. # define cpu_is_omap16xx() is_omap16xx()
  152. # endif
  153. #else
  154. # if defined(CONFIG_ARCH_OMAP730)
  155. # undef cpu_is_omap7xx
  156. # define cpu_is_omap7xx() 1
  157. # endif
  158. # if defined(CONFIG_ARCH_OMAP850)
  159. # undef cpu_is_omap7xx
  160. # define cpu_is_omap7xx() 1
  161. # endif
  162. # if defined(CONFIG_ARCH_OMAP15XX)
  163. # undef cpu_is_omap15xx
  164. # define cpu_is_omap15xx() 1
  165. # endif
  166. # if defined(CONFIG_ARCH_OMAP16XX)
  167. # undef cpu_is_omap16xx
  168. # define cpu_is_omap16xx() 1
  169. # endif
  170. #endif
  171. #if defined(MULTI_OMAP2)
  172. # if defined(CONFIG_ARCH_OMAP2)
  173. # undef cpu_is_omap24xx
  174. # define cpu_is_omap24xx() is_omap24xx()
  175. # endif
  176. # if defined (CONFIG_SOC_OMAP2420)
  177. # undef cpu_is_omap242x
  178. # define cpu_is_omap242x() is_omap242x()
  179. # endif
  180. # if defined (CONFIG_SOC_OMAP2430)
  181. # undef cpu_is_omap243x
  182. # define cpu_is_omap243x() is_omap243x()
  183. # endif
  184. # if defined(CONFIG_ARCH_OMAP3)
  185. # undef cpu_is_omap34xx
  186. # undef cpu_is_omap343x
  187. # define cpu_is_omap34xx() is_omap34xx()
  188. # define cpu_is_omap343x() is_omap343x()
  189. # endif
  190. #else
  191. # if defined(CONFIG_ARCH_OMAP2)
  192. # undef cpu_is_omap24xx
  193. # define cpu_is_omap24xx() 1
  194. # endif
  195. # if defined(CONFIG_SOC_OMAP2420)
  196. # undef cpu_is_omap242x
  197. # define cpu_is_omap242x() 1
  198. # endif
  199. # if defined(CONFIG_SOC_OMAP2430)
  200. # undef cpu_is_omap243x
  201. # define cpu_is_omap243x() 1
  202. # endif
  203. # if defined(CONFIG_ARCH_OMAP3)
  204. # undef cpu_is_omap34xx
  205. # define cpu_is_omap34xx() 1
  206. # endif
  207. # if defined(CONFIG_SOC_OMAP3430)
  208. # undef cpu_is_omap343x
  209. # define cpu_is_omap343x() 1
  210. # endif
  211. #endif
  212. /*
  213. * Macros to detect individual cpu types.
  214. * These are only rarely needed.
  215. * cpu_is_omap330(): True for OMAP330
  216. * cpu_is_omap730(): True for OMAP730
  217. * cpu_is_omap850(): True for OMAP850
  218. * cpu_is_omap1510(): True for OMAP1510
  219. * cpu_is_omap1610(): True for OMAP1610
  220. * cpu_is_omap1611(): True for OMAP1611
  221. * cpu_is_omap5912(): True for OMAP5912
  222. * cpu_is_omap1621(): True for OMAP1621
  223. * cpu_is_omap1710(): True for OMAP1710
  224. * cpu_is_omap2420(): True for OMAP2420
  225. * cpu_is_omap2422(): True for OMAP2422
  226. * cpu_is_omap2423(): True for OMAP2423
  227. * cpu_is_omap2430(): True for OMAP2430
  228. * cpu_is_omap3430(): True for OMAP3430
  229. * cpu_is_omap3505(): True for OMAP3505
  230. * cpu_is_omap3517(): True for OMAP3517
  231. */
  232. #define GET_OMAP_TYPE ((omap_rev() >> 16) & 0xffff)
  233. #define IS_OMAP_TYPE(type, id) \
  234. static inline int is_omap ##type (void) \
  235. { \
  236. return (GET_OMAP_TYPE == (id)) ? 1 : 0; \
  237. }
  238. IS_OMAP_TYPE(310, 0x0310)
  239. IS_OMAP_TYPE(730, 0x0730)
  240. IS_OMAP_TYPE(850, 0x0850)
  241. IS_OMAP_TYPE(1510, 0x1510)
  242. IS_OMAP_TYPE(1610, 0x1610)
  243. IS_OMAP_TYPE(1611, 0x1611)
  244. IS_OMAP_TYPE(5912, 0x1611)
  245. IS_OMAP_TYPE(1621, 0x1621)
  246. IS_OMAP_TYPE(1710, 0x1710)
  247. IS_OMAP_TYPE(2420, 0x2420)
  248. IS_OMAP_TYPE(2422, 0x2422)
  249. IS_OMAP_TYPE(2423, 0x2423)
  250. IS_OMAP_TYPE(2430, 0x2430)
  251. IS_OMAP_TYPE(3430, 0x3430)
  252. IS_OMAP_TYPE(3505, 0x3517)
  253. IS_OMAP_TYPE(3517, 0x3517)
  254. #define cpu_is_omap310() 0
  255. #define cpu_is_omap730() 0
  256. #define cpu_is_omap850() 0
  257. #define cpu_is_omap1510() 0
  258. #define cpu_is_omap1610() 0
  259. #define cpu_is_omap5912() 0
  260. #define cpu_is_omap1611() 0
  261. #define cpu_is_omap1621() 0
  262. #define cpu_is_omap1710() 0
  263. #define cpu_is_omap2420() 0
  264. #define cpu_is_omap2422() 0
  265. #define cpu_is_omap2423() 0
  266. #define cpu_is_omap2430() 0
  267. #define cpu_is_omap3503() 0
  268. #define cpu_is_omap3515() 0
  269. #define cpu_is_omap3525() 0
  270. #define cpu_is_omap3530() 0
  271. #define cpu_is_omap3505() 0
  272. #define cpu_is_omap3517() 0
  273. #define cpu_is_omap3430() 0
  274. #define cpu_is_omap3630() 0
  275. /*
  276. * Whether we have MULTI_OMAP1 or not, we still need to distinguish
  277. * between 730 vs 850, 330 vs. 1510 and 1611B/5912 vs. 1710.
  278. */
  279. #if defined(CONFIG_ARCH_OMAP730)
  280. # undef cpu_is_omap730
  281. # define cpu_is_omap730() is_omap730()
  282. #endif
  283. #if defined(CONFIG_ARCH_OMAP850)
  284. # undef cpu_is_omap850
  285. # define cpu_is_omap850() is_omap850()
  286. #endif
  287. #if defined(CONFIG_ARCH_OMAP15XX)
  288. # undef cpu_is_omap310
  289. # undef cpu_is_omap1510
  290. # define cpu_is_omap310() is_omap310()
  291. # define cpu_is_omap1510() is_omap1510()
  292. #endif
  293. #if defined(CONFIG_ARCH_OMAP16XX)
  294. # undef cpu_is_omap1610
  295. # undef cpu_is_omap1611
  296. # undef cpu_is_omap5912
  297. # undef cpu_is_omap1621
  298. # undef cpu_is_omap1710
  299. # define cpu_is_omap1610() is_omap1610()
  300. # define cpu_is_omap1611() is_omap1611()
  301. # define cpu_is_omap5912() is_omap5912()
  302. # define cpu_is_omap1621() is_omap1621()
  303. # define cpu_is_omap1710() is_omap1710()
  304. #endif
  305. #if defined(CONFIG_ARCH_OMAP2)
  306. # undef cpu_is_omap2420
  307. # undef cpu_is_omap2422
  308. # undef cpu_is_omap2423
  309. # undef cpu_is_omap2430
  310. # define cpu_is_omap2420() is_omap2420()
  311. # define cpu_is_omap2422() is_omap2422()
  312. # define cpu_is_omap2423() is_omap2423()
  313. # define cpu_is_omap2430() is_omap2430()
  314. #endif
  315. #if defined(CONFIG_ARCH_OMAP3)
  316. # undef cpu_is_omap3430
  317. # undef cpu_is_omap3503
  318. # undef cpu_is_omap3515
  319. # undef cpu_is_omap3525
  320. # undef cpu_is_omap3530
  321. # undef cpu_is_omap3505
  322. # undef cpu_is_omap3517
  323. # undef cpu_is_ti81xx
  324. # undef cpu_is_ti816x
  325. # undef cpu_is_ti814x
  326. # undef cpu_is_am33xx
  327. # undef cpu_is_am335x
  328. # define cpu_is_omap3430() is_omap3430()
  329. # define cpu_is_omap3503() (cpu_is_omap3430() && \
  330. (!omap3_has_iva()) && \
  331. (!omap3_has_sgx()))
  332. # define cpu_is_omap3515() (cpu_is_omap3430() && \
  333. (!omap3_has_iva()) && \
  334. (omap3_has_sgx()))
  335. # define cpu_is_omap3525() (cpu_is_omap3430() && \
  336. (!omap3_has_sgx()) && \
  337. (omap3_has_iva()))
  338. # define cpu_is_omap3530() (cpu_is_omap3430())
  339. # define cpu_is_omap3517() is_omap3517()
  340. # define cpu_is_omap3505() (cpu_is_omap3517() && \
  341. !omap3_has_sgx())
  342. # undef cpu_is_omap3630
  343. # define cpu_is_omap3630() is_omap363x()
  344. # define cpu_is_ti81xx() is_ti81xx()
  345. # define cpu_is_ti816x() is_ti816x()
  346. # define cpu_is_ti814x() is_ti814x()
  347. # define cpu_is_am33xx() is_am33xx()
  348. # define cpu_is_am335x() is_am335x()
  349. #endif
  350. # if defined(CONFIG_ARCH_OMAP4)
  351. # undef cpu_is_omap44xx
  352. # undef cpu_is_omap443x
  353. # undef cpu_is_omap446x
  354. # undef cpu_is_omap447x
  355. # define cpu_is_omap44xx() is_omap44xx()
  356. # define cpu_is_omap443x() is_omap443x()
  357. # define cpu_is_omap446x() is_omap446x()
  358. # define cpu_is_omap447x() is_omap447x()
  359. # endif
  360. /* Macros to detect if we have OMAP1 or OMAP2 */
  361. #define cpu_class_is_omap1() (cpu_is_omap7xx() || cpu_is_omap15xx() || \
  362. cpu_is_omap16xx())
  363. #define cpu_class_is_omap2() (cpu_is_omap24xx() || cpu_is_omap34xx() || \
  364. cpu_is_omap44xx())
  365. /* Various silicon revisions for omap2 */
  366. #define OMAP242X_CLASS 0x24200024
  367. #define OMAP2420_REV_ES1_0 OMAP242X_CLASS
  368. #define OMAP2420_REV_ES2_0 (OMAP242X_CLASS | (0x1 << 8))
  369. #define OMAP243X_CLASS 0x24300024
  370. #define OMAP2430_REV_ES1_0 OMAP243X_CLASS
  371. #define OMAP343X_CLASS 0x34300034
  372. #define OMAP3430_REV_ES1_0 OMAP343X_CLASS
  373. #define OMAP3430_REV_ES2_0 (OMAP343X_CLASS | (0x1 << 8))
  374. #define OMAP3430_REV_ES2_1 (OMAP343X_CLASS | (0x2 << 8))
  375. #define OMAP3430_REV_ES3_0 (OMAP343X_CLASS | (0x3 << 8))
  376. #define OMAP3430_REV_ES3_1 (OMAP343X_CLASS | (0x4 << 8))
  377. #define OMAP3430_REV_ES3_1_2 (OMAP343X_CLASS | (0x5 << 8))
  378. #define OMAP363X_CLASS 0x36300034
  379. #define OMAP3630_REV_ES1_0 OMAP363X_CLASS
  380. #define OMAP3630_REV_ES1_1 (OMAP363X_CLASS | (0x1 << 8))
  381. #define OMAP3630_REV_ES1_2 (OMAP363X_CLASS | (0x2 << 8))
  382. #define OMAP3517_CLASS 0x35170034
  383. #define OMAP3517_REV_ES1_0 OMAP3517_CLASS
  384. #define OMAP3517_REV_ES1_1 (OMAP3517_CLASS | (0x1 << 8))
  385. #define TI816X_CLASS 0x81600034
  386. #define TI8168_REV_ES1_0 TI816X_CLASS
  387. #define TI8168_REV_ES1_1 (TI816X_CLASS | (0x1 << 8))
  388. #define TI814X_CLASS 0x81400034
  389. #define TI8148_REV_ES1_0 TI814X_CLASS
  390. #define TI8148_REV_ES2_0 (TI814X_CLASS | (0x1 << 8))
  391. #define TI8148_REV_ES2_1 (TI814X_CLASS | (0x2 << 8))
  392. #define AM335X_CLASS 0x33500034
  393. #define AM335X_REV_ES1_0 AM335X_CLASS
  394. #define OMAP443X_CLASS 0x44300044
  395. #define OMAP4430_REV_ES1_0 (OMAP443X_CLASS | (0x10 << 8))
  396. #define OMAP4430_REV_ES2_0 (OMAP443X_CLASS | (0x20 << 8))
  397. #define OMAP4430_REV_ES2_1 (OMAP443X_CLASS | (0x21 << 8))
  398. #define OMAP4430_REV_ES2_2 (OMAP443X_CLASS | (0x22 << 8))
  399. #define OMAP4430_REV_ES2_3 (OMAP443X_CLASS | (0x23 << 8))
  400. #define OMAP446X_CLASS 0x44600044
  401. #define OMAP4460_REV_ES1_0 (OMAP446X_CLASS | (0x10 << 8))
  402. #define OMAP447X_CLASS 0x44700044
  403. #define OMAP4470_REV_ES1_0 (OMAP447X_CLASS | (0x10 << 8))
  404. void omap2xxx_check_revision(void);
  405. void omap3xxx_check_revision(void);
  406. void omap4xxx_check_revision(void);
  407. void omap3xxx_check_features(void);
  408. void ti81xx_check_features(void);
  409. void omap4xxx_check_features(void);
  410. /*
  411. * Runtime detection of OMAP3 features
  412. *
  413. * OMAP3_HAS_IO_CHAIN_CTRL: Some later members of the OMAP3 chip
  414. * family have OS-level control over the I/O chain clock. This is
  415. * to avoid a window during which wakeups could potentially be lost
  416. * during powerdomain transitions. If this bit is set, it
  417. * indicates that the chip does support OS-level control of this
  418. * feature.
  419. */
  420. extern u32 omap_features;
  421. #define OMAP3_HAS_L2CACHE BIT(0)
  422. #define OMAP3_HAS_IVA BIT(1)
  423. #define OMAP3_HAS_SGX BIT(2)
  424. #define OMAP3_HAS_NEON BIT(3)
  425. #define OMAP3_HAS_ISP BIT(4)
  426. #define OMAP3_HAS_192MHZ_CLK BIT(5)
  427. #define OMAP3_HAS_IO_WAKEUP BIT(6)
  428. #define OMAP3_HAS_SDRC BIT(7)
  429. #define OMAP3_HAS_IO_CHAIN_CTRL BIT(8)
  430. #define OMAP4_HAS_MPU_1GHZ BIT(9)
  431. #define OMAP4_HAS_MPU_1_2GHZ BIT(10)
  432. #define OMAP4_HAS_MPU_1_5GHZ BIT(11)
  433. #define OMAP3_HAS_FEATURE(feat,flag) \
  434. static inline unsigned int omap3_has_ ##feat(void) \
  435. { \
  436. return omap_features & OMAP3_HAS_ ##flag; \
  437. } \
  438. OMAP3_HAS_FEATURE(l2cache, L2CACHE)
  439. OMAP3_HAS_FEATURE(sgx, SGX)
  440. OMAP3_HAS_FEATURE(iva, IVA)
  441. OMAP3_HAS_FEATURE(neon, NEON)
  442. OMAP3_HAS_FEATURE(isp, ISP)
  443. OMAP3_HAS_FEATURE(192mhz_clk, 192MHZ_CLK)
  444. OMAP3_HAS_FEATURE(io_wakeup, IO_WAKEUP)
  445. OMAP3_HAS_FEATURE(sdrc, SDRC)
  446. OMAP3_HAS_FEATURE(io_chain_ctrl, IO_CHAIN_CTRL)
  447. /*
  448. * Runtime detection of OMAP4 features
  449. */
  450. #define OMAP4_HAS_FEATURE(feat, flag) \
  451. static inline unsigned int omap4_has_ ##feat(void) \
  452. { \
  453. return omap_features & OMAP4_HAS_ ##flag; \
  454. } \
  455. OMAP4_HAS_FEATURE(mpu_1ghz, MPU_1GHZ)
  456. OMAP4_HAS_FEATURE(mpu_1_2ghz, MPU_1_2GHZ)
  457. OMAP4_HAS_FEATURE(mpu_1_5ghz, MPU_1_5GHZ)
  458. #endif