aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-stm32mp
diff options
context:
space:
mode:
authorUrja Rannikko <urjaman@gmail.com>2019-05-16 21:48:42 +0000
committerKever Yang <kever.yang@rock-chips.com>2019-08-19 12:43:26 +0800
commitb8050511c6ee4ab60ef4248dff42aff187696249 (patch)
tree01e451f3b985b4b14b79c4b45b94b26845eb3dc9 /arch/arm/mach-stm32mp
parent857f39d7b09804566b23e0f20fcb04601f2ecb52 (diff)
downloadu-boot-b8050511c6ee4ab60ef4248dff42aff187696249.tar.gz
sysreset: move stm32mp sysreset poweroff implementation to sysreset uclass
This is a generic implementation. Add CONFIG_SYSRESET_CMD_POWEROFF to signal when we need it. Enable it from the STPMIC1 config and in sandbox. The config flag is transitionary, that is it can be removed after all poweroff implementations use sysreset, and just have CMD_POWEROFF depend on sysreset. Signed-off-by: Urja Rannikko <urjaman@gmail.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@st.com> Tested-by: Patrick Delaunay <patrick.delaunay@st.com>
Diffstat (limited to 'arch/arm/mach-stm32mp')
-rw-r--r--arch/arm/mach-stm32mp/Makefile3
-rw-r--r--arch/arm/mach-stm32mp/cmd_poweroff.c24
2 files changed, 0 insertions, 27 deletions
diff --git a/arch/arm/mach-stm32mp/Makefile b/arch/arm/mach-stm32mp/Makefile
index 77450604b0f..ad5fd46ccda 100644
--- a/arch/arm/mach-stm32mp/Makefile
+++ b/arch/arm/mach-stm32mp/Makefile
@@ -12,9 +12,6 @@ obj-y += spl.o
else
obj-y += bsec.o
obj-$(CONFIG_CMD_STM32KEY) += cmd_stm32key.o
-ifndef CONFIG_STM32MP1_TRUSTED
-obj-$(CONFIG_SYSRESET) += cmd_poweroff.o
-endif
endif
obj-$(CONFIG_ARMV7_PSCI) += psci.o
obj-$(CONFIG_$(SPL_)DM_REGULATOR) += pwr_regulator.o
diff --git a/arch/arm/mach-stm32mp/cmd_poweroff.c b/arch/arm/mach-stm32mp/cmd_poweroff.c
deleted file mode 100644
index 62347425a06..00000000000
--- a/arch/arm/mach-stm32mp/cmd_poweroff.c
+++ /dev/null
@@ -1,24 +0,0 @@
-// 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_OFF);
-
- if (ret == -EINPROGRESS)
- mdelay(1000);
-
- /*NOTREACHED when power off*/
- return CMD_RET_FAILURE;
-}