board/qemu-armv7a: add board_power_off
This allows to power off qemu-armv7a target via NSH `quit` command. Signed-off-by: Yanfeng Liu <p-liuyanfeng9@xiaomi.com>
This commit is contained in:
parent
3e6649856b
commit
5f1a2696b3
1 changed files with 11 additions and 0 deletions
|
@ -24,6 +24,7 @@
|
|||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/config.h>
|
||||
#include <stdint.h>
|
||||
#include <nuttx/board.h>
|
||||
|
@ -113,3 +114,13 @@ void board_late_initialize(void)
|
|||
qemu_bringup();
|
||||
}
|
||||
#endif /* CONFIG_BOARD_LATE_INITIALIZE */
|
||||
|
||||
#if defined(CONFIG_BOARDCTL_POWEROFF) && defined(CONFIG_ARM_PSCI)
|
||||
int board_power_off(int status)
|
||||
{
|
||||
UNUSED(status);
|
||||
|
||||
up_systempoweroff();
|
||||
return 0;
|
||||
}
|
||||
#endif
|
Loading…
Reference in a new issue