⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dpm.h

📁 the attached file is the source code of dynamic power mangement
💻 H
字号:
/* * linux/include/asm-arm/arch-mp200/dpm.h * MP200-specific definitions for DPM * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright (C) 2005 MontaVista Software <source@mvista.com> * Copyright (C) 2005-2006 NEC Electronics Corporation * * Based on arch/ppc/platforms/ibm405lp_dpm.h by Bishop Brock. * */#ifndef __ASM_ARM_ARCH_MP200_DPM_H#define __ASM_ARM_ARCH_MP200_DPM_H/* * machine dependent operating state * * An operating state is a cpu execution state that has implications for power * management. The DPM will select operating points based largely on the * current operating state. * * DPM_STATES is the number of supported operating states. Valid operating * states are from 0 to DPM_STATES-1 but when setting an operating state the * kernel should only specify a state from the set of "base states" and should * do so by name.  During the context switch the new operating state is simply * extracted from current->dpm_state. * * task states: * * APIs that reference task states use the range -(DPM_TASK_STATE_LIMIT + 1) * through +DPM_TASK_STATE_LIMIT.  This value is added to DPM_TASK_STATE to * obtain the downward or upward adjusted task state value. The * -(DPM_TASK_STATE_LIMIT + 1) value is interpreted specially, and equates to * DPM_NO_STATE. * * Tasks inherit their task operating states across calls to * fork(). DPM_TASK_STATE is the default operating state for all tasks, and is * inherited from init.  Tasks can change (or have changed) their tasks states * using the DPM_SET_TASK_STATE variant of the sys_dpm() system call.  */#define DPM_IDLE_TASK_STATE	0#define DPM_IDLE_STATE		1#define DPM_SLEEP_STATE		2#define DPM_BASE_STATES		3#define DPM_TASK_STATE_LIMIT	4#define DPM_TASK_STATE		(DPM_BASE_STATES + DPM_TASK_STATE_LIMIT)#define DPM_STATES		(DPM_TASK_STATE + DPM_TASK_STATE_LIMIT + 1)#define DPM_TASK_STATES		(DPM_STATES - DPM_BASE_STATES)#define DPM_STATE_NAMES				\{						\	"idle-task", "idle", "sleep",		\	"task-4", "task-3", "task-2", "task-1",	\	"task",					\	"task+1", "task+2", "task+3", "task+4"	\}#define DPM_PARAM_NAMES		\{				\	"logic0-volts",		\	"logic1-volts",		\	"cpu-freq",		\	"sleep-mode"		\}/* MD operating point parameters */#define DPM_MD_V_L0		0#define DPM_MD_V_L1		1#define DPM_MD_CPU		2#define DPM_MD_SLEEP_MODE	3#define DPM_PP_NBR		4#ifdef __KERNEL__#ifndef __ASSEMBLER__#include <linux/types.h>#include <asm/arch/timer.h>typedef __u64 dpm_md_count_t;typedef __u64 dpm_md_time_t;/* Time in microseconds for dpm stats */#define dpm_md_time()		mp200_system_timer_read(TIMER_KFI)/* Instances of this structure define valid Innovator operating points for DPM.   Voltages are represented in mV, and frequencies are represented in KHz. */struct dpm_md_opt {	int v0;			/* Logic0 voltage in mV */	int v1;			/* Logic1 voltage in mV */	int cpu;		/* cpu mode */	int sleep_mode;		/* sleep mode */};#endif				/* __ASSEMBLER__ */#endif				/* __KERNEL__ */#endif				/* __ASM_ARM_ARCH_MP200_DPM_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -