summaryrefslogtreecommitdiffstats
path: root/common/reset_source.c
Commit message (Collapse)AuthorAgeFilesLines
* reset-source: Add some debugging aidsSascha Hauer2015-08-281-0/+4
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* reset-source: Allow different prioritiesSascha Hauer2015-08-281-1/+22
| | | | | | | | | | | | | | Different devices may report the reset source with different levels of certainty. For example a SoC may see a power-on reset, but this may only be because an external PMIC has power cycled the SoC. This means the PMIC knows the real reason better and thus the reset reason from the PMIC should be preferred. This patch introduces priorities for the reset_source to handle the above scenario. Also add a of_get_reset_source_priority() function to retrieve the desired priority from the device tree. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* reset-source: Use globalvar_add_simple_enumSascha Hauer2015-08-271-4/+2
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* reset_source: Add external resetWadim Egorov2015-03-021-0/+1
| | | | | | | Some SoCs have special device pins for external reset signals. Signed-off-by: Wadim Egorov <w.egorov@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* reset_source: make safe to call earlierSascha Hauer2015-03-021-2/+2
| | | | | | | | | reset_source_init used to set the reset source to unknown in a coredevice_initcall. This means if reset_source_set() has been called earlier the value would have been overwritten. Fix this by calling globalvar_add_simple() each time reset_source_set() is called. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* reset_source: add thermal resetLucas Stach2014-11-041-0/+1
| | | | | | | | Some SoCs are able to detect if they got reset in response to an overtemperature event. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* reset_source: add reset_source_getSascha Hauer2014-01-291-0/+10
| | | | | | To get reset_source from C code, not only from shell. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* reset_source: rename set_reset_source to reset_source_setSascha Hauer2014-01-291-4/+4
| | | | | | | To get all reset source related functions into the same function namespace. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* globalvar: Allow to set initial valueSascha Hauer2013-08-161-2/+2
| | | | | | | Calling globalvar_add_simple() and setting a value is more than common. Add a parameter for the initial value. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Enable a way to provide the reason for "being here"Juergen Beisert2012-07-181-0/+44
Many architectures support a way to detect why the bootloader is running. This patch adds a global variable to be able to use the cause in some kind of shell code to do special things on demand. For example to do an emergency boot, when the last boot fails and the watchdog reactivate the hanging system. Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>