mirror of
https://github.com/apache/nuttx.git
synced 2026-05-26 18:56:10 +08:00
!boards: Remove NSH_ARCHINIT and board_app_initialize
BREAKING: In an effort to simplify NuttX initialization, NSH_ARCHINIT is removed. board_app_initialize is also removed. BOARD_LATE_INITIALIZE now performs all board initialization logic, and is by default enabled. All references to these symbols are removed. BOARDIOC_INIT remains, but will result in -ENOTTY when called. It is to be removed in a later commit. Quick fix: Boards relying on NSH_ARCHINIT should now enable CONFIG_BOARD_LATE_INITIALIZE instead. If the application needs fine-grained control over board initialization from userspace, the logic performed by BOARDIOC_INIT may be copied to the board_finalinitialize function and used instead via BOARDIOC_FINALINIT. All board_app_initialize logic provided by NuttX is now moved to board_late_initialize, and the same should be done for out-of-tree boards. Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
This commit is contained in:
@@ -169,33 +169,6 @@ void board_early_initialize(void);
|
||||
void board_late_initialize(void);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: board_app_initialize
|
||||
*
|
||||
* Description:
|
||||
* Perform application specific initialization. This function is never
|
||||
* called directly from application code, but only indirectly via the
|
||||
* (non-standard) boardctl() interface using the command BOARDIOC_INIT.
|
||||
*
|
||||
* Input Parameters:
|
||||
* arg - The boardctl() argument is passed to the board_app_initialize()
|
||||
* implementation without modification. The argument has no
|
||||
* meaning to NuttX; the meaning of the argument is a contract
|
||||
* between the board-specific initialization logic and the
|
||||
* matching application logic. The value could be such things as a
|
||||
* mode enumeration value, a set of DIP switch switch settings, a
|
||||
* pointer to configuration data read from a file or serial FLASH,
|
||||
* or whatever you would like to do with it. Every implementation
|
||||
* should accept zero/NULL as a default configuration.
|
||||
*
|
||||
* Returned Value:
|
||||
* Zero (OK) is returned on success; a negated errno value is returned on
|
||||
* any failure to indicate the nature of the failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int board_app_initialize(uintptr_t arg);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: board_app_finalinitialize
|
||||
*
|
||||
|
||||
@@ -60,23 +60,6 @@
|
||||
****************************************************************************/
|
||||
|
||||
/* Common commands
|
||||
*
|
||||
* CMD: BOARDIOC_INIT
|
||||
* DESCRIPTION: Perform one-time application initialization.
|
||||
* ARG: The boardctl() argument is passed to the
|
||||
* board_app_initialize() implementation without modification.
|
||||
* The argument has no meaning to NuttX; the meaning of the
|
||||
* argument is a contract between the board-specific
|
||||
* initialization logic and the matching application logic.
|
||||
* The value could be such things as a mode enumeration value,
|
||||
* a set of DIP switch switch settings, a pointer to
|
||||
* configuration data read from a file or serial FLASH, or
|
||||
* whatever you would like to do with it. Every
|
||||
* implementation should accept zero/NULL as a default
|
||||
* configuration.
|
||||
* CONFIGURATION: CONFIG_BOARDCTL
|
||||
* DEPENDENCIES: Board logic must provide board_app_initialize()
|
||||
*
|
||||
* CMD: BOARDIOC_POWEROFF
|
||||
* DESCRIPTION: Power off the board
|
||||
* ARG: Integer value providing power off status information
|
||||
|
||||
Reference in New Issue
Block a user