Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
cminst44xx.c File Reference
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/errno.h>
#include <linux/err.h>
#include <linux/io.h>
#include "iomap.h"
#include "common.h"
#include "cm.h"
#include "cm1_44xx.h"
#include "cm2_44xx.h"
#include "cm44xx.h"
#include "cminst44xx.h"
#include "cm-regbits-34xx.h"
#include "cm-regbits-44xx.h"
#include "prcm44xx.h"
#include "prm44xx.h"
#include "prcm_mpu44xx.h"
#include "prcm-common.h"

Go to the source code of this file.

Macros

#define CLKCTRL_IDLEST_FUNCTIONAL   0x0
 
#define CLKCTRL_IDLEST_INTRANSITION   0x1
 
#define CLKCTRL_IDLEST_INTERFACE_IDLE   0x2
 
#define CLKCTRL_IDLEST_DISABLED   0x3
 

Functions

void omap_cm_base_init (void)
 
u32 omap4_cminst_read_inst_reg (u8 part, s16 inst, u16 idx)
 
void omap4_cminst_write_inst_reg (u32 val, u8 part, s16 inst, u16 idx)
 
u32 omap4_cminst_rmw_inst_reg_bits (u32 mask, u32 bits, u8 part, s16 inst, s16 idx)
 
u32 omap4_cminst_set_inst_reg_bits (u32 bits, u8 part, s16 inst, s16 idx)
 
u32 omap4_cminst_clear_inst_reg_bits (u32 bits, u8 part, s16 inst, s16 idx)
 
u32 omap4_cminst_read_inst_reg_bits (u8 part, u16 inst, s16 idx, u32 mask)
 
bool omap4_cminst_is_clkdm_in_hwsup (u8 part, s16 inst, u16 cdoffs)
 
void omap4_cminst_clkdm_enable_hwsup (u8 part, s16 inst, u16 cdoffs)
 
void omap4_cminst_clkdm_disable_hwsup (u8 part, s16 inst, u16 cdoffs)
 
void omap4_cminst_clkdm_force_wakeup (u8 part, s16 inst, u16 cdoffs)
 
int omap4_cminst_wait_module_ready (u8 part, u16 inst, s16 cdoffs, u16 clkctrl_offs)
 
int omap4_cminst_wait_module_idle (u8 part, u16 inst, s16 cdoffs, u16 clkctrl_offs)
 
void omap4_cminst_module_enable (u8 mode, u8 part, u16 inst, s16 cdoffs, u16 clkctrl_offs)
 
void omap4_cminst_module_disable (u8 part, u16 inst, s16 cdoffs, u16 clkctrl_offs)
 

Macro Definition Documentation

#define CLKCTRL_IDLEST_DISABLED   0x3

Definition at line 51 of file cminst44xx.c.

#define CLKCTRL_IDLEST_FUNCTIONAL   0x0

Definition at line 48 of file cminst44xx.c.

#define CLKCTRL_IDLEST_INTERFACE_IDLE   0x2

Definition at line 50 of file cminst44xx.c.

#define CLKCTRL_IDLEST_INTRANSITION   0x1

Definition at line 49 of file cminst44xx.c.

Function Documentation

u32 omap4_cminst_clear_inst_reg_bits ( u32  bits,
u8  part,
s16  inst,
s16  idx 
)

Definition at line 148 of file cminst44xx.c.

void omap4_cminst_clkdm_disable_hwsup ( u8  part,
s16  inst,
u16  cdoffs 
)

omap4_cminst_clkdm_disable_hwsup - put a clockdomain in swsup-idle mode : PRCM partition ID that the clockdomain registers exist in : CM instance register offset (*_INST macro) : Clockdomain register offset (*_CDOFFS macro)

Put a clockdomain referred to by (, , ) into software-supervised idle mode, i.e., controlled manually by the Linux OMAP clockdomain code. No return value.

Definition at line 232 of file cminst44xx.c.

void omap4_cminst_clkdm_enable_hwsup ( u8  part,
s16  inst,
u16  cdoffs 
)

omap4_cminst_clkdm_enable_hwsup - put a clockdomain in hwsup-idle mode : PRCM partition ID that the clockdomain registers exist in : CM instance register offset (*_INST macro) : Clockdomain register offset (*_CDOFFS macro)

Put a clockdomain referred to by (, , ) into hardware-supervised idle mode. No return value.

Definition at line 217 of file cminst44xx.c.

void omap4_cminst_clkdm_force_wakeup ( u8  part,
s16  inst,
u16  cdoffs 
)

omap4_cminst_clkdm_force_sleep - try to take a clockdomain out of idle : PRCM partition ID that the clockdomain registers exist in : CM instance register offset (*_INST macro) : Clockdomain register offset (*_CDOFFS macro)

Take a clockdomain referred to by (, , ) out of idle, waking it up. No return value.

Definition at line 246 of file cminst44xx.c.

bool omap4_cminst_is_clkdm_in_hwsup ( u8  part,
s16  inst,
u16  cdoffs 
)

omap4_cminst_is_clkdm_in_hwsup - is a clockdomain in hwsup idle mode? : PRCM partition ID that the CM_CLKSTCTRL register exists in : CM instance register offset (*_INST macro) : Clockdomain register offset (*_CDOFFS macro)

Returns true if the clockdomain referred to by (, , ) is in hardware-supervised idle mode, or 0 otherwise.

Definition at line 197 of file cminst44xx.c.

void omap4_cminst_module_disable ( u8  part,
u16  inst,
s16  cdoffs,
u16  clkctrl_offs 
)

omap4_cminst_module_disable - Disable the module inside CLKCTRL : PRCM partition ID that the CM_CLKCTRL register exists in : CM instance register offset (*_INST macro) : Clockdomain register offset (*_CDOFFS macro) : Module clock control register offset (*_CLKCTRL macro)

No return value.

Definition at line 337 of file cminst44xx.c.

void omap4_cminst_module_enable ( u8  mode,
u8  part,
u16  inst,
s16  cdoffs,
u16  clkctrl_offs 
)

omap4_cminst_module_enable - Enable the modulemode inside CLKCTRL : Module mode (SW or HW) : PRCM partition ID that the CM_CLKCTRL register exists in : CM instance register offset (*_INST macro) : Clockdomain register offset (*_CDOFFS macro) : Module clock control register offset (*_CLKCTRL macro)

No return value.

Definition at line 317 of file cminst44xx.c.

u32 omap4_cminst_read_inst_reg ( u8  part,
s16  inst,
u16  idx 
)

Definition at line 112 of file cminst44xx.c.

u32 omap4_cminst_read_inst_reg_bits ( u8  part,
u16  inst,
s16  idx,
u32  mask 
)

Definition at line 153 of file cminst44xx.c.

u32 omap4_cminst_rmw_inst_reg_bits ( u32  mask,
u32  bits,
u8  part,
s16  inst,
s16  idx 
)

Definition at line 130 of file cminst44xx.c.

u32 omap4_cminst_set_inst_reg_bits ( u32  bits,
u8  part,
s16  inst,
s16  idx 
)

Definition at line 143 of file cminst44xx.c.

int omap4_cminst_wait_module_idle ( u8  part,
u16  inst,
s16  cdoffs,
u16  clkctrl_offs 
)

omap4_cminst_wait_module_idle - wait for a module to be in 'disabled' state : PRCM partition ID that the CM_CLKCTRL register exists in : CM instance register offset (*_INST macro) : Clockdomain register offset (*_CDOFFS macro) : Module clock control register offset (*_CLKCTRL macro)

Wait for the module IDLEST to be disabled. Some PRCM transition, like reset assertion or parent clock de-activation must wait the module to be fully disabled.

Definition at line 293 of file cminst44xx.c.

int omap4_cminst_wait_module_ready ( u8  part,
u16  inst,
s16  cdoffs,
u16  clkctrl_offs 
)

omap4_cminst_wait_module_ready - wait for a module to be in 'func' state : PRCM partition ID that the CM_CLKCTRL register exists in : CM instance register offset (*_INST macro) : Clockdomain register offset (*_CDOFFS macro) : Module clock control register offset (*_CLKCTRL macro)

Wait for the module IDLEST to be functional. If the idle state is in any the non functional state (trans, idle or disabled), module and thus the sysconfig cannot be accessed and will probably lead to an "imprecise external abort"

Definition at line 267 of file cminst44xx.c.

void omap4_cminst_write_inst_reg ( u32  val,
u8  part,
s16  inst,
u16  idx 
)

Definition at line 121 of file cminst44xx.c.

void omap_cm_base_init ( void  )

omap_cm_base_init - Populates the cm partitions

Populates the base addresses of the _cm_bases array used for read/write of cm module registers.

Definition at line 61 of file cminst44xx.c.