| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
restart_handler_get_by_name() does what its name suggests, so reflect
that in the documentation comment.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20230822074738.3905283-2-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We currently support reboot mode communication with BootROMs of the
i.MX6Q/DL, i.MX8MM and STM32MP15x. For each of these, the user must
take care to use the correct reset as the highest priority reset often
clears the non-volatile register mapped by the syscon holding the reboot
mode. As we only have one BootROM, we can improve usability by adding a
global flag that describes whether a restart handler is suitable for
use after a bootrom reboot mode write. Add a flag bit describing this
and allow populating it from the device tree as well as from drivers.
Existing i.MX/STM32 drivers will be moved onto this in follow-up
commits.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20221017071000.1458292-4-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The restart-priority OF property is parsed for a number of MFDs, but
there is no reason really not to parse it for every restart handler that
has a device tree node like we already do for watchdogs.
Add a new struct restart_handler::of_node field and look into it if
populated. With this of_get_restart_priority, is no longer used, so drop it.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20221017071000.1458292-3-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For all files in common/ that already have a license text:
- Replace with appropriate SPDX-License-Identifier
- Remove empty comment lines around replacement
- remove comment completely if only thing remaining is name
of file without description
Reviewed-by: Roland Hieber <rhi@pengutronix.de>
Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
So far, we were fine by using the highest priority restart handler
whenever more than one was available. There are reasons to want to
configure this however:
- When communicating with BootROM, e.g. to force boot from recovery
mode: The reset chosen must not cause the reboot mode stored to
volatile memory to vanish
- When testing (undocumented) reset behavior, e.g. to analyze how
the EFI reset behaves
Extend the reset command to support this. When no extra command line
option is supplied, the old behavior is maintained.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With incoming changes to choose a specific reset method, give all
currently unnamed "default" reset handlers a name:
- soc reset via SoC-specific means
- soc-wdt reset via SoC watchdog timer
- vector reset via jump to reset vector
- efi reset via EFI firmware
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
| |
Follow-up commit allows referencing specific restart handler by name.
Restart handlers default to "default" as name when none is given.
Number them sequentially instead.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
| |
The CREDITS file was removed from barebox in 2015 by commit 6570288f2d97
("Remove the CREDITS file"). Remove references to it from several files.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
This replaces the reset_cpu() function which every SoC or board must
provide with registered handlers. This makes it possible to have multiple
reset functions for boards which have multiple ways to reset the machine.
Also boards which have no way at all to reset the machine no longer
have to provide a dummy reset_cpu() function.
The problem this solves is that some machines have external PMICs or
similar to reset the system which have to be preferred over the
internal SoC reset, because the PMIC can reset not only the SoC but also
the external devices.
To pick the right way to reset a machine each handler has a priority. The
default priority is 100 and all currently existing restart handlers are
registered with this priority. of_get_restart_priority() allows to retrieve
the priority from the device tree which makes it possible for boards to
give certain restart handlers a higher priority in order to use this one
instead of the default one.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|