diff --git a/configs/Kconfig b/configs/Kconfig index 86c9e9725a..fe6b913150 100644 --- a/configs/Kconfig +++ b/configs/Kconfig @@ -1328,21 +1328,26 @@ config NSH_MMCSDMINOR default 0 depends on NSH_LIBRARY && MMCSD ---help--- - If board-specific NSH start-up logic needs to mount an MMC/SD device, then the setting should be provided to identify the MMC/SD minor device number (i.e., the N in /dev/mmcsdN). Default 0 + If board-specific NSH start-up logic needs to mount an MMC/SD device, then the + setting should be provided to identify the MMC/SD minor device number (i.e., the N ini + /dev/mmcsdN). Default 0 config NSH_MMCSDSLOTNO int "MMC/SD slot number" default 0 depends on NSH_LIBRARY && MMCSD ---help--- - If board-specific NSH start-up supports more than one MMC/SD slot, then this setting should be provided to indicate which slot should be used. Default: 0. + If board-specific NSH start-up supports more than one MMC/SD slot, then this setting + should be provided to indicate which slot should be used. Default: 0. config NSH_MMCSDSPIPORTNO int "MMC/SD SPI device number" default 0 depends on NSH_LIBRARY && MMCSD && MMCSD_SPI ---help--- - If board-specif NSH start-up logic will mount an SPI-based MMC/SD volume, then this setting may be needed to tell the board logic which SPI bus to use. Default: 0 (meaning is board-specific). + If board-specif NSH start-up logic will mount an SPI-based MMC/SD volume, then this + setting may be needed to tell the board logic which SPI bus to use. Default: 0 + (meaning is board-specific). comment "Board-Specific Options" @@ -1672,12 +1677,21 @@ config LIB_BOARDCTL if LIB_BOARDCTL config BOARDCTL_POWEROFF - bool "Enable power off command" + bool "Enable power off interfaces" default n depends on ARCH_HAVE_POWEROFF ---help--- Enables support for the BOARDIOC_POWEROFF boardctl() command. - Architecture specific logic must provide board_power_off() + Architecture specific logic must provide the board_power_off() + interface. + +config BOARDCTL_RESET + bool "Enable reset interfaces" + default n + depends on ARCH_HAVE_RESET + ---help--- + Enables support for the BOARDIOC_RESET boardctl() command. + Architecture specific logic must provide the board_reset() interface. config BOARDCTL_TSCTEST diff --git a/configs/boardctl.c b/configs/boardctl.c index 2b8a0860fe..3eaf6a4b5d 100644 --- a/configs/boardctl.c +++ b/configs/boardctl.c @@ -114,6 +114,21 @@ int boardctl(unsigned int cmd, uintptr_t arg) break; #endif +#ifdef CONFIG_BOARDCTL_RESET + /* CMD: BOARDIOC_RESET + * DESCRIPTION: Reset the board + * ARG: Integer value providing power off status information + * CONFIGURATION: CONFIG_BOARDCTL_RESET + * DEPENDENCIES: Board logic must provide board_reset + */ + + case BOARDIOC_RESET: + { + ret = board_reset((int)arg); + } + break; +#endif + #ifdef CONFIG_BOARDCTL_TSCTEST /* CMD: BOARDIOC_TSCTEST_SETUP * DESCRIPTION: Touchscreen controller test configuration