mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
[PATCH] Add support for type argument in PAL_GET_PSTATE
PAL_GET_PSTATE accepts a type argument to return different kinds of frequency information. Refer: Intel Itanium�Architecture Software Developer's Manual - Volume 2: System Architecture, Revision 2.2 (http://developer.intel.com/design/itanium/manuals/245318.htm) Add the support for type argument and use Instantaneous frequency in the acpi driver. Also fix a bug, where in return value of PAL_GET_PSTATE was getting compared with 'control' bits instead of 'status' bits. Signed-off-by: Venkatesh Pallipadi <[email protected]> Signed-off-by: Tony Luck <[email protected]>
This commit is contained in:
parent
6dbfc19b7e
commit
17e77b1cc3
2 changed files with 11 additions and 9 deletions
|
|
@ -84,6 +84,11 @@
|
|||
#define PAL_SET_PSTATE 263 /* set the P-state */
|
||||
#define PAL_BRAND_INFO 274 /* Processor branding information */
|
||||
|
||||
#define PAL_GET_PSTATE_TYPE_LASTSET 0
|
||||
#define PAL_GET_PSTATE_TYPE_AVGANDRESET 1
|
||||
#define PAL_GET_PSTATE_TYPE_AVGNORESET 2
|
||||
#define PAL_GET_PSTATE_TYPE_INSTANT 3
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
#include <linux/types.h>
|
||||
|
|
@ -1141,10 +1146,10 @@ ia64_pal_halt_info (pal_power_mgmt_info_u_t *power_buf)
|
|||
|
||||
/* Get the current P-state information */
|
||||
static inline s64
|
||||
ia64_pal_get_pstate (u64 *pstate_index)
|
||||
ia64_pal_get_pstate (u64 *pstate_index, unsigned long type)
|
||||
{
|
||||
struct ia64_pal_retval iprv;
|
||||
PAL_CALL_STK(iprv, PAL_GET_PSTATE, 0, 0, 0);
|
||||
PAL_CALL_STK(iprv, PAL_GET_PSTATE, type, 0, 0);
|
||||
*pstate_index = iprv.v0;
|
||||
return iprv.status;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue