mirror of
https://github.com/apache/nuttx.git
synced 2026-05-09 23:12:17 +08:00
boards/x86_64: Replace board_app_initialize
Replaced board_app_initialize logic with board_late_initialize. Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
This commit is contained in:
@@ -20,11 +20,7 @@
|
||||
#
|
||||
# ##############################################################################
|
||||
|
||||
set(SRCS qemu_boot.c qemu_bringup.c qemu_net.c)
|
||||
|
||||
if(CONFIG_BOARDCTL)
|
||||
list(APPEND SRCS qemu_appinit.c)
|
||||
endif()
|
||||
set(SRCS qemu_boot.c qemu_bringup.c qemu_net.c qemu_boardinit.c)
|
||||
|
||||
if(CONFIG_BOARDCTL_RESET)
|
||||
list(APPEND SRCS qemu_reset.c)
|
||||
|
||||
@@ -22,13 +22,9 @@
|
||||
|
||||
include $(TOPDIR)/Make.defs
|
||||
|
||||
CSRCS = qemu_boot.c qemu_bringup.c qemu_net.c
|
||||
CSRCS = qemu_boot.c qemu_bringup.c qemu_net.c qemu_boardinit.c
|
||||
CSRCS += $(if $(wildcard romfs_boot.c), romfs_boot.c, romfs_stub.c)
|
||||
|
||||
ifeq ($(CONFIG_BOARDCTL),y)
|
||||
CSRCS += qemu_appinit.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_BOARDCTL_RESET),y)
|
||||
CSRCS += qemu_reset.c
|
||||
endif
|
||||
|
||||
+3
-39
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* boards/x86_64/qemu/qemu-intel64/src/qemu_appinit.c
|
||||
* boards/x86_64/qemu/qemu-intel64/src/qemu_boardinit.c
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
@@ -54,44 +54,6 @@
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* 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)
|
||||
{
|
||||
#ifdef CONFIG_BOARD_LATE_INITIALIZE
|
||||
/* Board initialization already performed by board_late_initialize() */
|
||||
|
||||
return OK;
|
||||
#else
|
||||
/* Perform board-specific initialization */
|
||||
|
||||
return qemu_bringup();
|
||||
#endif
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: board_late_initialize
|
||||
*
|
||||
@@ -111,6 +73,7 @@ int board_app_initialize(uintptr_t arg)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_BOARD_LATE_INITIALIZE
|
||||
void board_late_initialize(void)
|
||||
{
|
||||
int ret = OK;
|
||||
@@ -137,3 +100,4 @@ void board_late_initialize(void)
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user