From f9fcb9ba05487fd1d20b3ae9f9685e8b0a0ffa7d Mon Sep 17 00:00:00 2001 From: Markinus Date: Sun, 29 Aug 2010 00:06:21 +0200 Subject: [PATCH] pm: add some pm modifications set 1550 vreg setting to pcom changed pm functions to global, dependent on amss version --- arch/arm/mach-msm/pm.c | 3 ++- arch/arm/mach-msm/pmic_global.c | 6 ----- arch/arm/mach-msm/proc_comm.h | 44 +++++++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+), 7 deletions(-) diff --git a/arch/arm/mach-msm/pm.c b/arch/arm/mach-msm/pm.c index bfcf7b5b..d652d77b 100644 --- a/arch/arm/mach-msm/pm.c +++ b/arch/arm/mach-msm/pm.c @@ -41,6 +41,7 @@ #include "smd_rpcrouter.h" #include "acpuclock.h" #include "proc_comm.h" +#include "pmic_global.h" #include "clock.h" #include "spm.h" #ifdef CONFIG_HAS_WAKELOCK @@ -674,7 +675,7 @@ static void msm_pm_power_off(void) if (msm_wakeup_after) msm_proc_comm(PCOM_SET_RTC_ALARM, &msm_wakeup_after, 0); - msm_proc_comm(PCOM_POWER_DOWN, 0, 0); + pmic_glb_power_down(); #if CONFIG_MSM_RMT_STORAGE_SERVER printk(KERN_INFO "from %s\r\n", __func__); diff --git a/arch/arm/mach-msm/pmic_global.c b/arch/arm/mach-msm/pmic_global.c index 89060afe..4d354d3a 100644 --- a/arch/arm/mach-msm/pmic_global.c +++ b/arch/arm/mach-msm/pmic_global.c @@ -167,9 +167,6 @@ int pmic_glb_set_vreg(int enable, enum vreg_id id) return dex_comm(DEX_PMIC_REG_OFF, &id, 0); } break; - case 1550: - return pm_rpc_set_only(enable, id, 1, 3, PM_RPC_PROC_SET_VREG); - break; default: return msm_proc_comm(PCOM_VREG_SWITCH, &id, &enable); break; @@ -185,9 +182,6 @@ int pmic_glb_vreg_set_level(enum vreg_id id, unsigned millivolt) id = 1U << id; return dex_comm(DEX_PMIC_REG_VOLTAGE, &id, &millivolt); break; - case 1550: - return pmic_vreg_set_level(id, millivolt); - break; default: return msm_proc_comm(PCOM_VREG_SET_LEVEL, &id, &millivolt); break; diff --git a/arch/arm/mach-msm/proc_comm.h b/arch/arm/mach-msm/proc_comm.h index 23507653..c9269c7c 100644 --- a/arch/arm/mach-msm/proc_comm.h +++ b/arch/arm/mach-msm/proc_comm.h @@ -16,6 +16,50 @@ #ifndef _ARCH_ARM_MACH_MSM_PROC_COMM_H_ #define _ARCH_ARM_MACH_MSM_PROC_COMM_H_ + +// Supported by LEO: +// +// 2 RESET_APPS +// 3 RESET_CHIP + +// 6 +// 7 +// 8 + +// 11 USB PIN CONFIG +// 12 USB PIN SEL +// 13 SET RTC ALARM +// 14 NVREAD +// 15 NVWRITE +// 16 UUID +// 17 UUID +// 18 ENTROPY + +// 30 VREG_SWITCH +// 31 VREG_SET_LEVEL +// 35 +// 36 ET_FTM_BOOT_COUN +// 37 RPC_GPIO_TLMM_CONFIG_EX +// 38 PM_MPP_CONFIG + +// 41 RESET_MODEM +// 42 RESET_CHIP_IMM +// 44 VREG_PULLDOWN +// +// 88 RESERVED0 +// 89 RESERVED1 +// +// 93 ENTER_APPSBL_CHG_MODE +// 94 EXIT_APPSBL_CHG_MODE +// +// 99 PM_MPP_CONFIG_DIGITAL_INPUT +// 100 PM_MPP_CONFIG_I_SINK +// 103 +// 104 +// 105 +// 106 +// 107 + enum { PCOM_CMD_IDLE = 0x0, PCOM_CMD_DONE,