soc.h (734d1ece37fbf3d2ddfc71bc6c69e0fe35f02542) | soc.h (816a65ef4ce1848d8083d9e198922ddafbe221f2) |
---|---|
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> --- 28 unchanged lines hidden (view full) --- 37#include <linux/bitops.h> 38 39/* 40 * Test if multicore OMAP support is needed 41 */ 42#undef MULTI_OMAP2 43#undef OMAP_NAME 44 | 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> --- 28 unchanged lines hidden (view full) --- 37#include <linux/bitops.h> 38 39/* 40 * Test if multicore OMAP support is needed 41 */ 42#undef MULTI_OMAP2 43#undef OMAP_NAME 44 |
45#ifdef CONFIG_ARCH_MULTIPLATFORM 46#define MULTI_OMAP2 47#endif |
|
45#ifdef CONFIG_SOC_OMAP2420 46# ifdef OMAP_NAME 47# undef MULTI_OMAP2 48# define MULTI_OMAP2 49# else 50# define OMAP_NAME omap2420 51# endif 52#endif --- 54 unchanged lines hidden (view full) --- 107/* 108 * omap_rev bits: 109 * CPU id bits (0730, 1510, 1710, 2422...) [31:16] 110 * CPU revision (See _REV_ defined in cpu.h) [15:08] 111 * CPU class bits (15xx, 16xx, 24xx, 34xx...) [07:00] 112 */ 113unsigned int omap_rev(void); 114 | 48#ifdef CONFIG_SOC_OMAP2420 49# ifdef OMAP_NAME 50# undef MULTI_OMAP2 51# define MULTI_OMAP2 52# else 53# define OMAP_NAME omap2420 54# endif 55#endif --- 54 unchanged lines hidden (view full) --- 110/* 111 * omap_rev bits: 112 * CPU id bits (0730, 1510, 1710, 2422...) [31:16] 113 * CPU revision (See _REV_ defined in cpu.h) [15:08] 114 * CPU class bits (15xx, 16xx, 24xx, 34xx...) [07:00] 115 */ 116unsigned int omap_rev(void); 117 |
118static inline int soc_is_omap(void) 119{ 120 return omap_rev() != 0; 121} 122 |
|
115/* 116 * Get the CPU revision for OMAP devices 117 */ 118#define GET_OMAP_REVISION() ((omap_rev() >> 8) & 0xff) 119 120/* 121 * Macros to group OMAP into cpu classes. 122 * These can be used in most places. --- 337 unchanged lines hidden (view full) --- 460#define OMAP4_HAS_FEATURE(feat, flag) \ 461static inline unsigned int omap4_has_ ##feat(void) \ 462{ \ 463 return omap_features & OMAP4_HAS_ ##flag; \ 464} \ 465 466OMAP4_HAS_FEATURE(perf_silicon, PERF_SILICON) 467 | 123/* 124 * Get the CPU revision for OMAP devices 125 */ 126#define GET_OMAP_REVISION() ((omap_rev() >> 8) & 0xff) 127 128/* 129 * Macros to group OMAP into cpu classes. 130 * These can be used in most places. --- 337 unchanged lines hidden (view full) --- 468#define OMAP4_HAS_FEATURE(feat, flag) \ 469static inline unsigned int omap4_has_ ##feat(void) \ 470{ \ 471 return omap_features & OMAP4_HAS_ ##flag; \ 472} \ 473 474OMAP4_HAS_FEATURE(perf_silicon, PERF_SILICON) 475 |
476/* 477 * We need to make sure omap initcalls don't run when 478 * multiplatform kernels are booted on other SoCs. 479 */ 480#define omap_initcall(level, fn) \ 481static int __init __used __##fn(void) \ 482{ \ 483 if (!soc_is_omap()) \ 484 return 0; \ 485 return fn(); \ 486} \ 487level(__##fn); 488 489#define omap_early_initcall(fn) omap_initcall(early_initcall, fn) 490#define omap_core_initcall(fn) omap_initcall(core_initcall, fn) 491#define omap_postcore_initcall(fn) omap_initcall(postcore_initcall, fn) 492#define omap_arch_initcall(fn) omap_initcall(arch_initcall, fn) 493#define omap_subsys_initcall(fn) omap_initcall(subsys_initcall, fn) 494#define omap_device_initcall(fn) omap_initcall(device_initcall, fn) 495#define omap_late_initcall(fn) omap_initcall(late_initcall, fn) 496 |
|
468#endif /* __ASSEMBLY__ */ 469 | 497#endif /* __ASSEMBLY__ */ 498 |