mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCHv2] Change barebox regarding "machine-restart", "reset cause detection" und "watchdog usage"
@ 2015-06-23 12:57 Juergen Borleis
  2015-06-23 12:58 ` [PATCH 1/5] Reset reason: add a scope value to the reset reason feature Juergen Borleis
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Juergen Borleis @ 2015-06-23 12:57 UTC (permalink / raw)
  To: barebox

This is V2 of this patch set. Changelog:

- some functions are renamed to better reflect their meaning
  ("*_register_handler" instead of "*_add_scope")
- collect most of the new features in one sourcefile, due to the fact they
  manage system reset and share some data
- clean up and remove some files, because they do not provide a function
  anymore (due to the removement of reset_cpu()).
- the reset cause detection and restart feature is now always part of barebox

Currently the architectures in barebox using a fixed approach to restart the
machine: they just provide a cpu_reset() function and are done. Every
architecture then does what the developer has selected in order to reset the
CPU, the SoC or the whole machine.

This approach is nice and simple but can fail. For example on a machine where
some kind of power management changes power supply voltages in order to save
power. Everything works with reduced clock speeds and voltages. It works until
a warm start is triggered and the SoC and it clocks are reset to their POR
defaults - but not the external power supply. In this case a restart feature
is required with a wider scope - which resets the power supplies back to their
POR values.

To honor the scope of a restart feature is the intention of this patch series.
And while a machine restart needs such a scope the use of a watchdog needs
such a scope as well. And at the end of this topic, the detection of the reset
cause also.

BTW: everything works in a reliable manner only, if the kernel honors these
scopes as well.

Patch 2/5 removes the reset_cpu() function barebox wide and replaces it by
registering an architecture dependend restart feature including a scope.
Patch 5/5 adds a new driver to handle the DA9055 PMIC which can act as a reset
cause detection, a watchdog and a restart unit. It is an example for a unit
which has a machine wide scope for all of these three featured.

Comments are welcome
Juergen


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 11+ messages in thread
* [PATCHv3] Change barebox regarding "machine-restart", "reset cause detection" und "watchdog usage"
@ 2015-06-25  7:34 Juergen Borleis
  2015-06-25  7:34 ` [PATCH 4/5] Watchdog/i.MX: make the watchdog driver a regular driver Juergen Borleis
  0 siblings, 1 reply; 11+ messages in thread
From: Juergen Borleis @ 2015-06-25  7:34 UTC (permalink / raw)
  To: barebox

This is V3 of this patch set. Changes from v2:

- call globalvar_add_simple_enum() only once
- restart_remove_handler() has no return value now
- change the remaining reset_cpu() calls to the new API

Currently the architectures in barebox using a fixed approach to restart the
machine: they just provide a cpu_reset() function and are done. Every
architecture then does what the developer has selected in order to reset the
CPU, the SoC or the whole machine.

This approach is nice and simple but can fail. For example on a machine where
some kind of power management changes power supply voltages in order to save
power. Everything works with reduced clock speeds and voltages. It works until
a warm start is triggered and the SoC and it clocks are reset to their POR
defaults - but not the external power supply. In this case a restart feature
is required with a wider scope - which resets the power supplies back to their
POR values.

To honor the scope of a restart feature is the intention of this patch series.
And while a machine restart needs such a scope the use of a watchdog needs
such a scope as well. And at the end of this topic, the detection of the reset
cause also.

BTW: everything works in a reliable manner only, if the kernel honors these
scopes as well.

Patch 2/5 removes the reset_cpu() function barebox wide and replaces it by
registering an architecture dependend restart feature including a scope.
Patch 5/5 adds a new driver to handle the DA9055 PMIC which can act as a reset
cause detection, a watchdog and a restart unit. It is an example for a unit
which has a machine wide scope for all of these three featured.

Comments are welcome
Juergen


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-06-25  7:35 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-23 12:57 [PATCHv2] Change barebox regarding "machine-restart", "reset cause detection" und "watchdog usage" Juergen Borleis
2015-06-23 12:58 ` [PATCH 1/5] Reset reason: add a scope value to the reset reason feature Juergen Borleis
2015-06-24  6:32   ` Sascha Hauer
2015-06-24  7:35     ` Juergen Borleis
2015-06-23 12:58 ` [PATCH 2/5] System restart: add a scope value to the system restart feature Juergen Borleis
2015-06-24  6:42   ` Sascha Hauer
2015-06-23 12:58 ` [PATCH 3/5] Watchdog: add a scope value to the watchdog feature Juergen Borleis
2015-06-24  6:51   ` Sascha Hauer
2015-06-23 12:58 ` [PATCH 4/5] Watchdog/i.MX: make the watchdog driver a regular driver Juergen Borleis
2015-06-23 12:58 ` [PATCH 5/5] MFD/DA9053: da9053: add basic da9053 driver Juergen Borleis
2015-06-25  7:34 [PATCHv3] Change barebox regarding "machine-restart", "reset cause detection" und "watchdog usage" Juergen Borleis
2015-06-25  7:34 ` [PATCH 4/5] Watchdog/i.MX: make the watchdog driver a regular driver Juergen Borleis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox