From b38fd068b3b279eaf76286b4b1ba5cd327933818 Mon Sep 17 00:00:00 2001 From: Robert Marklund Date: Thu, 23 Jun 2011 13:30:59 +0200 Subject: mfd: prcmu-updates: Fix for merge from 35 merge with original commits Signed-off-by: Robert Marklund --- drivers/mfd/db8500-prcmu.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'drivers/mfd/db8500-prcmu.c') diff --git a/drivers/mfd/db8500-prcmu.c b/drivers/mfd/db8500-prcmu.c index 02a15d7cb3b..57939be17ed 100644 --- a/drivers/mfd/db8500-prcmu.c +++ b/drivers/mfd/db8500-prcmu.c @@ -1514,7 +1514,7 @@ bool prcmu_is_ac_wake_requested(void) /** * prcmu_system_reset - System reset * - * Saves the reset reason code and then sets the APE_SOFRST register which + * Saves the reset reason code and then sets the APE_SOFTRST register which * fires interrupt to fw */ void prcmu_system_reset(u16 reset_code) @@ -1523,6 +1523,17 @@ void prcmu_system_reset(u16 reset_code) writel(1, (_PRCMU_BASE + PRCM_APE_SOFTRST)); } +/** + * prcmu_get_reset_code - Retrieve SW reset reason code + * + * Retrieves the reset reason code stored by prcmu_system_reset() before + * last restart. + */ +u16 prcmu_get_reset_code(void) +{ + return readw(tcdm_base + PRCM_SW_RST_REASON); +} + /** * prcmu_reset_modem - ask the PRCMU to reset modem */ -- cgit v1.2.3