提交 597045de 编写于 作者: S Sebastian Rasmussen 提交者: 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: NSebastian Rasmussen <sebastian.rasmussen@stericsson.com>
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
上级 d6e3002e
......@@ -1835,6 +1835,17 @@ void db8500_prcmu_system_reset(u16 reset_code)
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
*/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册