Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
cpu.h File Reference
#include <linux/bitops.h>
#include <plat/multi.h>

Go to the source code of this file.

Macros

#define OMAP2_DEVICE_TYPE_TEST   0
 
#define OMAP2_DEVICE_TYPE_EMU   1
 
#define OMAP2_DEVICE_TYPE_SEC   2
 
#define OMAP2_DEVICE_TYPE_GP   3
 
#define OMAP2_DEVICE_TYPE_BAD   4
 
#define GET_OMAP_REVISION()   ((omap_rev() >> 8) & 0xff)
 
#define GET_OMAP_CLASS   (omap_rev() & 0xff)
 
#define IS_OMAP_CLASS(class, id)
 
#define GET_AM_CLASS   ((omap_rev() >> 24) & 0xff)
 
#define IS_AM_CLASS(class, id)
 
#define GET_TI_CLASS   ((omap_rev() >> 24) & 0xff)
 
#define IS_TI_CLASS(class, id)
 
#define GET_OMAP_SUBCLASS   ((omap_rev() >> 20) & 0x0fff)
 
#define IS_OMAP_SUBCLASS(subclass, id)
 
#define IS_TI_SUBCLASS(subclass, id)
 
#define IS_AM_SUBCLASS(subclass, id)
 
#define cpu_is_omap7xx()   0
 
#define cpu_is_omap15xx()   0
 
#define cpu_is_omap16xx()   0
 
#define cpu_is_omap24xx()   0
 
#define cpu_is_omap242x()   0
 
#define cpu_is_omap243x()   0
 
#define cpu_is_omap34xx()   0
 
#define cpu_is_omap343x()   0
 
#define cpu_is_ti81xx()   0
 
#define cpu_is_ti816x()   0
 
#define cpu_is_ti814x()   0
 
#define soc_is_am35xx()   0
 
#define soc_is_am33xx()   0
 
#define soc_is_am335x()   0
 
#define cpu_is_omap44xx()   0
 
#define cpu_is_omap443x()   0
 
#define cpu_is_omap446x()   0
 
#define cpu_is_omap447x()   0
 
#define soc_is_omap54xx()   0
 
#define soc_is_omap543x()   0
 
#define GET_OMAP_TYPE   ((omap_rev() >> 16) & 0xffff)
 
#define IS_OMAP_TYPE(type, id)
 
#define cpu_is_omap310()   0
 
#define cpu_is_omap1510()   0
 
#define cpu_is_omap1610()   0
 
#define cpu_is_omap5912()   0
 
#define cpu_is_omap1611()   0
 
#define cpu_is_omap1621()   0
 
#define cpu_is_omap1710()   0
 
#define cpu_is_omap2420()   0
 
#define cpu_is_omap2422()   0
 
#define cpu_is_omap2423()   0
 
#define cpu_is_omap2430()   0
 
#define cpu_is_omap3430()   0
 
#define cpu_is_omap3630()   0
 
#define soc_is_omap5430()   0
 
#define cpu_class_is_omap1()
 
#define cpu_class_is_omap2()
 
#define OMAP242X_CLASS   0x24200024
 
#define OMAP2420_REV_ES1_0   OMAP242X_CLASS
 
#define OMAP2420_REV_ES2_0   (OMAP242X_CLASS | (0x1 << 8))
 
#define OMAP243X_CLASS   0x24300024
 
#define OMAP2430_REV_ES1_0   OMAP243X_CLASS
 
#define OMAP343X_CLASS   0x34300034
 
#define OMAP3430_REV_ES1_0   OMAP343X_CLASS
 
#define OMAP3430_REV_ES2_0   (OMAP343X_CLASS | (0x1 << 8))
 
#define OMAP3430_REV_ES2_1   (OMAP343X_CLASS | (0x2 << 8))
 
#define OMAP3430_REV_ES3_0   (OMAP343X_CLASS | (0x3 << 8))
 
#define OMAP3430_REV_ES3_1   (OMAP343X_CLASS | (0x4 << 8))
 
#define OMAP3430_REV_ES3_1_2   (OMAP343X_CLASS | (0x5 << 8))
 
#define OMAP363X_CLASS   0x36300034
 
#define OMAP3630_REV_ES1_0   OMAP363X_CLASS
 
#define OMAP3630_REV_ES1_1   (OMAP363X_CLASS | (0x1 << 8))
 
#define OMAP3630_REV_ES1_2   (OMAP363X_CLASS | (0x2 << 8))
 
#define TI816X_CLASS   0x81600034
 
#define TI8168_REV_ES1_0   TI816X_CLASS
 
#define TI8168_REV_ES1_1   (TI816X_CLASS | (0x1 << 8))
 
#define TI814X_CLASS   0x81400034
 
#define TI8148_REV_ES1_0   TI814X_CLASS
 
#define TI8148_REV_ES2_0   (TI814X_CLASS | (0x1 << 8))
 
#define TI8148_REV_ES2_1   (TI814X_CLASS | (0x2 << 8))
 
#define AM35XX_CLASS   0x35170034
 
#define AM35XX_REV_ES1_0   AM35XX_CLASS
 
#define AM35XX_REV_ES1_1   (AM35XX_CLASS | (0x1 << 8))
 
#define AM335X_CLASS   0x33500033
 
#define AM335X_REV_ES1_0   AM335X_CLASS
 
#define OMAP443X_CLASS   0x44300044
 
#define OMAP4430_REV_ES1_0   (OMAP443X_CLASS | (0x10 << 8))
 
#define OMAP4430_REV_ES2_0   (OMAP443X_CLASS | (0x20 << 8))
 
#define OMAP4430_REV_ES2_1   (OMAP443X_CLASS | (0x21 << 8))
 
#define OMAP4430_REV_ES2_2   (OMAP443X_CLASS | (0x22 << 8))
 
#define OMAP4430_REV_ES2_3   (OMAP443X_CLASS | (0x23 << 8))
 
#define OMAP446X_CLASS   0x44600044
 
#define OMAP4460_REV_ES1_0   (OMAP446X_CLASS | (0x10 << 8))
 
#define OMAP4460_REV_ES1_1   (OMAP446X_CLASS | (0x11 << 8))
 
#define OMAP447X_CLASS   0x44700044
 
#define OMAP4470_REV_ES1_0   (OMAP447X_CLASS | (0x10 << 8))
 
#define OMAP54XX_CLASS   0x54000054
 
#define OMAP5430_REV_ES1_0   (OMAP54XX_CLASS | (0x30 << 16) | (0x10 << 8))
 
#define OMAP5432_REV_ES1_0   (OMAP54XX_CLASS | (0x32 << 16) | (0x10 << 8))
 
#define OMAP3_HAS_L2CACHE   BIT(0)
 
#define OMAP3_HAS_IVA   BIT(1)
 
#define OMAP3_HAS_SGX   BIT(2)
 
#define OMAP3_HAS_NEON   BIT(3)
 
#define OMAP3_HAS_ISP   BIT(4)
 
#define OMAP3_HAS_192MHZ_CLK   BIT(5)
 
#define OMAP3_HAS_IO_WAKEUP   BIT(6)
 
#define OMAP3_HAS_SDRC   BIT(7)
 
#define OMAP3_HAS_IO_CHAIN_CTRL   BIT(8)
 
#define OMAP4_HAS_MPU_1GHZ   BIT(9)
 
#define OMAP4_HAS_MPU_1_2GHZ   BIT(10)
 
#define OMAP4_HAS_MPU_1_5GHZ   BIT(11)
 
#define OMAP3_HAS_FEATURE(feat, flag)
 
#define OMAP4_HAS_FEATURE(feat, flag)
 

Functions

int omap_type (void)
 
unsigned int omap_rev (void)
 
void omap2xxx_check_revision (void)
 
void omap3xxx_check_revision (void)
 
void omap4xxx_check_revision (void)
 
void omap5xxx_check_revision (void)
 
void omap3xxx_check_features (void)
 
void ti81xx_check_features (void)
 
void omap4xxx_check_features (void)
 

Variables

u32 omap_features
 

Macro Definition Documentation

#define AM335X_CLASS   0x33500033

Definition at line 414 of file cpu.h.

#define AM335X_REV_ES1_0   AM335X_CLASS

Definition at line 415 of file cpu.h.

#define AM35XX_CLASS   0x35170034

Definition at line 410 of file cpu.h.

#define AM35XX_REV_ES1_0   AM35XX_CLASS

Definition at line 411 of file cpu.h.

#define AM35XX_REV_ES1_1   (AM35XX_CLASS | (0x1 << 8))

Definition at line 412 of file cpu.h.

#define cpu_class_is_omap1 ( )
Value:
cpu_is_omap16xx())

Definition at line 374 of file cpu.h.

#define cpu_class_is_omap2 ( )
Value:
cpu_is_omap44xx() || soc_is_omap54xx() || \
soc_is_am33xx())

Definition at line 376 of file cpu.h.

#define cpu_is_omap1510 ( )    0

Definition at line 283 of file cpu.h.

#define cpu_is_omap15xx ( )    0

Definition at line 147 of file cpu.h.

#define cpu_is_omap1610 ( )    0

Definition at line 284 of file cpu.h.

#define cpu_is_omap1611 ( )    0

Definition at line 286 of file cpu.h.

#define cpu_is_omap1621 ( )    0

Definition at line 287 of file cpu.h.

#define cpu_is_omap16xx ( )    0

Definition at line 148 of file cpu.h.

#define cpu_is_omap1710 ( )    0

Definition at line 288 of file cpu.h.

#define cpu_is_omap2420 ( )    0

Definition at line 289 of file cpu.h.

#define cpu_is_omap2422 ( )    0

Definition at line 290 of file cpu.h.

#define cpu_is_omap2423 ( )    0

Definition at line 291 of file cpu.h.

#define cpu_is_omap242x ( )    0

Definition at line 150 of file cpu.h.

#define cpu_is_omap2430 ( )    0

Definition at line 292 of file cpu.h.

#define cpu_is_omap243x ( )    0

Definition at line 151 of file cpu.h.

#define cpu_is_omap24xx ( )    0

Definition at line 149 of file cpu.h.

#define cpu_is_omap310 ( )    0

Definition at line 282 of file cpu.h.

#define cpu_is_omap3430 ( )    0

Definition at line 293 of file cpu.h.

#define cpu_is_omap343x ( )    0

Definition at line 153 of file cpu.h.

#define cpu_is_omap34xx ( )    0

Definition at line 152 of file cpu.h.

#define cpu_is_omap3630 ( )    0

Definition at line 294 of file cpu.h.

#define cpu_is_omap443x ( )    0

Definition at line 161 of file cpu.h.

#define cpu_is_omap446x ( )    0

Definition at line 162 of file cpu.h.

#define cpu_is_omap447x ( )    0

Definition at line 163 of file cpu.h.

#define cpu_is_omap44xx ( )    0

Definition at line 160 of file cpu.h.

#define cpu_is_omap5912 ( )    0

Definition at line 285 of file cpu.h.

#define cpu_is_omap7xx ( )    0

Definition at line 146 of file cpu.h.

#define cpu_is_ti814x ( )    0

Definition at line 156 of file cpu.h.

#define cpu_is_ti816x ( )    0

Definition at line 155 of file cpu.h.

#define cpu_is_ti81xx ( )    0

Definition at line 154 of file cpu.h.

#define GET_AM_CLASS   ((omap_rev() >> 24) & 0xff)

Definition at line 85 of file cpu.h.

#define GET_OMAP_CLASS   (omap_rev() & 0xff)

Definition at line 77 of file cpu.h.

#define GET_OMAP_REVISION ( )    ((omap_rev() >> 8) & 0xff)

Definition at line 60 of file cpu.h.

#define GET_OMAP_SUBCLASS   ((omap_rev() >> 20) & 0x0fff)

Definition at line 101 of file cpu.h.

#define GET_OMAP_TYPE   ((omap_rev() >> 16) & 0xffff)

Definition at line 261 of file cpu.h.

#define GET_TI_CLASS   ((omap_rev() >> 24) & 0xff)

Definition at line 93 of file cpu.h.

#define IS_AM_CLASS (   class,
  id 
)
Value:
static inline int is_am ##class (void) \
{ \
return (GET_AM_CLASS == (id)) ? 1 : 0; \
}

Definition at line 87 of file cpu.h.

#define IS_AM_SUBCLASS (   subclass,
  id 
)
Value:
static inline int is_am ##subclass (void) \
{ \
return (GET_OMAP_SUBCLASS == (id)) ? 1 : 0; \
}

Definition at line 115 of file cpu.h.

#define IS_OMAP_CLASS (   class,
  id 
)
Value:
static inline int is_omap ##class (void) \
{ \
return (GET_OMAP_CLASS == (id)) ? 1 : 0; \
}

Definition at line 79 of file cpu.h.

#define IS_OMAP_SUBCLASS (   subclass,
  id 
)
Value:
static inline int is_omap ##subclass (void) \
{ \
return (GET_OMAP_SUBCLASS == (id)) ? 1 : 0; \
}

Definition at line 103 of file cpu.h.

#define IS_OMAP_TYPE (   type,
  id 
)
Value:
static inline int is_omap ##type (void) \
{ \
return (GET_OMAP_TYPE == (id)) ? 1 : 0; \
}

