Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
maple-cpufreq.c File Reference
#include <linux/module.h>
#include <linux/types.h>
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/delay.h>
#include <linux/sched.h>
#include <linux/cpufreq.h>
#include <linux/init.h>
#include <linux/completion.h>
#include <linux/mutex.h>
#include <linux/time.h>
#include <linux/of.h>

Go to the source code of this file.

Macros

#define DBG(fmt...)   pr_debug(fmt)
 
#define SCOM_PCR   0x0aa001 /* PCR scom addr */
 
#define PCR_HILO_SELECT   0x80000000U /* 1 = PCR, 0 = PCRH */
 
#define PCR_SPEED_FULL   0x00000000U /* 1:1 speed value */
 
#define PCR_SPEED_HALF   0x00020000U /* 1:2 speed value */
 
#define PCR_SPEED_QUARTER   0x00040000U /* 1:4 speed value */
 
#define PCR_SPEED_MASK   0x000e0000U /* speed mask */
 
#define PCR_SPEED_SHIFT   17
 
#define PCR_FREQ_REQ_VALID   0x00010000U /* freq request valid */
 
#define PCR_VOLT_REQ_VALID   0x00008000U /* volt request valid */
 
#define PCR_TARGET_TIME_MASK   0x00006000U /* target time */
 
#define PCR_STATLAT_MASK   0x00001f00U /* STATLAT value */
 
#define PCR_SNOOPLAT_MASK   0x000000f0U /* SNOOPLAT value */
 
#define PCR_SNOOPACC_MASK   0x0000000fU /* SNOOPACC value */
 
#define SCOM_PSR   0x408001 /* PSR scom addr */
 
#define PSR_CMD_RECEIVED   0x2000000000000000U /* command received */
 
#define PSR_CMD_COMPLETED   0x1000000000000000U /* command completed */
 
#define PSR_CUR_SPEED_MASK   0x0300000000000000U /* current speed */
 
#define PSR_CUR_SPEED_SHIFT   (56)
 
#define CPUFREQ_HIGH   0
 
#define CPUFREQ_LOW   1
 

Functions

 module_init (maple_cpufreq_init)
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define CPUFREQ_HIGH   0

Definition at line 58 of file maple-cpufreq.c.

#define CPUFREQ_LOW   1

Definition at line 59 of file maple-cpufreq.c.

#define DBG (   fmt...)    pr_debug(fmt)

Definition at line 29 of file maple-cpufreq.c.

#define PCR_FREQ_REQ_VALID   0x00010000U /* freq request valid */

Definition at line 41 of file maple-cpufreq.c.

#define PCR_HILO_SELECT   0x80000000U /* 1 = PCR, 0 = PCRH */

Definition at line 35 of file maple-cpufreq.c.

#define PCR_SNOOPACC_MASK   0x0000000fU /* SNOOPACC value */

Definition at line 46 of file maple-cpufreq.c.

#define PCR_SNOOPLAT_MASK   0x000000f0U /* SNOOPLAT value */

Definition at line 45 of file maple-cpufreq.c.

#define PCR_SPEED_FULL   0x00000000U /* 1:1 speed value */

Definition at line 36 of file maple-cpufreq.c.

#define PCR_SPEED_HALF   0x00020000U /* 1:2 speed value */

Definition at line 37 of file maple-cpufreq.c.

#define PCR_SPEED_MASK   0x000e0000U /* speed mask */

Definition at line 39 of file maple-cpufreq.c.

#define PCR_SPEED_QUARTER   0x00040000U /* 1:4 speed value */

Definition at line 38 of file maple-cpufreq.c.

#define PCR_SPEED_SHIFT   17

Definition at line 40 of file maple-cpufreq.c.

#define PCR_STATLAT_MASK   0x00001f00U /* STATLAT value */

Definition at line 44 of file maple-cpufreq.c.

#define PCR_TARGET_TIME_MASK   0x00006000U /* target time */

Definition at line 43 of file maple-cpufreq.c.

#define PCR_VOLT_REQ_VALID   0x00008000U /* volt request valid */

Definition at line 42 of file maple-cpufreq.c.

#define PSR_CMD_COMPLETED   0x1000000000000000U /* command completed */

Definition at line 51 of file maple-cpufreq.c.

#define PSR_CMD_RECEIVED   0x2000000000000000U /* command received */

Definition at line 50 of file maple-cpufreq.c.

#define PSR_CUR_SPEED_MASK   0x0300000000000000U /* current speed */

Definition at line 52 of file maple-cpufreq.c.

#define PSR_CUR_SPEED_SHIFT   (56)

Definition at line 53 of file maple-cpufreq.c.

#define SCOM_PCR   0x0aa001 /* PCR scom addr */

Definition at line 33 of file maple-cpufreq.c.

#define SCOM_PSR   0x408001 /* PSR scom addr */

Definition at line 48 of file maple-cpufreq.c.

Function Documentation

module_init ( maple_cpufreq_init  )
MODULE_LICENSE ( "GPL"  )