Message ID | 1313137733-30914-1-git-send-email-linus.walleij@stericsson.com |
---|---|
State | Accepted |
Commit | 597045de35caaef68a11b6defbb618710e1a1e52 |
Headers | show |
diff --git a/drivers/mfd/db8500-prcmu.c b/drivers/mfd/db8500-prcmu.c index cb58e44..6fd4e29 100644 --- a/drivers/mfd/db8500-prcmu.c +++ b/drivers/mfd/db8500-prcmu.c @@ -1836,6 +1836,17 @@ void db8500_prcmu_system_reset(u16 reset_code) } /** + * 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 */ void prcmu_modem_reset(void)