summaryrefslogtreecommitdiffstats
path: root/drivers/sysreset/sysreset_sandbox.c
Commit message (Collapse)AuthorAgeFilesLines
* sysreset: switch to using SYSRESET_POWER_OFF for poweroffUrja Rannikko2019-08-191-2/+2
| | | | | | | | | | | | | | | It seems that SYSRESET_POWER_OFF was added recently, and all previous code used SYSRESET_POWER for poweroff. SYSRESET_POWER is supposed to be a PMIC-level power cycle, not a poweroff. (Comment by Simon Glass) SYSRESET_POWER means to do a power reset (removing and reinstating all power) SYSRESET_POWER_OFF means to turn the device off and leave it off Signed-off-by: Urja Rannikko <urjaman@gmail.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@st.com> (Update comment to help understand the patch) Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
* sandbox: Exit when SYSRESET_POWER_OFF is requestedSimon Glass2019-07-101-0/+1
| | | | | | | | | At present this returns but it seems better to just exit sandbox immediately. Signed-off-by: Simon Glass <sjg@chromium.org> reset
* sandbox: sysreset: Update to support power-on resetSimon Glass2018-12-051-1/+7
| | | | | | | | | If U-Boot is started from SPL or TPL, then those earlier phases deal with the reset cause. On real hardware this cause may be lost once it is read. Emulate that behaviour in sandbox by reporting a warm reset when a previous phase has run since start-up. Signed-off-by: Simon Glass <sjg@chromium.org>
* sysreset: Add a way to find the last resetSimon Glass2018-10-091-0/+15
| | | | | | | | We have a method to return the last reset as a string for humans, but not a method that allows it to be used programmatically. Add a new method that returns the last reset as an enum. Signed-off-by: Simon Glass <sjg@chromium.org>
* test: Add tests for sysreset_get_statusMario Six2018-09-181-0/+16
| | | | | | | Add some tests for sysreset_get_status. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Mario Six <mario.six@gdsys.cc>
* SPDX: Convert all of our single license tags to Linux Kernel styleTom Rini2018-05-071-2/+1
| | | | | | | | | | | | | | | | | | | | When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
* Remove unnecessary instances of DECLARE_GLOBAL_DATA_PTRTom Rini2018-04-271-2/+0
| | | | | | | | We have a large number of places where while we historically referenced gd in the code we no longer do, as well as cases where the code added that line "just in case" during development and never dropped it. Signed-off-by: Tom Rini <trini@konsulko.com>
* dm: sandbox: sysreset: Convert driver to livetreeSimon Glass2017-06-011-1/+1
| | | | | | Update this driver to support a live device tree. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: core: Replace of_offset with accessorSimon Glass2017-02-081-1/+1
| | | | | | | | | At present devices use a simple integer offset to record the device tree node associated with the device. In preparation for supporting a live device tree, which uses a node pointer instead, refactor existing code to access this field through an inline function. Signed-off-by: Simon Glass <sjg@chromium.org>
* drivers/sysreset: group sysreset driversMax Filippov2016-08-121-0/+101
Create drivers/sysreset and move sysreset-uclass and all sysreset drivers there. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>