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:
Yanfeng Liu 2025-01-06 15:19:48 +08:00 committed by Xiang Xiao
parent 3e6649856b
commit 5f1a2696b3

View file

@ -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