[PATCHv4] Enable a way to provide the reason for "being here"

Juergen Beisert jbe at pengutronix.de
Fri Jul 13 02:04:45 EDT 2012


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 reactivates the hanging system.

V2 includes Marc's suggesion.
V3 includes the detection for the i.MX28 SoC and fixes its usage for other
i.MX SoCs.
V4 includes Marc's recent suggestion.

Comments are still welcome.

Juergen

The following changes since commit 279d3c29437ff84d4542ba4fc81de4fff0381233:

  Merge branch 'for-next/tqma53' into next (2012-07-09 09:24:04 +0200)

are available in the git repository at:

  git://git.pengutronix.de/git/jbe/barebox.git next_provide_reset_sourceV4

for you to fetch changes up to 8a94e229a42fad93f5cb5ff2b4b1cbe8e85e2927:

  ARM/MXS: add reset cause detection (2012-07-13 07:36:00 +0200)

----------------------------------------------------------------
Juergen Beisert (4):
      Enable a way to provide the reason for "being here"
      ARM/Samsung: add support to detect the reset source
      ARM/i.MX: add support to detect the reset source
      ARM/MXS: add reset cause detection

 arch/arm/mach-imx/Makefile           |    1 +
 arch/arm/mach-imx/reset_source.c     |   72 ++++++++++++++++++++++++++++++++++
 arch/arm/mach-samsung/Makefile       |    1 +
 arch/arm/mach-samsung/reset_source.c |   56 ++++++++++++++++++++++++++
 common/Makefile                      |    2 +-
 common/reset_source.c                |   44 +++++++++++++++++++++
 drivers/watchdog/im28wd.c            |   25 ++++++++++++
 include/reset_source.h               |   27 +++++++++++++
 8 files changed, 227 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/mach-imx/reset_source.c
 create mode 100644 arch/arm/mach-samsung/reset_source.c
 create mode 100644 common/reset_source.c
 create mode 100644 include/reset_source.h



More information about the barebox mailing list