9
0
Fork 0
Commit Graph

8 Commits

Author SHA1 Message Date
Lucas Stach 200ba6cdee reset-source: add stub for of_get_reset_source_priority
Allow drivers to build even if reset source support isn't built in.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-04 08:02:18 +02:00
Sascha Hauer 4a7534bf07 reset-source: Allow different priorities
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>
2015-08-28 07:18:14 +02:00
Wadim Egorov c918022532 reset_source: Add external reset
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>
2015-03-02 07:54:13 +01:00
Lucas Stach f63a42a999 reset_source: add thermal reset
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>
2014-11-04 12:16:20 +01:00
Sascha Hauer 706cef7e5b reset_source: add reset_source_get
To get reset_source from C code, not only from shell.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-29 12:12:23 +01:00
Sascha Hauer 0099a887c0 reset_source: rename set_reset_source to reset_source_set
To get all reset source related functions into the same function
namespace.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-29 12:12:17 +01:00
Sascha Hauer 90e9f773c1 reset_source: provide static inline function if disabled
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-08 21:41:30 +02:00
Juergen Beisert 1069567830 Enable a way to provide the reason for "being here"
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>
2012-07-18 16:21:43 +02:00