summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAntony Pavlov <antonynpavlov@gmail.com>2018-01-22 13:01:31 +0300
committerSascha Hauer <s.hauer@pengutronix.de>2018-01-25 08:13:47 +0100
commit38984530b741b1421815e432f92e49f33564ec4a (patch)
tree3fae644cb65ea5f56deff70b93e6a583341fabb6 /arch
parent7c74d60baed1deb3b23ed13c184344b59348dc15 (diff)
downloadbarebox-38984530b741b1421815e432f92e49f33564ec4a.tar.gz
barebox-38984530b741b1421815e432f92e49f33564ec4a.tar.xz
sandbox: use 'poweroff' command for exit
The 'poweroff' command is more appropriate for exit barebox than 'reset'. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/sandbox/board/Makefile2
-rw-r--r--arch/sandbox/board/poweroff.c17
-rw-r--r--arch/sandbox/board/restart.c17
-rw-r--r--arch/sandbox/configs/sandbox_defconfig2
4 files changed, 19 insertions, 19 deletions
diff --git a/arch/sandbox/board/Makefile b/arch/sandbox/board/Makefile
index 333638ced6..b6c271c858 100644
--- a/arch/sandbox/board/Makefile
+++ b/arch/sandbox/board/Makefile
@@ -4,6 +4,6 @@ obj-y += hostfile.o
obj-y += console.o
obj-y += devices.o
obj-y += dtb.o
-obj-y += restart.o
+obj-y += poweroff.o
extra-y += barebox.lds
diff --git a/arch/sandbox/board/poweroff.c b/arch/sandbox/board/poweroff.c
new file mode 100644
index 0000000000..6b5a6dff15
--- /dev/null
+++ b/arch/sandbox/board/poweroff.c
@@ -0,0 +1,17 @@
+#include <common.h>
+#include <init.h>
+#include <poweroff.h>
+#include <mach/linux.h>
+
+static void sandbox_poweroff(struct poweroff_handler *poweroff)
+{
+ linux_exit();
+}
+
+static int poweroff_register_feature(void)
+{
+ poweroff_handler_register_fn(sandbox_poweroff);
+
+ return 0;
+}
+coredevice_initcall(poweroff_register_feature);
diff --git a/arch/sandbox/board/restart.c b/arch/sandbox/board/restart.c
deleted file mode 100644
index 79bf79a556..0000000000
--- a/arch/sandbox/board/restart.c
+++ /dev/null
@@ -1,17 +0,0 @@
-#include <common.h>
-#include <init.h>
-#include <restart.h>
-#include <mach/linux.h>
-
-static void sandbox_restart_cpu(struct restart_handler *restart)
-{
- linux_exit();
-}
-
-static int restart_register_feature(void)
-{
- restart_handler_register_fn(sandbox_restart_cpu);
-
- return 0;
-}
-coredevice_initcall(restart_register_feature);
diff --git a/arch/sandbox/configs/sandbox_defconfig b/arch/sandbox/configs/sandbox_defconfig
index dbaff12bfb..12b2479435 100644
--- a/arch/sandbox/configs/sandbox_defconfig
+++ b/arch/sandbox/configs/sandbox_defconfig
@@ -13,7 +13,6 @@ CONFIG_CMD_IMD=y
CONFIG_CMD_MEMINFO=y
# CONFIG_CMD_BOOTM is not set
CONFIG_CMD_GO=y
-CONFIG_CMD_RESET=y
CONFIG_CMD_UIMAGE=y
CONFIG_CMD_PARTITION=y
CONFIG_CMD_EXPORT=y
@@ -53,6 +52,7 @@ CONFIG_CMD_CRC_CMP=y
CONFIG_CMD_MM=y
CONFIG_CMD_DETECT=y
CONFIG_CMD_FLASH=y
+CONFIG_CMD_POWEROFF=y
CONFIG_CMD_2048=y
CONFIG_CMD_OF_NODE=y
CONFIG_CMD_OF_PROPERTY=y