power: qcom: Modify APM timeout value for msm8953
As per msm8953 design, APM state machine could take more than 200us for mode switching. Increase SW timeout constraint value to 500us. Also, update the mask used to check APM switch status. CRs-Fixed: 992695 Change-Id: Ie0f8733fb5b39172fb14547292cbd05689a50230 Signed-off-by: Tirupathi Reddy <tirupath@codeaurora.org>
This commit is contained in:
parent
4380bdb604
commit
6287056179
1 changed files with 10 additions and 4 deletions
|
@ -629,9 +629,15 @@ done:
|
|||
#define MSM8953_APCC_APM_MODE 0x000002a8
|
||||
#define MSM8953_APCC_APM_CTL_STS 0x000002b0
|
||||
|
||||
/* 8953 constants */
|
||||
#define MSM8953_APM_SWITCH_TIMEOUT_US 500
|
||||
|
||||
/* Register bit mask definitions */
|
||||
#define MSM8953_APM_CTL_STS_MASK 0x1f
|
||||
|
||||
static int msm8953_apm_switch_to_mx(struct msm_apm_ctrl_dev *ctrl_dev)
|
||||
{
|
||||
int timeout = MSM_APM_SWITCH_TIMEOUT_US;
|
||||
int timeout = MSM8953_APM_SWITCH_TIMEOUT_US;
|
||||
u32 regval;
|
||||
int ret = 0;
|
||||
unsigned long flags;
|
||||
|
@ -648,7 +654,7 @@ static int msm8953_apm_switch_to_mx(struct msm_apm_ctrl_dev *ctrl_dev)
|
|||
while (timeout > 0) {
|
||||
regval = readl_relaxed(ctrl_dev->reg_base +
|
||||
MSM8953_APCC_APM_CTL_STS);
|
||||
if ((regval & MSM_APM_CTL_STS_MASK) ==
|
||||
if ((regval & MSM8953_APM_CTL_STS_MASK) ==
|
||||
MSM8953_APM_MX_DONE_VAL)
|
||||
break;
|
||||
|
||||
|
@ -672,7 +678,7 @@ static int msm8953_apm_switch_to_mx(struct msm_apm_ctrl_dev *ctrl_dev)
|
|||
|
||||
static int msm8953_apm_switch_to_apcc(struct msm_apm_ctrl_dev *ctrl_dev)
|
||||
{
|
||||
int timeout = MSM_APM_SWITCH_TIMEOUT_US;
|
||||
int timeout = MSM8953_APM_SWITCH_TIMEOUT_US;
|
||||
u32 regval;
|
||||
int ret = 0;
|
||||
unsigned long flags;
|
||||
|
@ -689,7 +695,7 @@ static int msm8953_apm_switch_to_apcc(struct msm_apm_ctrl_dev *ctrl_dev)
|
|||
while (timeout > 0) {
|
||||
regval = readl_relaxed(ctrl_dev->reg_base +
|
||||
MSM8953_APCC_APM_CTL_STS);
|
||||
if ((regval & MSM_APM_CTL_STS_MASK) ==
|
||||
if ((regval & MSM8953_APM_CTL_STS_MASK) ==
|
||||
MSM8953_APM_APCC_DONE_VAL)
|
||||
break;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue