diff options
author | Tom Rini <trini@konsulko.com> | 2019-04-12 15:43:19 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-04-12 15:43:19 -0400 |
commit | 015289580f81733f7358227743e3e5881653a797 (patch) | |
tree | beca1eea1bfa7b4e4740b9e7a08493711b7b8bee /arch/arm/mach-stm32mp/cmd_poweroff.c | |
parent | dd758c6720266c9b7bcd8d0da91a64a2fa1e181a (diff) | |
parent | 7bb75023a720432a32840c6df543aae92653b23d (diff) |
Merge tag 'u-boot-stm32-20190412' of https://github.com/patrickdelaunay/u-boot
stm32 patches for v2019.07-rc1
- Add trusted boot with TF-A for stm32mp1
- stm32mp1 dts files sync'ed with Linux version
- add STM32MP1 Discovery boards (DK1 and DK2)
- add STMFX gpio expander driver
- misc improvement for stm3mp1 supports
- rename stpmu1 to stpmic1 (official name)
- stm32_qspi: move to exec_op (spi nor driver for stm32 mpu and mcu)
- add STM32 FMC2 NAND flash controller driver
Diffstat (limited to 'arch/arm/mach-stm32mp/cmd_poweroff.c')
-rw-r--r-- | arch/arm/mach-stm32mp/cmd_poweroff.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/arch/arm/mach-stm32mp/cmd_poweroff.c b/arch/arm/mach-stm32mp/cmd_poweroff.c new file mode 100644 index 0000000000..f54dd1daf2 --- /dev/null +++ b/arch/arm/mach-stm32mp/cmd_poweroff.c @@ -0,0 +1,24 @@ +// SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause +/* + * Copyright (C) 2019, STMicroelectronics - All Rights Reserved + */ + +#include <common.h> +#include <command.h> +#include <sysreset.h> + +int do_poweroff(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +{ + int ret; + + puts("poweroff ...\n"); + mdelay(100); + + ret = sysreset_walk(SYSRESET_POWER); + + if (ret == -EINPROGRESS) + mdelay(1000); + + /*NOTREACHED when power off*/ + return CMD_RET_FAILURE; +} |