Commit 597045de authored by Sebastian Rasmussen's avatar Sebastian Rasmussen Committed by Samuel Ortiz

mfd: db8500-prcmu reset code retrieval

This implements the reset code retrieval function so we can
ipso facto get to know how the system was reset.
Signed-off-by: default avatarSebastian Rasmussen <sebastian.rasmussen@stericsson.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent d6e3002e
...@@ -1835,6 +1835,17 @@ void db8500_prcmu_system_reset(u16 reset_code) ...@@ -1835,6 +1835,17 @@ void db8500_prcmu_system_reset(u16 reset_code)
writel(1, PRCM_APE_SOFTRST); writel(1, PRCM_APE_SOFTRST);
} }
/**
* db8500_prcmu_get_reset_code - Retrieve SW reset reason code
*
* Retrieves the reset reason code stored by prcmu_system_reset() before
* last restart.
*/
u16 db8500_prcmu_get_reset_code(void)
{
return readw(tcdm_base + PRCM_SW_RST_REASON);
}
/** /**
* prcmu_reset_modem - ask the PRCMU to reset modem * prcmu_reset_modem - ask the PRCMU to reset modem
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment