Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
cm2xxx_3xxx.h File Reference
#include "prcm-common.h"

Go to the source code of this file.

Macros

#define OMAP2420_CM_REGADDR(module, reg)   OMAP2_L4_IO_ADDRESS(OMAP2420_CM_BASE + (module) + (reg))
 
#define OMAP2430_CM_REGADDR(module, reg)   OMAP2_L4_IO_ADDRESS(OMAP2430_CM_BASE + (module) + (reg))
 
#define OMAP34XX_CM_REGADDR(module, reg)   OMAP2_L4_IO_ADDRESS(OMAP3430_CM_BASE + (module) + (reg))
 
#define OMAP3430_CM_REVISION   OMAP34XX_CM_REGADDR(OCP_MOD, 0x0000)
 
#define OMAP3430_CM_SYSCONFIG   OMAP34XX_CM_REGADDR(OCP_MOD, 0x0010)
 
#define OMAP3430_CM_POLCTRL   OMAP34XX_CM_REGADDR(OCP_MOD, 0x009c)
 
#define OMAP3_CM_CLKOUT_CTRL_OFFSET   0x0070
 
#define OMAP3430_CM_CLKOUT_CTRL   OMAP_CM_REGADDR(OMAP3430_CCR_MOD, 0x0070)
 
#define CM_FCLKEN   0x0000
 
#define CM_FCLKEN1   CM_FCLKEN
 
#define CM_CLKEN   CM_FCLKEN
 
#define CM_ICLKEN   0x0010
 
#define CM_ICLKEN1   CM_ICLKEN
 
#define CM_ICLKEN2   0x0014
 
#define CM_ICLKEN3   0x0018
 
#define CM_IDLEST   0x0020
 
#define CM_IDLEST1   CM_IDLEST
 
#define CM_IDLEST2   0x0024
 
#define CM_AUTOIDLE   0x0030
 
#define CM_AUTOIDLE1   CM_AUTOIDLE
 
#define CM_AUTOIDLE2   0x0034
 
#define CM_AUTOIDLE3   0x0038
 
#define CM_CLKSEL   0x0040
 
#define CM_CLKSEL1   CM_CLKSEL
 
#define CM_CLKSEL2   0x0044
 
#define OMAP2_CM_CLKSTCTRL   0x0048
 
#define OMAP24XX_CM_FCLKEN2   0x0004
 
#define OMAP24XX_CM_ICLKEN4   0x001c
 
#define OMAP24XX_CM_AUTOIDLE4   0x003c
 
#define OMAP24XX_CM_IDLEST4   0x002c
 
#define OMAP2430_CM_IDLEST3   0x0028
 
#define OMAP3430_CM_CLKEN_PLL   0x0004
 
#define OMAP3430ES2_CM_CLKEN2   0x0004
 
#define OMAP3430ES2_CM_FCLKEN3   0x0008
 
#define OMAP3430_CM_IDLEST_PLL   CM_IDLEST2
 
#define OMAP3430_CM_AUTOIDLE_PLL   CM_AUTOIDLE2
 
#define OMAP3430ES2_CM_AUTOIDLE2_PLL   CM_AUTOIDLE2
 
#define OMAP3430_CM_CLKSEL1   CM_CLKSEL
 
#define OMAP3430_CM_CLKSEL1_PLL   CM_CLKSEL
 
#define OMAP3430_CM_CLKSEL2_PLL   CM_CLKSEL2
 
#define OMAP3430_CM_SLEEPDEP   CM_CLKSEL2
 
#define OMAP3430_CM_CLKSEL3   OMAP2_CM_CLKSTCTRL
 
#define OMAP3430_CM_CLKSTST   0x004c
 
#define OMAP3430ES2_CM_CLKSEL4   0x004c
 
#define OMAP3430ES2_CM_CLKSEL5   0x0050
 
#define OMAP3430_CM_CLKSEL2_EMU   0x0050
 
#define OMAP3430_CM_CLKSEL3_EMU   0x0054
 
#define OMAP24XX_CM_IDLEST_VAL   0
 
#define OMAP34XX_CM_IDLEST_VAL   1
 
#define OMAP_CLKSEL_GFX_SHIFT   0
 
#define OMAP_CLKSEL_GFX_MASK   (0x7 << 0)
 
#define OMAP_EN_GFX_SHIFT   0
 
#define OMAP_EN_GFX_MASK   (1 << 0)
 
#define OMAP_ST_GFX_MASK   (1 << 0)
 

Functions

u32 omap2_cm_read_mod_reg (s16 module, u16 idx)
 
void omap2_cm_write_mod_reg (u32 val, s16 module, u16 idx)
 
u32 omap2_cm_rmw_mod_reg_bits (u32 mask, u32 bits, s16 module, s16 idx)
 
int omap2_cm_wait_module_ready (s16 prcm_mod, u8 idlest_id, u8 idlest_shift)
 
u32 omap2_cm_set_mod_reg_bits (u32 bits, s16 module, s16 idx)
 
u32 omap2_cm_clear_mod_reg_bits (u32 bits, s16 module, s16 idx)
 
bool omap2_cm_is_clkdm_in_hwsup (s16 module, u32 mask)
 
void omap2xxx_cm_clkdm_enable_hwsup (s16 module, u32 mask)
 
void omap2xxx_cm_clkdm_disable_hwsup (s16 module, u32 mask)
 
void omap3xxx_cm_clkdm_enable_hwsup (s16 module, u32 mask)
 
void omap3xxx_cm_clkdm_disable_hwsup (s16 module, u32 mask)
 
void omap3xxx_cm_clkdm_force_sleep (s16 module, u32 mask)
 
void omap3xxx_cm_clkdm_force_wakeup (s16 module, u32 mask)
 
void omap2xxx_cm_set_dpll_disable_autoidle (void)
 
void omap2xxx_cm_set_dpll_auto_low_power_stop (void)
 
void omap2xxx_cm_set_apll54_disable_autoidle (void)
 
void omap2xxx_cm_set_apll54_auto_low_power_stop (void)
 
void omap2xxx_cm_set_apll96_disable_autoidle (void)
 
void omap2xxx_cm_set_apll96_auto_low_power_stop (void)
 
void omap3_cm_save_context (void)
 
void omap3_cm_restore_context (void)
 

Macro Definition Documentation

#define CM_AUTOIDLE   0x0030

Definition at line 60 of file cm2xxx_3xxx.h.

#define CM_AUTOIDLE1   CM_AUTOIDLE

Definition at line 61 of file cm2xxx_3xxx.h.

#define CM_AUTOIDLE2   0x0034

Definition at line 62 of file cm2xxx_3xxx.h.

#define CM_AUTOIDLE3   0x0038

Definition at line 63 of file cm2xxx_3xxx.h.

#define CM_CLKEN   CM_FCLKEN

Definition at line 52 of file cm2xxx_3xxx.h.

#define CM_CLKSEL   0x0040

Definition at line 64 of file cm2xxx_3xxx.h.

#define CM_CLKSEL1   CM_CLKSEL

Definition at line 65 of file cm2xxx_3xxx.h.

#define CM_CLKSEL2   0x0044

Definition at line 66 of file cm2xxx_3xxx.h.

#define CM_FCLKEN   0x0000

Definition at line 50 of file cm2xxx_3xxx.h.

#define CM_FCLKEN1   CM_FCLKEN

Definition at line 51 of file cm2xxx_3xxx.h.

#define CM_ICLKEN   0x0010

Definition at line 53 of file cm2xxx_3xxx.h.

#define CM_ICLKEN1   CM_ICLKEN

Definition at line 54 of file cm2xxx_3xxx.h.

#define CM_ICLKEN2   0x0014

Definition at line 55 of file cm2xxx_3xxx.h.

#define CM_ICLKEN3   0x0018

Definition at line 56 of file cm2xxx_3xxx.h.

#define CM_IDLEST   0x0020

Definition at line 57 of file cm2xxx_3xxx.h.

#define CM_IDLEST1   CM_IDLEST

Definition at line 58 of file cm2xxx_3xxx.h.

#define CM_IDLEST2   0x0024

Definition at line 59 of file cm2xxx_3xxx.h.

#define OMAP2420_CM_REGADDR (   module,
  reg 
)    OMAP2_L4_IO_ADDRESS(OMAP2420_CM_BASE + (module) + (reg))

Definition at line 21 of file cm2xxx_3xxx.h.

#define OMAP2430_CM_IDLEST3   0x0028

Definition at line 76 of file cm2xxx_3xxx.h.

