ARM: socfpga: use the pl310 driver to configure the cache
[oweals/u-boot.git] / arch / arm / mach-stm32mp / cmd_poweroff.c
1 // SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
2 /*
3  * Copyright (C) 2019, STMicroelectronics - All Rights Reserved
4  */
5
6 #include <common.h>
7 #include <command.h>
8 #include <sysreset.h>
9
10 int do_poweroff(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
11 {
12         int ret;
13
14         puts("poweroff ...\n");
15         mdelay(100);
16
17         ret = sysreset_walk(SYSRESET_POWER);
18
19         if (ret == -EINPROGRESS)
20                 mdelay(1000);
21
22         /*NOTREACHED when power off*/
23         return CMD_RET_FAILURE;
24 }