summaryrefslogtreecommitdiffstats
path: root/drivers/power
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-next/magicvar-unique-id' into for-next/reboot-modeSascha Hauer2020-10-071-6/+4
|
* power: reset: syscon-reboot-mode: support multi-word reboot modesAhmad Fatoum2020-09-291-26/+65
| | | | | | | | | | | | SoCs like the i.MX6 have their BootROM consult two distinct 32-bit registers to determine the reboot mode. Extend the driver to support this. While backwards compatible, this is not so far supported by the upstream binding, which is why a new barebox,syscon-reboot-mode is introduced. This new compatible be inhibit used to inhibit fixup into a kernel device tree. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* power: reset: reboot-mode: support multi-word magicAhmad Fatoum2020-09-292-19/+29
| | | | | | | | | | | | | The upstream binding and driver implementation only supports reboot modes of 32-bit length. This is insufficient for cases where multiple registers need to be written for the reboot mode to become active. The i.MX6 is an example for this, the BootROM expects a second 32-bit register to indicate whether the reboot mode in the first is valid. In preparation for adding support for this to the syscon-reboot-mode driver. Migrate the reboot-mode core to support this. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* power: reset: reboot-mode: fix up node into boot device treeAhmad Fatoum2020-09-291-0/+43
| | | | | | | | | | | | | Instead of relying that the kernel and barebox device trees are in sync, just enforce it by having barebox fix up the device tree node it probed into the kernel device tree. We usually want that, but some reboot mode drivers might want to inhibit the fixup, e.g. because they implement a non-upstream binding or because they communicate with the BootROM, while the kernel shouldn't. For those the fixup is made optional via a struct reboot_mode_driver::no_fixup member. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* power: reset: reboot-mode: port syscon-reboot-mode supportAhmad Fatoum2020-09-293-0/+97
| | | | | | | | | | Reboot modes are one-shot information that should be valid for only a single reset. Syscons that survive a warm reset are one way to implement this. This is used by many BootROMs to allow falling into a recovery mode on the next boot. This ports the Linux syscon-reboot-mode support. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* drivers: add reboot-mode infrastructureAhmad Fatoum2020-09-295-0/+196
Reboot modes provide a well-defined way to exchange information between different stage of the boot process. When configured, users can type `reboot bootloader` in the OS and barebox can read it out a device parameter. Likewise barebox can write a reboot mode for the BootROM to evaluate and then reset to fall into a serial recovery mode for example. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>