#define OMAP2430_CM_REGADDR (   module,
  reg 
)    OMAP2_L4_IO_ADDRESS(OMAP2430_CM_BASE + (module) + (reg))

Definition at line 23 of file cm2xxx_3xxx.h.

#define OMAP24XX_CM_AUTOIDLE4   0x003c

Definition at line 73 of file cm2xxx_3xxx.h.

#define OMAP24XX_CM_FCLKEN2   0x0004

Definition at line 71 of file cm2xxx_3xxx.h.

#define OMAP24XX_CM_ICLKEN4   0x001c

Definition at line 72 of file cm2xxx_3xxx.h.

#define OMAP24XX_CM_IDLEST4   0x002c

Definition at line 74 of file cm2xxx_3xxx.h.

#define OMAP24XX_CM_IDLEST_VAL   0

Definition at line 100 of file cm2xxx_3xxx.h.

#define OMAP2_CM_CLKSTCTRL   0x0048

Definition at line 67 of file cm2xxx_3xxx.h.

#define OMAP3430_CM_AUTOIDLE_PLL   CM_AUTOIDLE2

Definition at line 84 of file cm2xxx_3xxx.h.

#define OMAP3430_CM_CLKEN_PLL   0x0004

Definition at line 80 of file cm2xxx_3xxx.h.

#define OMAP3430_CM_CLKOUT_CTRL   OMAP_CM_REGADDR(OMAP3430_CCR_MOD, 0x0070)

Definition at line 40 of file cm2xxx_3xxx.h.

#define OMAP3430_CM_CLKSEL1   CM_CLKSEL

Definition at line 86 of file cm2xxx_3xxx.h.

#define OMAP3430_CM_CLKSEL1_PLL   CM_CLKSEL

Definition at line 87 of file cm2xxx_3xxx.h.

#define OMAP3430_CM_CLKSEL2_EMU   0x0050

Definition at line 94 of file cm2xxx_3xxx.h.

#define OMAP3430_CM_CLKSEL2_PLL   CM_CLKSEL2

Definition at line 88 of file cm2xxx_3xxx.h.

#define OMAP3430_CM_CLKSEL3   OMAP2_CM_CLKSTCTRL

Definition at line 90 of file cm2xxx_3xxx.h.

#define OMAP3430_CM_CLKSEL3_EMU   0x0054

Definition at line 95 of file cm2xxx_3xxx.h.

#define OMAP3430_CM_CLKSTST   0x004c

Definition at line 91 of file cm2xxx_3xxx.h.

#define OMAP3430_CM_IDLEST_PLL   CM_IDLEST2

Definition at line 83 of file cm2xxx_3xxx.h.

#define OMAP3430_CM_POLCTRL   OMAP34XX_CM_REGADDR(OCP_MOD, 0x009c)

Definition at line 37 of file cm2xxx_3xxx.h.

#define OMAP3430_CM_REVISION   OMAP34XX_CM_REGADDR(OCP_MOD, 0x0000)

Definition at line 35 of file cm2xxx_3xxx.h.

#define OMAP3430_CM_SLEEPDEP   CM_CLKSEL2

Definition at line 89 of file cm2xxx_3xxx.h.

#define OMAP3430_CM_SYSCONFIG   OMAP34XX_CM_REGADDR(OCP_MOD, 0x0010)

Definition at line 36 of file cm2xxx_3xxx.h.

#define OMAP3430ES2_CM_AUTOIDLE2_PLL   CM_AUTOIDLE2

Definition at line 85 of file cm2xxx_3xxx.h.

#define OMAP3430ES2_CM_CLKEN2   0x0004

Definition at line 81 of file cm2xxx_3xxx.h.

#define OMAP3430ES2_CM_CLKSEL4   0x004c

Definition at line 92 of file cm2xxx_3xxx.h.

#define OMAP3430ES2_CM_CLKSEL5   0x0050

Definition at line 93 of file cm2xxx_3xxx.h.

#define OMAP3430ES2_CM_FCLKEN3   0x0008

Definition at line 82 of file cm2xxx_3xxx.h.

#define OMAP34XX_CM_IDLEST_VAL   1

Definition at line 101 of file cm2xxx_3xxx.h.

#define OMAP34XX_CM_REGADDR (   module,
  reg 
)    OMAP2_L4_IO_ADDRESS(OMAP3430_CM_BASE + (module) + (reg))

