mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-11-18 23:54:26 +08:00
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: Sebastian Rasmussen <sebastian.rasmussen@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
parent
d6e3002e49
commit
597045de35
@ -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
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user