diff options
author | Patrick Delaunay <patrick.delaunay@st.com> | 2019-04-18 18:16:21 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-04-27 01:58:22 +0300 |
commit | 50fd31fd7781e979254af49efcbc1fbb4882a751 (patch) | |
tree | 43f05c4ad90b596e5d2c1f04a1f8c619e7d6e8da /drivers/sysreset/sysreset_syscon.c | |
parent | 9ad996adcc135bc34b185957567c8c46deb90d4f (diff) | |
download | u-boot-50fd31fd7781e979254af49efcbc1fbb4882a751.tar.xz |
sysreset: syscon: remove POWER reset cause
The sysreset of 'POWER' type is a PMIC reset defined as
'remove and restore power'.
So normally only COLD/WARN is supported by sysreset_syscon.
This modification allows to use the function sysreset_walk(SYSRESET_POWER)
when it is supported by PMIC driver (see example in stpmic1).
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Diffstat (limited to 'drivers/sysreset/sysreset_syscon.c')
-rw-r--r-- | drivers/sysreset/sysreset_syscon.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/sysreset/sysreset_syscon.c b/drivers/sysreset/sysreset_syscon.c index 3fb39b9952..1028160247 100644 --- a/drivers/sysreset/sysreset_syscon.c +++ b/drivers/sysreset/sysreset_syscon.c @@ -24,6 +24,9 @@ static int syscon_reboot_request(struct udevice *dev, enum sysreset_t type) { struct syscon_reboot_priv *priv = dev_get_priv(dev); + if (type == SYSRESET_POWER) + return -EPROTONOSUPPORT; + regmap_write(priv->regmap, priv->offset, priv->mask); return -EINPROGRESS; |