From b8050511c6ee4ab60ef4248dff42aff187696249 Mon Sep 17 00:00:00 2001 From: Urja Rannikko Date: Thu, 16 May 2019 21:48:42 +0000 Subject: 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 Reviewed-by: Patrice Chotard Reviewed-by: Patrick Delaunay Tested-by: Patrick Delaunay --- arch/arm/mach-stm32mp/cmd_poweroff.c | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 arch/arm/mach-stm32mp/cmd_poweroff.c (limited to 'arch/arm/mach-stm32mp/cmd_poweroff.c') 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 -#include -#include - -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; -} -- cgit v1.2.3