aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap/include/plat/cpu.h
diff options
context:
space:
mode:
authorSanjeev Premi <premi@ti.com>2009-11-22 13:10:53 -0500
committerTony Lindgren <tony@atomide.com>2009-11-22 13:24:32 -0500
commit8384ce071365244332ea05c81112bfffcf48be87 (patch)
tree5a6f076c6cef8d526b4429e17a64fd73dd63132c /arch/arm/plat-omap/include/plat/cpu.h
parent45f780a06153544ab84fd1da3a8b28c07f61da1d (diff)
omap3: Runtime detection of Si features
The OMAP35x family has multiple variants differing in the HW features. This patch detects these features at runtime and prints information during the boot. Since most of the code seemed repetitive, macros have been used for readability. Signed-off-by: Sanjeev Premi <premi@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/plat-omap/include/plat/cpu.h')
-rw-r--r--arch/arm/plat-omap/include/plat/cpu.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h
index f129efb3075e..431fec45bbbc 100644
--- a/arch/arm/plat-omap/include/plat/cpu.h
+++ b/arch/arm/plat-omap/include/plat/cpu.h
@@ -30,6 +30,8 @@
30#ifndef __ASM_ARCH_OMAP_CPU_H 30#ifndef __ASM_ARCH_OMAP_CPU_H
31#define __ASM_ARCH_OMAP_CPU_H 31#define __ASM_ARCH_OMAP_CPU_H
32 32
33#include <linux/bitops.h>
34
33/* 35/*
34 * Omap device type i.e. EMU/HS/TST/GP/BAD 36 * Omap device type i.e. EMU/HS/TST/GP/BAD
35 */ 37 */
@@ -423,4 +425,27 @@ IS_OMAP_TYPE(3430, 0x3430)
423int omap_chip_is(struct omap_chip_id oci); 425int omap_chip_is(struct omap_chip_id oci);
424void omap2_check_revision(void); 426void omap2_check_revision(void);
425 427
428/*
429 * Runtime detection of OMAP3 features
430 */
431extern u32 omap3_features;
432
433#define OMAP3_HAS_L2CACHE BIT(0)
434#define OMAP3_HAS_IVA BIT(1)
435#define OMAP3_HAS_SGX BIT(2)
436#define OMAP3_HAS_NEON BIT(3)
437#define OMAP3_HAS_ISP BIT(4)
438
439#define OMAP3_HAS_FEATURE(feat,flag) \
440static inline unsigned int omap3_has_ ##feat(void) \
441{ \
442 return (omap3_features & OMAP3_HAS_ ##flag); \
443} \
444
445OMAP3_HAS_FEATURE(l2cache, L2CACHE)
446OMAP3_HAS_FEATURE(sgx, SGX)
447OMAP3_HAS_FEATURE(iva, IVA)
448OMAP3_HAS_FEATURE(neon, NEON)
449OMAP3_HAS_FEATURE(isp, ISP)
450
426#endif 451#endif