mirror of
https://github.com/apache/nuttx.git
synced 2026-06-01 07:45:16 +08:00
!boards/boardctl: Remove BOARDIOC_INIT
BREAKING CHANGE: Remove BOARDIOC_INIT macro now that the interface is removed in favour of CONFIG_BOARD_LATE_INITIALIZE. Quick fix: instead of calling BOARDIOC_INIT from your application, instead enable late initialization to have it performed automatically prior to application entry. If you need custom initialization logic, use the board_final_initialize function and `BOARDIOC_FINALINIT` command instead. Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
This commit is contained in:
@@ -21,7 +21,7 @@ features:
|
||||
* **Multi-User Support** NX includes front-end logic to an NX server
|
||||
daemon that can serve multiple NX client threads. The NX sever
|
||||
thread/daemon serializes graphics operations from multiple clients.
|
||||
|
||||
|
||||
* **Minimal Graphics Toolset** The actual implementation of the graphics
|
||||
operations is performed by common, back-end logic. This back-end supports
|
||||
only a primitive set of graphic and rendering operations.
|
||||
@@ -124,16 +124,10 @@ start this daemon. There are two ways that this can be done:
|
||||
calling the function ``nxmu_start()``. The board startup logic
|
||||
usually resides the ``boards/arch/chip/board/src`` directory. The
|
||||
board startup logic can run automatically during the early system if
|
||||
``CONFIG_BOARD_LATE_INITIALIZE`` is defined in the configuration. Or,
|
||||
the board startup logic can execute under control of the application
|
||||
by calling :c:func:`boardctl` as:
|
||||
``CONFIG_BOARD_LATE_INITIALIZE`` is defined in the configuration.
|
||||
|
||||
.. code-block:: c
|
||||
|
||||
boardctl(BOARDIOC_INIT, arg)
|
||||
|
||||
The board initialization logic will run in either case and the simple
|
||||
call to ``nxmu_start()`` will start the NX server.
|
||||
The board initialization logic will run and the simple call to
|
||||
``nxmu_start()`` will start the NX server.
|
||||
|
||||
#. The NX server may also be started later by the application via
|
||||
:c:func:`boardctl` as:
|
||||
|
||||
@@ -387,14 +387,6 @@ int boardctl(unsigned int cmd, uintptr_t arg)
|
||||
|
||||
switch (cmd)
|
||||
{
|
||||
case BOARDIOC_INIT:
|
||||
{
|
||||
/* WARNING: deprecated, will be removed */
|
||||
|
||||
ret = -ENOTTY;
|
||||
}
|
||||
break;
|
||||
|
||||
#ifdef CONFIG_BOARDCTL_FINALINIT
|
||||
/* CMD: BOARDIOC_FINALINIT
|
||||
* DESCRIPTION: Perform one-time application initialization after
|
||||
|
||||
+23
-24
@@ -181,30 +181,29 @@
|
||||
* DEPENDENCIES: Board logic must provide the board_reset_cause() interface.
|
||||
*/
|
||||
|
||||
#define BOARDIOC_INIT _BOARDIOC(0x0001)
|
||||
#define BOARDIOC_FINALINIT _BOARDIOC(0x0002)
|
||||
#define BOARDIOC_POWEROFF _BOARDIOC(0x0003)
|
||||
#define BOARDIOC_RESET _BOARDIOC(0x0004)
|
||||
#define BOARDIOC_PM_CONTROL _BOARDIOC(0x0005)
|
||||
#define BOARDIOC_UNIQUEID _BOARDIOC(0x0006)
|
||||
#define BOARDIOC_MKRD _BOARDIOC(0x0007)
|
||||
#define BOARDIOC_ROMDISK _BOARDIOC(0x0008)
|
||||
#define BOARDIOC_APP_SYMTAB _BOARDIOC(0x0009)
|
||||
#define BOARDIOC_OS_SYMTAB _BOARDIOC(0x000a)
|
||||
#define BOARDIOC_BUILTINS _BOARDIOC(0x000b)
|
||||
#define BOARDIOC_USBDEV_CONTROL _BOARDIOC(0x000c)
|
||||
#define BOARDIOC_NX_START _BOARDIOC(0x000d)
|
||||
#define BOARDIOC_VNC_START _BOARDIOC(0x000e)
|
||||
#define BOARDIOC_NXTERM _BOARDIOC(0x000f)
|
||||
#define BOARDIOC_NXTERM_IOCTL _BOARDIOC(0x0010)
|
||||
#define BOARDIOC_SPINLOCK _BOARDIOC(0x0011)
|
||||
#define BOARDIOC_UNIQUEKEY _BOARDIOC(0x0012)
|
||||
#define BOARDIOC_SWITCH_BOOT _BOARDIOC(0x0013)
|
||||
#define BOARDIOC_BOOT_IMAGE _BOARDIOC(0x0014)
|
||||
#define BOARDIOC_RESET_CAUSE _BOARDIOC(0x0015)
|
||||
#define BOARDIOC_IRQ_AFFINITY _BOARDIOC(0x0016)
|
||||
#define BOARDIOC_START_CPU _BOARDIOC(0x0017)
|
||||
#define BOARDIOC_MACADDR _BOARDIOC(0x0018)
|
||||
#define BOARDIOC_FINALINIT _BOARDIOC(0x0001)
|
||||
#define BOARDIOC_POWEROFF _BOARDIOC(0x0002)
|
||||
#define BOARDIOC_RESET _BOARDIOC(0x0003)
|
||||
#define BOARDIOC_PM_CONTROL _BOARDIOC(0x0004)
|
||||
#define BOARDIOC_UNIQUEID _BOARDIOC(0x0005)
|
||||
#define BOARDIOC_MKRD _BOARDIOC(0x0006)
|
||||
#define BOARDIOC_ROMDISK _BOARDIOC(0x0007)
|
||||
#define BOARDIOC_APP_SYMTAB _BOARDIOC(0x0008)
|
||||
#define BOARDIOC_OS_SYMTAB _BOARDIOC(0x0009)
|
||||
#define BOARDIOC_BUILTINS _BOARDIOC(0x000a)
|
||||
#define BOARDIOC_USBDEV_CONTROL _BOARDIOC(0x000b)
|
||||
#define BOARDIOC_NX_START _BOARDIOC(0x000c)
|
||||
#define BOARDIOC_VNC_START _BOARDIOC(0x000d)
|
||||
#define BOARDIOC_NXTERM _BOARDIOC(0x000e)
|
||||
#define BOARDIOC_NXTERM_IOCTL _BOARDIOC(0x000f)
|
||||
#define BOARDIOC_SPINLOCK _BOARDIOC(0x0010)
|
||||
#define BOARDIOC_UNIQUEKEY _BOARDIOC(0x0011)
|
||||
#define BOARDIOC_SWITCH_BOOT _BOARDIOC(0x0012)
|
||||
#define BOARDIOC_BOOT_IMAGE _BOARDIOC(0x0013)
|
||||
#define BOARDIOC_RESET_CAUSE _BOARDIOC(0x0014)
|
||||
#define BOARDIOC_IRQ_AFFINITY _BOARDIOC(0x0015)
|
||||
#define BOARDIOC_START_CPU _BOARDIOC(0x0016)
|
||||
#define BOARDIOC_MACADDR _BOARDIOC(0x0017)
|
||||
|
||||
/* If CONFIG_BOARDCTL_IOCTL=y, then board-specific commands will be support.
|
||||
* In this case, all commands not recognized by boardctl() will be forwarded
|
||||
|
||||
Reference in New Issue
Block a user