samsung: tizen_amlogic: increase ramdisk size from 8M to 32M
[platform/kernel/u-boot.git] / cmd / poweroff.c
1 /*
2  * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved.
3  * Przemyslaw Marczak <p.marczak@samsung.com>
4  *
5  * Power off command
6  *
7  * SPDX-License-Identifier:     GPL-2.0+
8  */
9
10 #include <common.h>
11 #include <command.h>
12
13 /*
14  * Power off the board by simple command
15  * This requires implementation of function board_poweroff() which is declared
16  * in include/common.h
17  *
18  * Implementation of board_poweroff() should:
19  * 1.a. turn off the device
20  *      or
21  * 1.b. print info to user about turn off ability as it is in few boards
22  * 2.   never back to caller
23  */
24 int do_poweroff(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
25 {
26         if (argc != 2)
27                 return CMD_RET_USAGE;
28
29         if (!strcmp("off", argv[1])) {
30                 board_poweroff();
31                 /* This function should not back here */
32                 return CMD_RET_SUCCESS;
33         }
34
35         return CMD_RET_USAGE;
36 }