support reboot on xidatong

This commit is contained in:
wgzAIIT 2022-04-29 13:39:03 +08:00
parent 4d898f8210
commit 49eaf5fc10
9 changed files with 72 additions and 0 deletions

View File

@ -65,4 +65,5 @@ CONFIG_READLINE_TABCOMPLETION=y
CONFIG_FS_ROMFS=y
CONFIG_NSH_ROMFSETC=y
CONFIG_NSH_ARCHROMFS=y
CONFIG_BOARDCTL_RESET=y
CONFIG_USER_ENTRYPOINT="nsh_main"

View File

@ -54,4 +54,5 @@ CONFIG_READLINE_TABCOMPLETION=y
CONFIG_FS_ROMFS=y
CONFIG_NSH_ROMFSETC=y
CONFIG_NSH_ARCHROMFS=y
CONFIG_BOARDCTL_RESET=y
CONFIG_USER_ENTRYPOINT="nsh_main"

View File

@ -53,4 +53,5 @@ CONFIG_READLINE_TABCOMPLETION=y
CONFIG_FS_ROMFS=y
CONFIG_NSH_ROMFSETC=y
CONFIG_NSH_ARCHROMFS=y
CONFIG_BOARDCTL_RESET=y
CONFIG_USER_ENTRYPOINT="nsh_main"

View File

@ -76,4 +76,5 @@ CONFIG_READLINE_TABCOMPLETION=y
CONFIG_FS_ROMFS=y
CONFIG_NSH_ROMFSETC=y
CONFIG_NSH_ARCHROMFS=y
CONFIG_BOARDCTL_RESET=y
CONFIG_USER_ENTRYPOINT="nsh_main"

View File

@ -51,4 +51,5 @@ CONFIG_READLINE_TABCOMPLETION=y
CONFIG_FS_ROMFS=y
CONFIG_NSH_ROMFSETC=y
CONFIG_NSH_ARCHROMFS=y
CONFIG_BOARDCTL_RESET=y
CONFIG_USER_ENTRYPOINT="nsh_main"

View File

@ -72,4 +72,5 @@ CONFIG_READLINE_TABCOMPLETION=y
CONFIG_FS_ROMFS=y
CONFIG_NSH_ROMFSETC=y
CONFIG_NSH_ARCHROMFS=y
CONFIG_BOARDCTL_RESET=y
CONFIG_USER_ENTRYPOINT="nsh_main"

View File

@ -71,4 +71,5 @@ CONFIG_READLINE_TABCOMPLETION=y
CONFIG_FS_ROMFS=y
CONFIG_NSH_ROMFSETC=y
CONFIG_NSH_ARCHROMFS=y
CONFIG_BOARDCTL_RESET=y
CONFIG_USER_ENTRYPOINT="nsh_main"

View File

@ -32,6 +32,10 @@ else ifeq ($(CONFIG_BOARD_LATE_INITIALIZE),y)
CSRCS += imxrt_bringup.c
endif
ifeq ($(CONFIG_BOARDCTL_RESET),y)
CSRCS += imxrt_reset.c
endif
ifeq ($(CONFIG_ARCH_LEDS),y)
CSRCS += imxrt_autoleds.c
else

View File

@ -0,0 +1,61 @@
/*
* Copyright (c) 2020 AIIT XUOS Lab
* XiOS is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
* See the Mulan PSL v2 for more details.
*/
/**
* @file imxrt_reset.c
* @brief imxrt board sd card automount
* @version 1.0
* @author AIIT XUOS Lab
* @date 2022.04.29
*/
/****************************************************************************
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#include <nuttx/board.h>
#include <nuttx/arch.h>
#ifdef CONFIG_BOARDCTL_RESET
/****************************************************************************
* Public Functions
****************************************************************************/
/****************************************************************************
* Name: board_reset
*
* Description:
* Reset board. Support for this function is required by board-level
* logic if CONFIG_BOARDCTL_RESET is selected.
*
* Input Parameters:
* status - Status information provided with the reset event. This
* meaning of this status information is board-specific. If not
* used by a board, the value zero may be provided in calls to
* board_reset().
*
* Returned Value:
* If this function returns, then it was not possible to power-off the
* board due to some constraints. The return value int this case is a
* board-specific reason for the failure to shutdown.
*
****************************************************************************/
int board_reset(int status)
{
up_systemreset();
return 0;
}
#endif /* CONFIG_BOARDCTL_RESET */