Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
cm33xx.c File Reference
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/errno.h>
#include <linux/err.h>
#include <linux/io.h>
#include <plat/common.h>
#include "cm.h"
#include "cm33xx.h"
#include "cm-regbits-34xx.h"
#include "cm-regbits-33xx.h"
#include "prm33xx.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

bool am33xx_cm_is_clkdm_in_hwsup (s16 inst, u16 cdoffs)
 
void am33xx_cm_clkdm_enable_hwsup (s16 inst, u16 cdoffs)
 
void am33xx_cm_clkdm_disable_hwsup (s16 inst, u16 cdoffs)
 
void am33xx_cm_clkdm_force_sleep (s16 inst, u16 cdoffs)
 
void am33xx_cm_clkdm_force_wakeup (s16 inst, u16 cdoffs)
 
int am33xx_cm_wait_module_ready (u16 inst, s16 cdoffs, u16 clkctrl_offs)
 
int am33xx_cm_wait_module_idle (u16 inst, s16 cdoffs, u16 clkctrl_offs)
 
void am33xx_cm_module_enable (u8 mode, u16 inst, s16 cdoffs, u16 clkctrl_offs)
 
void am33xx_cm_module_disable (u16 inst, s16 cdoffs, u16 clkctrl_offs)
 

Macro Definition Documentation

#define CLKCTRL_IDLEST_DISABLED   0x3

Definition at line 47 of file cm33xx.c.

#define CLKCTRL_IDLEST_FUNCTIONAL   0x0

Definition at line 44 of file cm33xx.c.

#define CLKCTRL_IDLEST_INTERFACE_IDLE   0x2

Definition at line 46 of file cm33xx.c.

#define CLKCTRL_IDLEST_INTRANSITION   0x1

Definition at line 45 of file cm33xx.c.

Function Documentation

void am33xx_cm_clkdm_disable_hwsup ( s16  inst,
u16  cdoffs 
)

am33xx_cm_clkdm_disable_hwsup - put a clockdomain in swsup-idle mode : 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 195 of file cm33xx.c.

void am33xx_cm_clkdm_enable_hwsup ( s16  inst,
u16  cdoffs 
)

am33xx_cm_clkdm_enable_hwsup - put a clockdomain in hwsup-idle mode : 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 181 of file cm33xx.c.

void am33xx_cm_clkdm_force_sleep ( s16  inst,
u16  cdoffs 
)

am33xx_cm_clkdm_force_sleep - try to put a clockdomain into idle : CM instance register offset (*_INST macro) : Clockdomain register offset (*_CDOFFS macro)

Put a clockdomain referred to by (, ) into idle No return value.

Definition at line 208 of file cm33xx.c.

void am33xx_cm_clkdm_force_wakeup ( s16  inst,
u16  cdoffs 
)

am33xx_cm_clkdm_force_wakeup - try to take a clockdomain out of idle : 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 221 of file cm33xx.c.

bool am33xx_cm_is_clkdm_in_hwsup ( s16  inst,
u16  cdoffs 
)

am33xx_cm_is_clkdm_in_hwsup - is a clockdomain in hwsup idle mode? : 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 162 of file cm33xx.c.

void am33xx_cm_module_disable ( u16  inst,
s16  cdoffs,
u16  clkctrl_offs 
)

am33xx_cm_module_disable - Disable the module inside CLKCTRL : CM instance register offset (*_INST macro) : Clockdomain register offset (*_CDOFFS macro) : Module clock control register offset (*_CLKCTRL macro)

No return value.

Definition at line 306 of file cm33xx.c.

void am33xx_cm_module_enable ( u8  mode,
u16  inst,
s16  cdoffs,
u16  clkctrl_offs 
)

am33xx_cm_module_enable - Enable the modulemode inside CLKCTRL : Module mode (SW or HW) : CM instance register offset (*_INST macro) : Clockdomain register offset (*_CDOFFS macro) : Module clock control register offset (*_CLKCTRL macro)

No return value.

Definition at line 288 of file cm33xx.c.

int am33xx_cm_wait_module_idle ( u16  inst,
s16  cdoffs,
u16  clkctrl_offs 
)

am33xx_cm_wait_module_idle - wait for a module to be in 'disabled' state : 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 265 of file cm33xx.c.

int am33xx_cm_wait_module_ready ( u16  inst,
s16  cdoffs,
u16  clkctrl_offs 
)

am33xx_cm_wait_module_ready - wait for a module to be in 'func' state : 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 241 of file cm33xx.c.