forked from xuos/xiuos
support reboot on xidatong
This commit is contained in:
parent
4d898f8210
commit
49eaf5fc10
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 */
|
Loading…
Reference in New Issue