diff options
author | Sebastian Rasmussen <sebastian.rasmussen@stericsson.com> | 2011-08-12 04:28:53 -0400 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2011-10-24 08:09:19 -0400 |
commit | 597045de35caaef68a11b6defbb618710e1a1e52 (patch) | |
tree | fab309289b771709c2a658591e73319bfbc9415a /drivers/mfd/db8500-prcmu.c | |
parent | d6e3002e493e43aa40473935e1803849cf37b6bb (diff) |
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>
Diffstat (limited to 'drivers/mfd/db8500-prcmu.c')
-rw-r--r-- | drivers/mfd/db8500-prcmu.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/mfd/db8500-prcmu.c b/drivers/mfd/db8500-prcmu.c index cb58e44b1e45..6fd4e2993520 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) | |||
1836 | } | 1836 | } |
1837 | 1837 | ||
1838 | /** | 1838 | /** |
1839 | * db8500_prcmu_get_reset_code - Retrieve SW reset reason code | ||
1840 | * | ||
1841 | * Retrieves the reset reason code stored by prcmu_system_reset() before | ||
1842 | * last restart. | ||
1843 | */ | ||
1844 | u16 db8500_prcmu_get_reset_code(void) | ||
1845 | { | ||
1846 | return readw(tcdm_base + PRCM_SW_RST_REASON); | ||
1847 | } | ||
1848 | |||
1849 | /** | ||
1839 | * prcmu_reset_modem - ask the PRCMU to reset modem | 1850 | * prcmu_reset_modem - ask the PRCMU to reset modem |
1840 | */ | 1851 | */ |
1841 | void prcmu_modem_reset(void) | 1852 | void prcmu_modem_reset(void) |