Definition at line 25 of file cm2xxx_3xxx.h.

#define OMAP3_CM_CLKOUT_CTRL_OFFSET   0x0070

Definition at line 39 of file cm2xxx_3xxx.h.

#define OMAP_CLKSEL_GFX_MASK   (0x7 << 0)

Definition at line 140 of file cm2xxx_3xxx.h.

#define OMAP_CLKSEL_GFX_SHIFT   0

Definition at line 139 of file cm2xxx_3xxx.h.

#define OMAP_EN_GFX_MASK   (1 << 0)

Definition at line 144 of file cm2xxx_3xxx.h.

#define OMAP_EN_GFX_SHIFT   0

Definition at line 143 of file cm2xxx_3xxx.h.

#define OMAP_ST_GFX_MASK   (1 << 0)

Definition at line 147 of file cm2xxx_3xxx.h.

Function Documentation

u32 omap2_cm_clear_mod_reg_bits ( u32  bits,
s16  module,
s16  idx 
)

Definition at line 69 of file cm2xxx_3xxx.c.

bool omap2_cm_is_clkdm_in_hwsup ( s16  module,
u32  mask 
)

Definition at line 88 of file cm2xxx_3xxx.c.

u32 omap2_cm_read_mod_reg ( s16  module,
u16  idx 
)

Definition at line 41 of file cm2xxx_3xxx.c.

u32 omap2_cm_rmw_mod_reg_bits ( u32  mask,
u32  bits,
s16  module,
s16  idx 
)

Definition at line 52 of file cm2xxx_3xxx.c.

u32 omap2_cm_set_mod_reg_bits ( u32  bits,
s16  module,
s16  idx 
)

Definition at line 64 of file cm2xxx_3xxx.c.

int omap2_cm_wait_module_ready ( s16  prcm_mod,
u8  idlest_id,
u8  idlest_shift 
)

omap2_cm_wait_idlest_ready - wait for a module to leave idle or standby : PRCM module offset : CM_IDLESTx register ID (i.e., x = 1, 2, 3) : shift of the bit in the CM_IDLEST* register to check

XXX document

Definition at line 211 of file cm2xxx_3xxx.c.

void omap2_cm_write_mod_reg ( u32  val,
s16  module,
u16  idx 
)

Definition at line 46 of file cm2xxx_3xxx.c.

void omap2xxx_cm_clkdm_disable_hwsup ( s16  module,
u32  mask 
)

Definition at line 112 of file cm2xxx_3xxx.c.

void omap2xxx_cm_clkdm_enable_hwsup ( s16  module,
u32  mask 
)

Definition at line 107 of file cm2xxx_3xxx.c.

void omap2xxx_cm_set_apll54_auto_low_power_stop ( void  )

Definition at line 181 of file cm2xxx_3xxx.c.

void omap2xxx_cm_set_apll54_disable_autoidle ( void  )

Definition at line 175 of file cm2xxx_3xxx.c.

void omap2xxx_cm_set_apll96_auto_low_power_stop ( void  )

Definition at line 193 of file cm2xxx_3xxx.c.

void omap2xxx_cm_set_apll96_disable_autoidle ( void  )

Definition at line 187 of file cm2xxx_3xxx.c.

void omap2xxx_cm_set_dpll_auto_low_power_stop ( void  )

Definition at line 156 of file cm2xxx_3xxx.c.

void omap2xxx_cm_set_dpll_disable_autoidle ( void  )

Definition at line 151 of file cm2xxx_3xxx.c.

void omap3_cm_restore_context ( void  )
void omap3_cm_save_context ( void  )
void omap3xxx_cm_clkdm_disable_hwsup ( s16  module,
u32  mask 
)

Definition at line 122 of file cm2xxx_3xxx.c.

void omap3xxx_cm_clkdm_enable_hwsup ( s16  module,
u32  mask 
)

Definition at line 117 of file cm2xxx_3xxx.c.

void omap3xxx_cm_clkdm_force_sleep ( s16  module,
u32  mask 
)

Definition at line 127 of file cm2xxx_3xxx.c.

void omap3xxx_cm_clkdm_force_wakeup ( s16  module,
u32  mask 
)

Definition at line 132 of file cm2xxx_3xxx.c.