lkml.org 
[lkml]   [2011]   [Aug]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 10/23] mfd/db8500-prcmu: reset code retrieval
Date
From: Sebastian Rasmussen <sebastian.rasmussen@stericsson.com>

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>
---
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 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)
--
1.7.3.2


\
 
 \ /
  Last update: 2011-08-12 10:31    [W:0.023 / U:0.448 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site