aboutsummaryrefslogtreecommitdiff
path: root/drivers/sysreset
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2019-07-14 09:09:49 -0400
committerTom Rini <trini@konsulko.com>2019-07-14 09:09:49 -0400
commita9a3a37f92b072a56693ad665ab4c5cc73028d16 (patch)
treed0a4e94e94d77ba06983abbe4b89d2c39a0c5d7f /drivers/sysreset
parent6070ef409c1018860e8dd1f077297546d9d80115 (diff)
parent291f00bb3ea7e9f9acdddbe680991e76313732d6 (diff)
downloadu-boot-a9a3a37f92b072a56693ad665ab4c5cc73028d16.zip
u-boot-a9a3a37f92b072a56693ad665ab4c5cc73028d16.tar.gz
u-boot-a9a3a37f92b072a56693ad665ab4c5cc73028d16.tar.bz2
Merge tag 'u-boot-stm32-20190712' of https://gitlab.denx.de/u-boot/custodians/u-boot-stm
- syscon: add support for power off - stm32mp1: add op-tee config - stm32mp1: add specific commands: stboard and stm32key - add stm32 mailbox driver - solve many stm32 warnings when building with W=1 - update stm32 gpio driver
Diffstat (limited to 'drivers/sysreset')
-rw-r--r--drivers/sysreset/sysreset_syscon.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/sysreset/sysreset_syscon.c b/drivers/sysreset/sysreset_syscon.c
index 1028160..d0e586f 100644
--- a/drivers/sysreset/sysreset_syscon.c
+++ b/drivers/sysreset/sysreset_syscon.c
@@ -23,8 +23,9 @@ struct syscon_reboot_priv {
static int syscon_reboot_request(struct udevice *dev, enum sysreset_t type)
{
struct syscon_reboot_priv *priv = dev_get_priv(dev);
+ ulong driver_data = dev_get_driver_data(dev);
- if (type == SYSRESET_POWER)
+ if (type != driver_data)
return -EPROTONOSUPPORT;
regmap_write(priv->regmap, priv->offset, priv->mask);
@@ -53,7 +54,8 @@ int syscon_reboot_probe(struct udevice *dev)
}
static const struct udevice_id syscon_reboot_ids[] = {
- { .compatible = "syscon-reboot" },
+ { .compatible = "syscon-reboot", .data = SYSRESET_COLD },
+ { .compatible = "syscon-poweroff", .data = SYSRESET_POWER_OFF },
{ /* sentinel */ }
};