Definition at line 263 of file cpu.h.

#define IS_TI_CLASS (   class,
  id 
)
Value:
static inline int is_ti ##class (void) \
{ \
return (GET_TI_CLASS == (id)) ? 1 : 0; \
}

Definition at line 95 of file cpu.h.

#define IS_TI_SUBCLASS (   subclass,
  id 
)
Value:
static inline int is_ti ##subclass (void) \
{ \
return (GET_OMAP_SUBCLASS == (id)) ? 1 : 0; \
}

Definition at line 109 of file cpu.h.

#define OMAP2420_REV_ES1_0   OMAP242X_CLASS

Definition at line 382 of file cpu.h.

#define OMAP2420_REV_ES2_0   (OMAP242X_CLASS | (0x1 << 8))

Definition at line 383 of file cpu.h.

#define OMAP242X_CLASS   0x24200024

Definition at line 381 of file cpu.h.

#define OMAP2430_REV_ES1_0   OMAP243X_CLASS

Definition at line 386 of file cpu.h.

#define OMAP243X_CLASS   0x24300024

Definition at line 385 of file cpu.h.

#define OMAP2_DEVICE_TYPE_BAD   4

Definition at line 45 of file cpu.h.

#define OMAP2_DEVICE_TYPE_EMU   1

Definition at line 42 of file cpu.h.

#define OMAP2_DEVICE_TYPE_GP   3

Definition at line 44 of file cpu.h.

#define OMAP2_DEVICE_TYPE_SEC   2

Definition at line 43 of file cpu.h.

#define OMAP2_DEVICE_TYPE_TEST   0

Definition at line 41 of file cpu.h.

#define OMAP3430_REV_ES1_0   OMAP343X_CLASS

Definition at line 389 of file cpu.h.

#define OMAP3430_REV_ES2_0   (OMAP343X_CLASS | (0x1 << 8))

Definition at line 390 of file cpu.h.

#define OMAP3430_REV_ES2_1   (OMAP343X_CLASS | (0x2 << 8))

Definition at line 391 of file cpu.h.

#define OMAP3430_REV_ES3_0   (OMAP343X_CLASS | (0x3 << 8))

Definition at line 392 of file cpu.h.

#define OMAP3430_REV_ES3_1   (OMAP343X_CLASS | (0x4 << 8))

Definition at line 393 of file cpu.h.

#define OMAP3430_REV_ES3_1_2   (OMAP343X_CLASS | (0x5 << 8))

Definition at line 394 of file cpu.h.

#define OMAP343X_CLASS   0x34300034

Definition at line 388 of file cpu.h.

#define OMAP3630_REV_ES1_0   OMAP363X_CLASS

Definition at line 397 of file cpu.h.

#define OMAP3630_REV_ES1_1   (OMAP363X_CLASS | (0x1 << 8))

Definition at line 398 of file cpu.h.

#define OMAP3630_REV_ES1_2   (OMAP363X_CLASS | (0x2 << 8))

Definition at line 399 of file cpu.h.

#define OMAP363X_CLASS   0x36300034

Definition at line 396 of file cpu.h.

#define OMAP3_HAS_192MHZ_CLK   BIT(5)

Definition at line 460 of file cpu.h.

#define OMAP3_HAS_FEATURE (   feat,
  flag 
)
Value:
static inline unsigned int omap3_has_ ##feat(void) \
{ \
return omap_features & OMAP3_HAS_ ##flag; \
} \

Definition at line 469 of file cpu.h.

#define OMAP3_HAS_IO_CHAIN_CTRL   BIT(8)

Definition at line 463 of file cpu.h.

#define OMAP3_HAS_IO_WAKEUP   BIT(6)

Definition at line 461 of file cpu.h.

#define OMAP3_HAS_ISP   BIT(4)

Definition at line 459 of file cpu.h.

#define OMAP3_HAS_IVA   BIT(1)

Definition at line 456 of file cpu.h.

#define OMAP3_HAS_L2CACHE   BIT(0)

Definition at line 455 of file cpu.h.

#define OMAP3_HAS_NEON   BIT(3)

Definition at line 458 of file cpu.h.

#define OMAP3_HAS_SDRC   BIT(7)

Definition at line 462 of file cpu.h.

#define OMAP3_HAS_SGX   BIT(2)

Definition at line 457 of file cpu.h.

#define OMAP4430_REV_ES1_0   (OMAP443X_CLASS | (0x10 << 8))

Definition at line 418 of file cpu.h.

#define OMAP4430_REV_ES2_0   (OMAP443X_CLASS | (0x20 << 8))

Definition at line 419 of file cpu.h.

#define OMAP4430_REV_ES2_1   (OMAP443X_CLASS | (0x21 << 8))

Definition at line 420 of file cpu.h.

#define OMAP4430_REV_ES2_2   (OMAP443X_CLASS | (0x22 << 8))

Definition at line 421 of file cpu.h.

#define OMAP4430_REV_ES2_3   (OMAP443X_CLASS | (0x23 << 8))

Definition at line 422 of file cpu.h.

#define OMAP443X_CLASS   0x44300044

Definition at line 417 of file cpu.h.

#define OMAP4460_REV_ES1_0   (OMAP446X_CLASS | (0x10 << 8))

Definition at line 425 of file cpu.h.

#define OMAP4460_REV_ES1_1   (OMAP446X_CLASS | (0x11 << 8))

Definition at line 426 of file cpu.h.

#define OMAP446X_CLASS   0x44600044

Definition at line 424 of file cpu.h.

#define OMAP4470_REV_ES1_0   (OMAP447X_CLASS | (0x10 << 8))

Definition at line 429 of file cpu.h.

#define OMAP447X_CLASS   0x44700044

Definition at line 428 of file cpu.h.

#define OMAP4_HAS_FEATURE (   feat,
  flag 
)
Value:
static inline unsigned int omap4_has_ ##feat(void) \
{ \
return omap_features & OMAP4_HAS_ ##flag; \
} \

Definition at line 488 of file cpu.h.

#define OMAP4_HAS_MPU_1_2GHZ   BIT(10)

Definition at line 465 of file cpu.h.

#define OMAP4_HAS_MPU_1_5GHZ   BIT(11)

Definition at line 466 of file cpu.h.

#define OMAP4_HAS_MPU_1GHZ   BIT(9)

Definition at line 464 of file cpu.h.

#define OMAP5430_REV_ES1_0   (OMAP54XX_CLASS | (0x30 << 16) | (0x10 << 8))

Definition at line 432 of file cpu.h.

#define OMAP5432_REV_ES1_0   (OMAP54XX_CLASS | (0x32 << 16) | (0x10 << 8))

Definition at line 433 of file cpu.h.

#define OMAP54XX_CLASS   0x54000054

Definition at line 431 of file cpu.h.

#define soc_is_am335x ( )    0

Definition at line 159 of file cpu.h.

#define soc_is_am33xx ( )    0

Definition at line 158 of file cpu.h.

#define soc_is_am35xx ( )    0

Definition at line 157 of file cpu.h.

#define soc_is_omap5430 ( )    0

Definition at line 295 of file cpu.h.

#define soc_is_omap543x ( )    0

Definition at line 165 of file cpu.h.

#define soc_is_omap54xx ( )    0

Definition at line 164 of file cpu.h.

#define TI8148_REV_ES1_0   TI814X_CLASS

Definition at line 406 of file cpu.h.

#define TI8148_REV_ES2_0   (TI814X_CLASS | (0x1 << 8))

Definition at line 407 of file cpu.h.

#define TI8148_REV_ES2_1   (TI814X_CLASS | (0x2 << 8))

Definition at line 408 of file cpu.h.

#define TI814X_CLASS   0x81400034

Definition at line 405 of file cpu.h.

#define TI8168_REV_ES1_0   TI816X_CLASS

Definition at line 402 of file cpu.h.

#define TI8168_REV_ES1_1   (TI816X_CLASS | (0x1 << 8))

Definition at line 403 of file cpu.h.

#define TI816X_CLASS   0x81600034

Definition at line 401 of file cpu.h.

Function Documentation

void omap2xxx_check_revision ( void  )

Definition at line 122 of file id.c.

void omap3xxx_check_features ( void  )

Definition at line 230 of file id.c.

void omap3xxx_check_revision ( void  )

Definition at line 303 of file id.c.

void omap4xxx_check_features ( void  )

Definition at line 272 of file id.c.

void omap4xxx_check_revision ( void  )

Definition at line 444 of file id.c.

void omap5xxx_check_revision ( void  )

Definition at line 520 of file id.c.

unsigned int omap_rev ( void  )

Definition at line 66 of file id.c.

int omap_type ( void  )

Definition at line 41 of file id.c.

void ti81xx_check_features ( void  )

Definition at line 297 of file id.c.

Variable Documentation

u32 omap_features

Definition at line 33 of file id.c.