sandbox: use 'poweroff' command for exit
PATCH 1/1 sandbox: use 'poweroff' command for exit
The 'poweroff' command is more appropriate for exit barebox than 'reset'.
--- arch/sandbox/board/Makefile | 2 +- arch/sandbox/board/poweroff.c | 17 +++++++++++++++++ arch/sandbox/board/restart.c | 17 ----------------- arch/sandbox/configs/sandbox_defconfig | 2 +- 4 files changed, 19 insertions(+), 19 deletions(-) create mode 100644 arch/sandbox/board/poweroff.c delete mode 100644 arch/sandbox/board/restart.c
arch/sandbox/board/Makefile +1 -1
@@ -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
arch/sandbox/board/poweroff.c new file +17 -0
@@ -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);
arch/sandbox/board/restart.c deleted +0 -17
@@ -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);
arch/sandbox/configs/sandbox_defconfig +1 -1
@@ -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
Signature · 7 lines
2.15.1 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Hi Antony
Quoted 2 lines · Antony Pavlov
The 'poweroff' command is more appropriate for exit barebox than 'reset'.
Changelog says "reset" but code says "restart".
Could the restart command be useful for others than sandbox? In other words, is it correct to delete this command?
Sam
Quoted 1 line
arch/sandbox/board/restart.c | 17 -----------------
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Quoted 7 lines · On Mon, 22 Jan 2018 14:40:20 +0100 Sam Ravnborg <[email protected]> wrote:
Hi Antony
Quoted 2 lines · Antony Pavlov
The 'poweroff' command is more appropriate for exit barebox than 'reset'.
Changelog says "reset" but code says "restart".
The command name is 'reset'.
No matter what is the file's name.
I can't see 'restart' command in barebox mainline master branch.
Quoted 2 lines
Could the restart command be useful for others than sandbox? In other words, is it correct to delete this command?
I see no reason for dropping 'reset' command. Sometimes 'reset' and 'poweroff' commands are very handy.
Quoted 4 lines
Sam
Quoted 1 line
arch/sandbox/board/restart.c | 17 -----------------
Signature · 7 lines
Best regards, Antony Pavlov _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Quoted 6 lines · Antony Pavlov
Quoted 3 lines · On Mon, 22 Jan 2018 14:40:20 +0100 Sam Ravnborg <[email protected]> wrote:
Hi Antony
On Mon, Jan 22, 2018 at 01:01:31PM +0300, Antony Pavlov wrote:
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
The 'poweroff' command is more appropriate for exit barebox than 'reset'.
Changelog says "reset" but code says "restart".
The command name is 'reset'.
No matter what is the file's name.
I can't see 'restart' command in barebox mainline master branch.
Sorry - I messed it up somehow.
The changelog said command and I did not see that this was not a barebox command but a board thing.
So everything looks fine.
This is what happens writing mails with some lingering flu I guess.
Sam
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Sascha Hauer
AppliedQuoted 4 lines · Antony Pavlov
The 'poweroff' command is more appropriate for exit barebox than 'reset'.
Signed-off-by Antony Pavlov <[email protected]>
Quoted 8 lines
--- arch/sandbox/board/Makefile | 2 +- arch/sandbox/board/poweroff.c | 17 +++++++++++++++++ arch/sandbox/board/restart.c | 17 ----------------- arch/sandbox/configs/sandbox_defconfig | 2 +- 4 files changed, 19 insertions(+), 19 deletions(-) create mode 100644 arch/sandbox/board/poweroff.c delete mode 100644 arch/sandbox/board/restart.c
Applied, thanks
Sascha
Quoted 83 lines
arch/sandbox/board/Makefile +1
-1@@ -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.ldsarch/sandbox/board/poweroff.c new file +17
-0@@ -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);arch/sandbox/board/restart.c deleted +0
-17@@ -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);arch/sandbox/configs/sandbox_defconfig +1
-1@@ -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=ySignature · 1 line
2.15.1
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox