summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRabin Vincent <rabin.vincent@stericsson.com>2011-12-12 16:11:19 +0530
committerPhilippe Langlais <philippe.langlais@stericsson.com>2012-05-22 10:59:23 +0200
commite95dd53e786eb097e45bd70db73c8bdba1c7dec9 (patch)
treeb76931f32612810cd0fcb190a73d6a3ee51fe358
parent18425346acd3d8e5aa8af7014d1acd231576dfe8 (diff)
db5500-prcmu: read and interpret status correctly
Read the transition status, not the value of the power state that we requested. Also, adjust for the different value of some status codes between 8500 and 5500. ST-Ericsson ID: 336595 ST-Ericsson Linux next: NA ST-Ericsson FOSS-OUT ID: Trivial Change-Id: I87140042fa973eed0fbb7b439d9740308dceee2c Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/42147 Reviewed-by: QATOOLS Reviewed-by: QABUILD Reviewed-by: Vijaya Kumar K-1 <vijay.kilari@stericsson.com>
-rw-r--r--drivers/mfd/db5500-prcmu.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/mfd/db5500-prcmu.c b/drivers/mfd/db5500-prcmu.c
index 009b46565fe..6e9c5f62754 100644
--- a/drivers/mfd/db5500-prcmu.c
+++ b/drivers/mfd/db5500-prcmu.c
@@ -1027,7 +1027,16 @@ unlock_return:
u8 db5500_prcmu_get_power_state_result(void)
{
- return readb(PRCM_REQ_MB0_AP_POWER_STATE);
+ u8 status = readb_relaxed(PRCM_ACK_MB0_AP_PWRSTTR_STATUS);
+
+ /*
+ * Callers expect all the status values to match 8500. Adjust for
+ * PendingReq_Er (0x2b).
+ */
+ if (status == 0x2b)
+ status = PRCMU_PRCMU2ARMPENDINGIT_ER;
+
+ return status;
}
void db5500_prcmu_enable_wakeups(u32 wakeups)