Skip to content

Commit

Permalink
mfd: db8500-prcmu reset code retrieval
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sebastian Rasmussen authored and Samuel Ortiz committed Oct 24, 2011
1 parent d6e3002 commit 597045d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions drivers/mfd/db8500-prcmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down

0 comments on commit 597045d

Please sign in to comment.