You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2026/05/02 10:37:10 UTC

(nuttx) 17/18: boards/arm: Replace board_app_initialize

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 66ae075ae88c69e801e4d2b53dae0bb74453e0c2
Author: Matteo Golin <ma...@gmail.com>
AuthorDate: Thu Feb 19 12:58:00 2026 -0500

    boards/arm: Replace board_app_initialize
    
    Replaced board_app_initialize logic with board_late_initialize.
    
    Signed-off-by: Matteo Golin <ma...@gmail.com>
---
 boards/arm/a1x/pcduino-a10/src/CMakeLists.txt      |   4 -
 boards/arm/a1x/pcduino-a10/src/Makefile            |   4 -
 boards/arm/a1x/pcduino-a10/src/a1x_appinit.c       |  80 ----
 .../arm/am335x/beaglebone-black/src/CMakeLists.txt |   4 -
 boards/arm/am335x/beaglebone-black/src/Makefile    |   4 -
 .../am335x/beaglebone-black/src/am335x_appinit.c   |  78 ----
 boards/arm/at32/at32f437-mini/src/Makefile         |   4 -
 boards/arm/at32/at32f437-mini/src/at32_appinit.c   |  78 ----
 boards/arm/c5471/c5471evm/src/c5471_leds.c         |  19 +
 boards/arm/csk6/csk6011a-nano/src/CMakeLists.txt   |   2 +-
 boards/arm/csk6/csk6011a-nano/src/Makefile         |   2 +-
 ...1a_nano_appinit.c => csk6011a_nano_boardinit.c} |  44 +--
 boards/arm/cxd56xx/common/src/cxd56_usbmsc.c       |   3 +-
 boards/arm/cxd56xx/spresense/src/CMakeLists.txt    |   8 +-
 boards/arm/cxd56xx/spresense/src/Make.defs         |   5 +-
 boards/arm/cxd56xx/spresense/src/cxd56_appinit.c   | 104 ------
 .../spresense/src/cxd56_boardinit.c}               |  42 +--
 boards/arm/cxd56xx/spresense/src/cxd56_ioctl.c     |   1 -
 boards/arm/dm320/ntosd-dm320/src/Makefile          |   4 -
 boards/arm/dm320/ntosd-dm320/src/dm320_appinit.c   |  68 ----
 boards/arm/eoss3/quickfeather/src/CMakeLists.txt   |   2 +-
 boards/arm/eoss3/quickfeather/src/Makefile         |   4 +-
 boards/arm/eoss3/quickfeather/src/eoss3_appinit.c  |  68 ----
 .../fvp-armv8r-aarch32/src/CMakeLists.txt          |   4 -
 .../fvp-armv8r-aarch32/src/Makefile                |   4 -
 .../fvp-armv8r-aarch32/src/fvp_appinit.c           |  75 ----
 .../gd32f4/gd32f450zk-aiotbox/src/CMakeLists.txt   |   4 +-
 boards/arm/gd32f4/gd32f450zk-aiotbox/src/Makefile  |  12 +-
 .../gd32f450zk-aiotbox/src/gd32f450z_aiotbox.h     |  20 +-
 .../gd32f450zk-aiotbox/src/gd32f4xx_appinit.c      |  73 ----
 .../arm/gd32f4/gd32f450zk-eval/src/CMakeLists.txt  |   4 +-
 boards/arm/gd32f4/gd32f450zk-eval/src/Makefile     |  12 +-
 .../gd32f4/gd32f450zk-eval/src/gd32f450z_eval.h    |   9 +-
 .../gd32f4/gd32f450zk-eval/src/gd32f4xx_appinit.c  |  73 ----
 .../arm/gd32f4/gd32f470ik-eval/src/CMakeLists.txt  |   4 +-
 boards/arm/gd32f4/gd32f470ik-eval/src/Makefile     |  12 +-
 .../gd32f4/gd32f470ik-eval/src/gd32f470i_eval.h    |   9 +-
 .../gd32f4/gd32f470ik-eval/src/gd32f4xx_appinit.c  |  73 ----
 boards/arm/gd32f4/gd32f470zk-aiotbox/src/Makefile  |  12 +-
 .../gd32f470zk-aiotbox/src/gd32f470z_aiotbox.h     |   9 +-
 .../gd32f470zk-aiotbox/src/gd32f4xx_appinit.c      |  73 ----
 boards/arm/gd32f4/gd32f470zk-eval/src/Makefile     |  12 +-
 .../gd32f4/gd32f470zk-eval/src/gd32f470z_eval.h    |   9 +-
 .../gd32f4/gd32f470zk-eval/src/gd32f4xx_appinit.c  |  73 ----
 boards/arm/ht32f491x3/esk32/include/board.h        |   2 -
 boards/arm/ht32f491x3/esk32/src/CMakeLists.txt     |   4 +-
 boards/arm/ht32f491x3/esk32/src/Makefile           |   6 +-
 .../esk32/src/{ht32_appinit.c => ht32_bringup.c}   |  13 +-
 boards/arm/imx6/sabre-6quad/src/CMakeLists.txt     |   4 -
 boards/arm/imx6/sabre-6quad/src/Makefile           |   4 -
 boards/arm/imx6/sabre-6quad/src/imx_appinit.c      |  77 ----
 boards/arm/imx9/imx93-qsb/src/CMakeLists.txt       |   4 -
 boards/arm/imx9/imx93-qsb/src/Makefile             |   4 -
 boards/arm/imx9/imx93-qsb/src/imx93_appinit.c      |  76 ----
 boards/arm/imx9/imx95-evk/src/CMakeLists.txt       |   4 -
 boards/arm/imx9/imx95-evk/src/Makefile             |   4 -
 boards/arm/imx9/imx95-evk/src/imx95_appinit.c      |  76 ----
 boards/arm/imx9/mr-navq95b/src/CMakeLists.txt      |   4 -
 boards/arm/imx9/mr-navq95b/src/Makefile            |   4 -
 boards/arm/imx9/mr-navq95b/src/imx95_appinit.c     |  76 ----
 .../arm/imxrt/arcx-socket-grid/src/CMakeLists.txt  |   9 +-
 boards/arm/imxrt/arcx-socket-grid/src/Makefile     |   7 +-
 .../imxrt/arcx-socket-grid/src/arcx-socket-grid.h  |   2 -
 .../arm/imxrt/arcx-socket-grid/src/imxrt_appinit.c |  77 ----
 boards/arm/imxrt/imxrt1020-evk/src/CMakeLists.txt  |   9 +-
 boards/arm/imxrt/imxrt1020-evk/src/Makefile        |   8 +-
 boards/arm/imxrt/imxrt1020-evk/src/imxrt_appinit.c |  77 ----
 boards/arm/imxrt/imxrt1050-evk/src/CMakeLists.txt  |   9 +-
 boards/arm/imxrt/imxrt1050-evk/src/Makefile        |   7 +-
 boards/arm/imxrt/imxrt1050-evk/src/imxrt_appinit.c |  77 ----
 boards/arm/imxrt/imxrt1060-evk/src/CMakeLists.txt  |   9 +-
 boards/arm/imxrt/imxrt1060-evk/src/Makefile        |   7 +-
 boards/arm/imxrt/imxrt1060-evk/src/imxrt_appinit.c |  90 -----
 boards/arm/imxrt/imxrt1060-evk/src/imxrt_boot.c    |  15 +
 boards/arm/imxrt/imxrt1064-evk/src/CMakeLists.txt  |   9 +-
 boards/arm/imxrt/imxrt1064-evk/src/Makefile        |   7 +-
 boards/arm/imxrt/imxrt1064-evk/src/imxrt_appinit.c |  90 -----
 boards/arm/imxrt/imxrt1064-evk/src/imxrt_boot.c    |  15 +
 boards/arm/imxrt/imxrt1170-evk/src/CMakeLists.txt  |   8 +-
 boards/arm/imxrt/imxrt1170-evk/src/Makefile        |   8 +-
 boards/arm/imxrt/imxrt1170-evk/src/imxrt_appinit.c |  90 -----
 boards/arm/imxrt/imxrt1170-evk/src/imxrt_boot.c    |  15 +
 boards/arm/imxrt/teensy-4.x/src/CMakeLists.txt     |   9 +-
 boards/arm/imxrt/teensy-4.x/src/Makefile           |   5 -
 boards/arm/imxrt/teensy-4.x/src/imxrt_appinit.c    |  98 -----
 boards/arm/imxrt/teensy-4.x/src/imxrt_boot.c       |  22 +-
 boards/arm/kinetis/freedom-k28f/src/CMakeLists.txt |   4 -
 boards/arm/kinetis/freedom-k28f/src/Makefile       |   4 -
 boards/arm/kinetis/freedom-k28f/src/k28_appinit.c  |  85 -----
 boards/arm/kinetis/freedom-k64f/src/CMakeLists.txt |   8 +-
 boards/arm/kinetis/freedom-k64f/src/Makefile       |   8 +-
 boards/arm/kinetis/freedom-k64f/src/freedom-k64f.h |   2 -
 boards/arm/kinetis/freedom-k64f/src/k64_appinit.c  |  77 ----
 boards/arm/kinetis/freedom-k64f/src/k64_usbmsc.c   |   3 +-
 boards/arm/kinetis/freedom-k66f/src/CMakeLists.txt |  11 +-
 boards/arm/kinetis/freedom-k66f/src/Makefile       |   7 +-
 boards/arm/kinetis/freedom-k66f/src/k66_appinit.c  |  77 ----
 boards/arm/kinetis/freedom-k66f/src/k66_usbmsc.c   |   3 +-
 boards/arm/kinetis/kwikstik-k40/src/CMakeLists.txt |   4 -
 boards/arm/kinetis/kwikstik-k40/src/Makefile       |   4 -
 boards/arm/kinetis/kwikstik-k40/src/k40_appinit.c  | 253 -------------
 boards/arm/kinetis/kwikstik-k40/src/k40_boot.c     | 202 ++++++++++
 boards/arm/kinetis/kwikstik-k40/src/k40_usbmsc.c   |   3 +-
 boards/arm/kinetis/teensy-3.x/src/CMakeLists.txt   |   4 -
 boards/arm/kinetis/teensy-3.x/src/Makefile         |   4 -
 boards/arm/kinetis/teensy-3.x/src/k20_appinit.c    |  82 ----
 boards/arm/kinetis/teensy-3.x/src/k20_boot.c       |  37 +-
 boards/arm/kinetis/twr-k60n512/src/CMakeLists.txt  |   4 -
 boards/arm/kinetis/twr-k60n512/src/Makefile        |   4 -
 boards/arm/kinetis/twr-k60n512/src/k60_appinit.c   | 266 -------------
 boards/arm/kinetis/twr-k60n512/src/k60_boot.c      | 213 +++++++++++
 boards/arm/kinetis/twr-k60n512/src/k60_usbmsc.c    |   3 +-
 boards/arm/kinetis/twr-k64f120m/src/CMakeLists.txt |   4 -
 boards/arm/kinetis/twr-k64f120m/src/Makefile       |   4 -
 boards/arm/kinetis/twr-k64f120m/src/k64_appinit.c  |  98 -----
 boards/arm/kinetis/twr-k64f120m/src/k64_boot.c     |  52 +++
 boards/arm/kl/freedom-kl25z/src/CMakeLists.txt     |   4 -
 boards/arm/kl/freedom-kl25z/src/Makefile           |   4 -
 boards/arm/kl/freedom-kl25z/src/kl_appinit.c       |  92 -----
 .../arm/kl/freedom-kl25z/src/kl_boardinitialize.c  |  29 +-
 boards/arm/kl/freedom-kl26z/src/CMakeLists.txt     |   4 -
 boards/arm/kl/freedom-kl26z/src/Makefile           |   4 -
 boards/arm/kl/freedom-kl26z/src/kl_appinit.c       |  83 ----
 .../arm/kl/freedom-kl26z/src/kl_boardinitialize.c  |  17 +-
 boards/arm/kl/teensy-lc/src/CMakeLists.txt         |   4 -
 boards/arm/kl/teensy-lc/src/Makefile               |   4 -
 boards/arm/kl/teensy-lc/src/kl_appinit.c           |  86 -----
 boards/arm/kl/teensy-lc/src/kl_boardinitialize.c   |  17 +-
 boards/arm/lc823450/lc823450-xgevk/src/Makefile    |   7 +-
 .../lc823450/lc823450-xgevk/src/lc823450_appinit.c | 179 ---------
 .../lc823450/lc823450-xgevk/src/lc823450_boot.c    | 104 +++++-
 .../arm/lpc17xx_40xx/lincoln60/src/CMakeLists.txt  |   4 -
 boards/arm/lpc17xx_40xx/lincoln60/src/Makefile     |   4 -
 .../lpc17xx_40xx/lincoln60/src/lpc17_40_appinit.c  |  67 ----
 .../arm/lpc17xx_40xx/lincoln60/src/lpc17_40_boot.c |  19 +
 .../lpc17xx_40xx/lpc4088-devkit/src/CMakeLists.txt |   4 -
 .../arm/lpc17xx_40xx/lpc4088-devkit/src/Makefile   |   4 -
 .../lpc4088-devkit/src/lpc17_40_appinit.c          |  78 ----
 .../lpc4088-quickstart/src/CMakeLists.txt          |   4 -
 .../lpc17xx_40xx/lpc4088-quickstart/src/Makefile   |   4 -
 .../lpc4088-quickstart/src/lpc17_40_appinit.c      |  78 ----
 .../lpcxpresso-lpc1768/src/CMakeLists.txt          |   4 -
 .../lpc17xx_40xx/lpcxpresso-lpc1768/src/Makefile   |   4 -
 .../lpcxpresso-lpc1768/src/lpc17_40_appinit.c      | 174 ---------
 .../lpcxpresso-lpc1768/src/lpc17_40_boot.c         | 126 +++++++
 boards/arm/lpc17xx_40xx/lx_cpu/src/Makefile        |   4 -
 .../arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_appinit.c |  78 ----
 .../lx_cpu/src/lpc17_40_boardinitialize.c          |  20 +
 boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_nsh.c  | 388 -------------------
 boards/arm/lpc17xx_40xx/mbed/src/CMakeLists.txt    |   4 -
 boards/arm/lpc17xx_40xx/mbed/src/Makefile          |   4 -
 .../arm/lpc17xx_40xx/mbed/src/lpc17_40_appinit.c   | 127 -------
 boards/arm/lpc17xx_40xx/mbed/src/lpc17_40_boot.c   |  80 ++++
 boards/arm/lpc17xx_40xx/mcb1700/src/CMakeLists.txt |   4 -
 boards/arm/lpc17xx_40xx/mcb1700/src/Makefile       |   4 -
 .../lpc17xx_40xx/mcb1700/src/lpc17_40_appinit.c    |  78 ----
 .../olimex-lpc1766stk/src/CMakeLists.txt           |   4 -
 .../lpc17xx_40xx/olimex-lpc1766stk/src/Makefile    |   4 -
 .../olimex-lpc1766stk/src/lpc17_40_appinit.c       |  85 -----
 .../arm/lpc17xx_40xx/open1788/src/CMakeLists.txt   |   4 -
 boards/arm/lpc17xx_40xx/open1788/src/Makefile      |   4 -
 .../lpc17xx_40xx/open1788/src/lpc17_40_appinit.c   |  78 ----
 .../arm/lpc17xx_40xx/pnev5180b/src/CMakeLists.txt  |   4 -
 boards/arm/lpc17xx_40xx/pnev5180b/src/Makefile     |   4 -
 .../lpc17xx_40xx/pnev5180b/src/lpc17_40_appinit.c  |  78 ----
 .../lpc17xx_40xx/u-blox-c027/src/CMakeLists.txt    |   4 -
 boards/arm/lpc17xx_40xx/u-blox-c027/src/Makefile   |   4 -
 .../u-blox-c027/src/lpc17_40_appinit.c             | 196 ----------
 .../lpc17xx_40xx/u-blox-c027/src/lpc17_40_boot.c   | 139 ++++++-
 .../lpc17xx_40xx/zkit-arm-1769/src/CMakeLists.txt  |   4 -
 boards/arm/lpc17xx_40xx/zkit-arm-1769/src/Makefile |   4 -
 .../zkit-arm-1769/src/lpc17_40_appinit.c           | 181 ---------
 .../lpc17xx_40xx/zkit-arm-1769/src/lpc17_40_boot.c | 130 +++++++
 boards/arm/lpc214x/mcu123-lpc214x/src/Makefile     |   6 +-
 .../src/{lpc2148_appinit.c => lpc2148_boardinit.c} |  36 +-
 .../lpc214x/mcu123-lpc214x/src/lpc2148_composite.c |   3 +-
 boards/arm/lpc214x/zp214xpa/src/Makefile           |   6 +-
 .../src/{lpc2148_appinit.c => lpc2148_boardinit.c} |  41 +-
 boards/arm/lpc2378/olimex-lpc2378/src/Makefile     |   4 -
 .../lpc2378/olimex-lpc2378/src/lpc2378_appinit.c   | 113 ------
 .../arm/lpc2378/olimex-lpc2378/src/lpc2378_leds.c  |  19 +
 boards/arm/lpc31xx/ea3131/src/Makefile             |   4 -
 boards/arm/lpc31xx/ea3131/src/lpc31_appinit.c      | 156 --------
 boards/arm/lpc31xx/ea3131/src/lpc31_boot.c         | 109 ++++++
 boards/arm/lpc31xx/ea3152/src/Makefile             |   3 -
 boards/arm/lpc31xx/ea3152/src/lpc31_appinit.c      | 156 --------
 boards/arm/lpc31xx/ea3152/src/lpc31_boot.c         | 108 ++++++
 boards/arm/lpc31xx/olimex-lpc-h3131/src/Makefile   |   4 -
 .../lpc31xx/olimex-lpc-h3131/src/lpc31_appinit.c   | 136 -------
 .../arm/lpc31xx/olimex-lpc-h3131/src/lpc31_boot.c  |  83 ++++
 boards/arm/lpc43xx/bambino-200e/src/CMakeLists.txt |   4 -
 boards/arm/lpc43xx/bambino-200e/src/Makefile       |   4 -
 .../arm/lpc43xx/bambino-200e/src/lpc43_appinit.c   | 202 ----------
 boards/arm/lpc43xx/bambino-200e/src/lpc43_boot.c   | 141 ++++++-
 .../arm/lpc43xx/lpc4330-xplorer/src/CMakeLists.txt |   4 -
 boards/arm/lpc43xx/lpc4330-xplorer/src/Makefile    |   4 -
 .../lpc43xx/lpc4330-xplorer/src/lpc43_appinit.c    | 155 --------
 .../arm/lpc43xx/lpc4330-xplorer/src/lpc43_boot.c   | 107 ++++++
 boards/arm/lpc43xx/lpc4337-ws/src/CMakeLists.txt   |   4 -
 boards/arm/lpc43xx/lpc4337-ws/src/Makefile         |   4 -
 boards/arm/lpc43xx/lpc4337-ws/src/lpc43_appinit.c  | 144 -------
 boards/arm/lpc43xx/lpc4337-ws/src/lpc43_boot.c     |  99 +++++
 boards/arm/lpc43xx/lpc4357-evb/src/CMakeLists.txt  |   4 -
 boards/arm/lpc43xx/lpc4357-evb/src/Makefile        |   4 -
 boards/arm/lpc43xx/lpc4357-evb/src/lpc43_appinit.c | 155 --------
 boards/arm/lpc43xx/lpc4357-evb/src/lpc43_boot.c    | 105 ++++++
 .../arm/lpc43xx/lpc4370-link2/src/CMakeLists.txt   |   4 -
 boards/arm/lpc43xx/lpc4370-link2/src/Makefile      |   4 -
 .../arm/lpc43xx/lpc4370-link2/src/lpc43_appinit.c  | 143 -------
 boards/arm/lpc43xx/lpc4370-link2/src/lpc43_boot.c  |  97 +++++
 .../lpc54xx/lpcxpresso-lpc54628/src/CMakeLists.txt |   4 -
 .../arm/lpc54xx/lpcxpresso-lpc54628/src/Makefile   |   4 -
 .../lpcxpresso-lpc54628/src/lpc54_appinit.c        |  75 ----
 .../arm/max326xx/max32660-evsys/src/CMakeLists.txt |   4 +-
 boards/arm/max326xx/max32660-evsys/src/Makefile    |   8 +-
 .../max326xx/max32660-evsys/src/max326_appinit.c   |  77 ----
 .../arm/mcx-nxxx/frdm-mcxn236/src/CMakeLists.txt   |   4 -
 boards/arm/mcx-nxxx/frdm-mcxn236/src/Makefile      |   4 -
 .../arm/mcx-nxxx/frdm-mcxn236/src/n23x_appinit.c   |  76 ----
 boards/arm/moxart/moxa/src/Makefile                |   3 -
 boards/arm/moxart/moxa/src/moxart_appinit.c        |  90 -----
 boards/arm/mps/mps2-an500/src/mps2_bringup.c       |  38 --
 boards/arm/mps/mps2-an521/src/mps2_bringup.c       |  38 --
 boards/arm/mps/mps3-an547/src/mps3_bringup.c       |  39 --
 boards/arm/mx8mp/verdin-mx8mp/src/CMakeLists.txt   |   4 -
 boards/arm/mx8mp/verdin-mx8mp/src/Makefile         |   4 -
 boards/arm/mx8mp/verdin-mx8mp/src/mx8mp_appinit.c  |  73 ----
 .../arduino-nano-33ble-rev2/src/CMakeLists.txt     |   4 -
 .../nrf52/arduino-nano-33ble-rev2/src/Make.defs    |   4 -
 .../arduino-nano-33ble-rev2/src/nrf52_appinit.c    |  76 ----
 .../nrf52/arduino-nano-33ble/src/CMakeLists.txt    |   4 -
 boards/arm/nrf52/arduino-nano-33ble/src/Make.defs  |   4 -
 .../nrf52/arduino-nano-33ble/src/nrf52_appinit.c   |  76 ----
 boards/arm/nrf52/nrf52-feather/src/CMakeLists.txt  |   4 -
 boards/arm/nrf52/nrf52-feather/src/Make.defs       |   4 -
 boards/arm/nrf52/nrf52-feather/src/nrf52_appinit.c |  76 ----
 boards/arm/nrf52/nrf52832-dk/src/CMakeLists.txt    |   4 -
 boards/arm/nrf52/nrf52832-dk/src/Make.defs         |   4 -
 boards/arm/nrf52/nrf52832-dk/src/nrf52_appinit.c   |  76 ----
 boards/arm/nrf52/nrf52832-mdk/src/CMakeLists.txt   |   4 -
 boards/arm/nrf52/nrf52832-mdk/src/Make.defs        |   4 -
 boards/arm/nrf52/nrf52832-mdk/src/nrf52_appinit.c  |  76 ----
 .../arm/nrf52/nrf52832-sparkfun/src/CMakeLists.txt |   4 -
 boards/arm/nrf52/nrf52832-sparkfun/src/Make.defs   |   4 -
 .../nrf52/nrf52832-sparkfun/src/nrf52_appinit.c    |  76 ----
 .../nrf52/nrf52840-dk/configs/highpri/defconfig    |   1 +
 boards/arm/nrf52/nrf52840-dk/src/CMakeLists.txt    |   4 -
 boards/arm/nrf52/nrf52840-dk/src/Make.defs         |   4 -
 boards/arm/nrf52/nrf52840-dk/src/nrf52_appinit.c   |  76 ----
 .../arm/nrf52/nrf52840-dongle/src/CMakeLists.txt   |   4 -
 boards/arm/nrf52/nrf52840-dongle/src/Make.defs     |   4 -
 .../arm/nrf52/nrf52840-dongle/src/nrf52_appinit.c  |  76 ----
 .../arm/nrf52/nrf9160-dk-nrf52/src/CMakeLists.txt  |   4 -
 boards/arm/nrf52/nrf9160-dk-nrf52/src/Make.defs    |   4 -
 .../arm/nrf52/nrf9160-dk-nrf52/src/nrf52_appinit.c |  76 ----
 boards/arm/nrf52/thingy52/src/CMakeLists.txt       |   4 -
 boards/arm/nrf52/thingy52/src/Make.defs            |   4 -
 boards/arm/nrf52/thingy52/src/nrf52_appinit.c      |  76 ----
 boards/arm/nrf52/thingy91-nrf52/src/CMakeLists.txt |   4 -
 boards/arm/nrf52/thingy91-nrf52/src/Make.defs      |   4 -
 .../arm/nrf52/thingy91-nrf52/src/nrf52_appinit.c   |  76 ----
 boards/arm/nrf52/xiao-nrf52840/src/CMakeLists.txt  |   4 -
 boards/arm/nrf52/xiao-nrf52840/src/Make.defs       |   4 -
 boards/arm/nrf52/xiao-nrf52840/src/nrf52_appinit.c |  76 ----
 .../arm/nrf53/nrf5340-audio-dk/src/CMakeLists.txt  |   4 -
 boards/arm/nrf53/nrf5340-audio-dk/src/Make.defs    |   4 -
 .../arm/nrf53/nrf5340-audio-dk/src/nrf53_appinit.c |  76 ----
 boards/arm/nrf53/nrf5340-dk/src/CMakeLists.txt     |   4 -
 boards/arm/nrf53/nrf5340-dk/src/Make.defs          |   4 -
 boards/arm/nrf53/nrf5340-dk/src/nrf53_appinit.c    |  76 ----
 boards/arm/nrf53/thingy53/src/CMakeLists.txt       |   4 -
 boards/arm/nrf53/thingy53/src/Make.defs            |   4 -
 boards/arm/nrf53/thingy53/src/nrf53_appinit.c      |  76 ----
 boards/arm/nrf91/nrf9160-dk/src/CMakeLists.txt     |   4 -
 boards/arm/nrf91/nrf9160-dk/src/Make.defs          |   4 -
 boards/arm/nrf91/nrf9160-dk/src/nrf91_appinit.c    |  90 -----
 boards/arm/nrf91/nrf9160-dk/src/nrf91_bringup.c    |  15 +
 boards/arm/nrf91/thingy91/src/CMakeLists.txt       |   4 -
 boards/arm/nrf91/thingy91/src/Make.defs            |   4 -
 boards/arm/nrf91/thingy91/src/nrf91_appinit.c      |  90 -----
 .../nuc1xx/nutiny-nuc120/src/nuc_boardinitialize.c |  20 +
 boards/arm/phy62xx/phy6222/src/Makefile            |   2 -
 boards/arm/phy62xx/phy6222/src/appinit.c           |  73 ----
 boards/arm/qemu/qemu-armv7a/src/CMakeLists.txt     |   4 -
 boards/arm/qemu/qemu-armv7a/src/Makefile           |   4 -
 boards/arm/qemu/qemu-armv7a/src/qemu_appinit.c     |  78 ----
 boards/arm/qemu/qemu-armv7r/src/CMakeLists.txt     |   4 -
 boards/arm/qemu/qemu-armv7r/src/Makefile           |   4 -
 boards/arm/qemu/qemu-armv7r/src/qemu_appinit.c     |  75 ----
 .../arm/ra4/arduino-r4-minima/src/CMakeLists.txt   |   2 +-
 boards/arm/ra4/arduino-r4-minima/src/Makefile      |   4 -
 .../arm/ra4/arduino-r4-minima/src/ra4m1_appinit.c  |  76 ----
 boards/arm/ra4/xiao-ra4m1/src/CMakeLists.txt       |   2 +-
 boards/arm/ra4/xiao-ra4m1/src/Makefile             |   4 -
 boards/arm/ra4/xiao-ra4m1/src/ra4m1_appinit.c      |  76 ----
 .../adafruit-feather-rp2040/src/CMakeLists.txt     |   4 -
 .../rp2040/adafruit-feather-rp2040/src/Make.defs   |   1 -
 .../adafruit-feather-rp2040/src/rp2040_appinit.c   |  78 ----
 .../src/rp2040_boardinitialize.c                   |  28 ++
 .../arm/rp2040/adafruit-kb2040/src/CMakeLists.txt  |   4 -
 boards/arm/rp2040/adafruit-kb2040/src/Make.defs    |   1 -
 .../rp2040/adafruit-kb2040/src/rp2040_appinit.c    |  78 ----
 .../adafruit-kb2040/src/rp2040_boardinitialize.c   |  28 ++
 .../adafruit-qt-py-rp2040/src/CMakeLists.txt       |   4 -
 .../arm/rp2040/adafruit-qt-py-rp2040/src/Make.defs |   1 -
 .../adafruit-qt-py-rp2040/src/rp2040_appinit.c     |  78 ----
 .../src/rp2040_boardinitialize.c                   |  28 ++
 boards/arm/rp2040/common/src/rp2040_usbmsc.c       |   3 +-
 .../rp2040/pimoroni-tiny2040/src/CMakeLists.txt    |   4 -
 boards/arm/rp2040/pimoroni-tiny2040/src/Make.defs  |   1 -
 .../rp2040/pimoroni-tiny2040/src/rp2040_appinit.c  |  78 ----
 .../pimoroni-tiny2040/src/rp2040_boardinitialize.c |  28 ++
 .../rp2040/raspberrypi-pico-w/src/CMakeLists.txt   |   4 -
 boards/arm/rp2040/raspberrypi-pico-w/src/Make.defs |   1 -
 .../rp2040/raspberrypi-pico-w/src/rp2040_appinit.c |  78 ----
 .../src/rp2040_boardinitialize.c                   |  28 ++
 .../arm/rp2040/raspberrypi-pico/src/CMakeLists.txt |   4 -
 boards/arm/rp2040/raspberrypi-pico/src/Make.defs   |   1 -
 .../rp2040/raspberrypi-pico/src/rp2040_appinit.c   |  78 ----
 .../raspberrypi-pico/src/rp2040_boardinitialize.c  |  28 ++
 .../rp2040/seeed-xiao-rp2040/src/CMakeLists.txt    |   4 -
 boards/arm/rp2040/seeed-xiao-rp2040/src/Make.defs  |   1 -
 .../rp2040/seeed-xiao-rp2040/src/rp2040_appinit.c  |  78 ----
 .../seeed-xiao-rp2040/src/rp2040_boardinitialize.c |  28 ++
 .../arm/rp2040/w5500-evb-pico/src/CMakeLists.txt   |   4 -
 boards/arm/rp2040/w5500-evb-pico/src/Make.defs     |   1 -
 .../arm/rp2040/w5500-evb-pico/src/rp2040_appinit.c |  78 ----
 .../w5500-evb-pico/src/rp2040_boardinitialize.c    |  28 ++
 .../waveshare-rp2040-lcd-1.28/src/CMakeLists.txt   |   4 -
 .../rp2040/waveshare-rp2040-lcd-1.28/src/Make.defs |   1 -
 .../waveshare-rp2040-lcd-1.28/src/rp2040_appinit.c |  78 ----
 .../src/rp2040_boardinitialize.c                   |  28 ++
 .../waveshare-rp2040-zero/src/CMakeLists.txt       |   4 -
 .../arm/rp2040/waveshare-rp2040-zero/src/Make.defs |   1 -
 .../waveshare-rp2040-zero/src/rp2040_appinit.c     | 100 -----
 .../src/rp2040_boardinitialize.c                   |  28 ++
 boards/arm/rp23xx/common/src/rp23xx_usbmsc.c       |   3 +-
 .../rp23xx/pimoroni-pico-2-plus/src/CMakeLists.txt |   4 -
 .../arm/rp23xx/pimoroni-pico-2-plus/src/Make.defs  |   1 -
 .../pimoroni-pico-2-plus/src/rp23xx_appinit.c      |  76 ----
 .../src/rp23xx_boardinitialize.c                   |  22 ++
 .../rp23xx/raspberrypi-pico-2/src/CMakeLists.txt   |   4 -
 boards/arm/rp23xx/raspberrypi-pico-2/src/Make.defs |   1 -
 .../rp23xx/raspberrypi-pico-2/src/rp23xx_appinit.c |  76 ----
 .../src/rp23xx_boardinitialize.c                   |  22 ++
 boards/arm/rp23xx/xiao-rp2350/src/CMakeLists.txt   |   4 -
 boards/arm/rp23xx/xiao-rp2350/src/Make.defs        |   1 -
 boards/arm/rp23xx/xiao-rp2350/src/rp23xx_appinit.c |  76 ----
 .../xiao-rp2350/src/rp23xx_boardinitialize.c       |  22 ++
 boards/arm/s32k1xx/rddrone-bms772/src/Makefile     |   4 -
 .../s32k1xx/rddrone-bms772/src/s32k1xx_appinit.c   |  81 ----
 boards/arm/s32k1xx/s32k118evb/src/CMakeLists.txt   |   4 -
 boards/arm/s32k1xx/s32k118evb/src/Makefile         |   4 -
 .../arm/s32k1xx/s32k118evb/src/s32k1xx_appinit.c   |  79 ----
 boards/arm/s32k1xx/s32k144evb/src/CMakeLists.txt   |   4 -
 boards/arm/s32k1xx/s32k144evb/src/Makefile         |   4 -
 .../arm/s32k1xx/s32k144evb/src/s32k1xx_appinit.c   |  79 ----
 boards/arm/s32k1xx/s32k146evb/src/CMakeLists.txt   |   4 -
 boards/arm/s32k1xx/s32k146evb/src/Makefile         |   4 -
 .../arm/s32k1xx/s32k146evb/src/s32k1xx_appinit.c   |  79 ----
 boards/arm/s32k1xx/s32k148evb/src/CMakeLists.txt   |   4 -
 boards/arm/s32k1xx/s32k148evb/src/Makefile         |   4 -
 .../arm/s32k1xx/s32k148evb/src/s32k1xx_appinit.c   |  79 ----
 boards/arm/s32k1xx/ucans32k146/src/CMakeLists.txt  |   4 -
 boards/arm/s32k1xx/ucans32k146/src/Makefile        |   4 -
 .../arm/s32k1xx/ucans32k146/src/s32k1xx_appinit.c  |  79 ----
 boards/arm/s32k3xx/mr-canhubk3/src/CMakeLists.txt  |   4 -
 boards/arm/s32k3xx/mr-canhubk3/src/Makefile        |   4 -
 .../arm/s32k3xx/mr-canhubk3/src/s32k3xx_appinit.c  |  76 ----
 boards/arm/s32k3xx/s32k344evb/src/CMakeLists.txt   |   4 -
 boards/arm/s32k3xx/s32k344evb/src/Makefile         |   4 -
 .../arm/s32k3xx/s32k344evb/src/s32k3xx_appinit.c   |  76 ----
 boards/arm/sam34/arduino-due/src/CMakeLists.txt    |   4 -
 boards/arm/sam34/arduino-due/src/Makefile          |   4 -
 boards/arm/sam34/arduino-due/src/sam_appinit.c     |  78 ----
 boards/arm/sam34/arduino-due/src/sam_bringup.c     |   4 +-
 .../arm/sam34/flipnclick-sam3x/src/CMakeLists.txt  |   4 -
 boards/arm/sam34/flipnclick-sam3x/src/Makefile     |   4 -
 .../arm/sam34/flipnclick-sam3x/src/sam_appinit.c   |  80 ----
 boards/arm/sam34/sam3u-ek/src/CMakeLists.txt       |   4 -
 boards/arm/sam34/sam3u-ek/src/Makefile             |   4 -
 boards/arm/sam34/sam3u-ek/src/sam_appinit.c        | 170 ---------
 boards/arm/sam34/sam3u-ek/src/sam_boot.c           | 120 ++++++
 boards/arm/sam34/sam4cmp-db/src/CMakeLists.txt     |   8 +-
 boards/arm/sam34/sam4cmp-db/src/Makefile           |   8 +-
 boards/arm/sam34/sam4cmp-db/src/sam_appinit.c      |  75 ----
 boards/arm/sam34/sam4e-ek/src/CMakeLists.txt       |   4 -
 boards/arm/sam34/sam4e-ek/src/Makefile             |   4 -
 boards/arm/sam34/sam4e-ek/src/sam_appinit.c        | 124 ------
 boards/arm/sam34/sam4e-ek/src/sam_boot.c           |  57 ++-
 boards/arm/sam34/sam4l-xplained/src/CMakeLists.txt |   4 -
 boards/arm/sam34/sam4l-xplained/src/Makefile       |   4 -
 boards/arm/sam34/sam4l-xplained/src/sam_appinit.c  | 118 ------
 boards/arm/sam34/sam4l-xplained/src/sam_boot.c     |  67 ++++
 boards/arm/sam34/sam4s-xplained-pro/src/Makefile   |   4 -
 .../arm/sam34/sam4s-xplained-pro/src/sam_appinit.c | 173 ---------
 boards/arm/sam34/sam4s-xplained-pro/src/sam_boot.c | 109 ++++++
 boards/arm/sam34/sam4s-xplained/src/sam_boot.c     |  20 +
 boards/arm/sama5/giant-board/src/Makefile          |   7 +-
 boards/arm/sama5/giant-board/src/sam_appinit.c     |  78 ----
 boards/arm/sama5/jupiter-nano/src/Makefile         |   7 +-
 boards/arm/sama5/jupiter-nano/src/sam_appinit.c    |  82 ----
 boards/arm/sama5/sama5d2-xult/src/Makefile         |   7 +-
 boards/arm/sama5/sama5d2-xult/src/sam_appinit.c    |  82 ----
 .../arm/sama5/sama5d3-xplained/src/CMakeLists.txt  |   7 +-
 boards/arm/sama5/sama5d3-xplained/src/Makefile     |   7 +-
 .../arm/sama5/sama5d3-xplained/src/sam_appinit.c   |  78 ----
 boards/arm/sama5/sama5d3-xplained/src/sam_boot.c   |  11 +-
 boards/arm/sama5/sama5d3x-ek/src/CMakeLists.txt    |   4 -
 boards/arm/sama5/sama5d3x-ek/src/Makefile          |   4 -
 boards/arm/sama5/sama5d3x-ek/src/sam_appinit.c     | 226 -----------
 boards/arm/sama5/sama5d3x-ek/src/sam_boot.c        | 159 +++++++-
 boards/arm/sama5/sama5d4-ek/src/Makefile           |  10 +-
 boards/arm/sama5/sama5d4-ek/src/sam_appinit.c      |  79 ----
 boards/arm/samd2l2/arduino-m0/src/CMakeLists.txt   |   4 -
 boards/arm/samd2l2/arduino-m0/src/Makefile         |   4 -
 boards/arm/samd2l2/arduino-m0/src/sam_appinit.c    |  73 ----
 .../arm/samd2l2/circuit-express/src/CMakeLists.txt |   4 -
 boards/arm/samd2l2/circuit-express/src/Makefile    |   4 -
 .../arm/samd2l2/circuit-express/src/sam_appinit.c  |  73 ----
 .../arm/samd2l2/samd20-xplained/src/CMakeLists.txt |   4 -
 boards/arm/samd2l2/samd20-xplained/src/Makefile    |   4 -
 .../arm/samd2l2/samd20-xplained/src/sam_appinit.c  | 125 -------
 boards/arm/samd2l2/samd20-xplained/src/sam_boot.c  |  73 ++++
 .../arm/samd2l2/samd21-xplained/src/CMakeLists.txt |   4 -
 boards/arm/samd2l2/samd21-xplained/src/Makefile    |   4 -
 .../arm/samd2l2/samd21-xplained/src/sam_appinit.c  | 125 -------
 boards/arm/samd2l2/samd21-xplained/src/sam_boot.c  |  73 ++++
 .../arm/samd2l2/saml21-xplained/src/CMakeLists.txt |   4 -
 boards/arm/samd2l2/saml21-xplained/src/Makefile    |   4 -
 .../arm/samd2l2/saml21-xplained/src/sam_appinit.c  | 125 -------
 boards/arm/samd2l2/saml21-xplained/src/sam_boot.c  |  73 ++++
 .../arm/samd2l2/xiao-seeeduino/src/CMakeLists.txt  |   4 -
 boards/arm/samd2l2/xiao-seeeduino/src/Makefile     |   4 -
 .../arm/samd2l2/xiao-seeeduino/src/sam_appinit.c   |  73 ----
 boards/arm/samd2l2/xiao-seeeduino/src/sam_boot.c   |  20 +
 boards/arm/samd5e5/metro-m4/src/CMakeLists.txt     |   4 -
 boards/arm/samd5e5/metro-m4/src/Makefile           |   4 -
 boards/arm/samd5e5/metro-m4/src/sam_appinit.c      |  78 ----
 .../samd5e5/same54-xplained-pro/src/CMakeLists.txt |   4 -
 .../arm/samd5e5/same54-xplained-pro/src/Makefile   |   4 -
 .../samd5e5/same54-xplained-pro/src/sam_appinit.c  |  78 ----
 .../arm/samv7/pic32czca70-curiosity/src/Make.defs  |   6 +-
 .../samv7/pic32czca70-curiosity/src/sam_appinit.c  | 107 ------
 .../pic32czca70-curiosity/src/sam_boardctl.c}      |  47 ++-
 boards/arm/samv7/same70-qmtech/src/Make.defs       |   6 +-
 boards/arm/samv7/same70-qmtech/src/sam_appinit.c   | 107 ------
 .../same70-qmtech/src/sam_boardctl.c}              |  47 ++-
 boards/arm/samv7/same70-xplained/src/Make.defs     |   6 +-
 boards/arm/samv7/same70-xplained/src/sam_appinit.c | 107 ------
 .../same70-xplained/src/sam_boardctl.c}            |  47 ++-
 boards/arm/samv7/samv71-xult/src/Make.defs         |   6 +-
 boards/arm/samv7/samv71-xult/src/sam_appinit.c     | 107 ------
 .../samv71-xult/src/sam_boardctl.c}                |  47 ++-
 boards/arm/stm32/axoloti/src/CMakeLists.txt        |   4 -
 boards/arm/stm32/axoloti/src/Make.defs             |   4 -
 boards/arm/stm32/axoloti/src/stm32_appinit.c       |  78 ----
 boards/arm/stm32/b-g431b-esc1/src/CMakeLists.txt   |   4 -
 boards/arm/stm32/b-g431b-esc1/src/Make.defs        |   4 -
 boards/arm/stm32/b-g431b-esc1/src/b-g431b-esc1.h   |   7 +-
 boards/arm/stm32/b-g431b-esc1/src/stm32_appinit.c  |  78 ----
 boards/arm/stm32/b-g431b-esc1/src/stm32_foc.c      |   2 -
 boards/arm/stm32/b-g474e-dpow1/src/CMakeLists.txt  |   4 -
 boards/arm/stm32/b-g474e-dpow1/src/Make.defs       |   4 -
 boards/arm/stm32/b-g474e-dpow1/src/stm32_appinit.c | 103 -----
 boards/arm/stm32/b-g474e-dpow1/src/stm32_boot.c    |  53 +++
 boards/arm/stm32/b-g474e-dpow1/src/stm32_smps.c    |   2 -
 boards/arm/stm32/clicker2-stm32/src/CMakeLists.txt |   4 -
 boards/arm/stm32/clicker2-stm32/src/Make.defs      |   4 -
 .../arm/stm32/clicker2-stm32/src/stm32_appinit.c   | 114 ------
 boards/arm/stm32/clicker2-stm32/src/stm32_boot.c   |  35 +-
 boards/arm/stm32/cloudctrl/src/CMakeLists.txt      |   4 -
 boards/arm/stm32/cloudctrl/src/Make.defs           |   4 -
 boards/arm/stm32/cloudctrl/src/stm32_appinit.c     | 157 --------
 boards/arm/stm32/cloudctrl/src/stm32_boot.c        | 110 ++++++
 boards/arm/stm32/cloudctrl/src/stm32_usbmsc.c      |   3 +-
 boards/arm/stm32/emw3162/src/CMakeLists.txt        |   4 -
 boards/arm/stm32/emw3162/src/Make.defs             |   4 -
 boards/arm/stm32/emw3162/src/emw3162.h             |   8 +-
 boards/arm/stm32/emw3162/src/stm32_appinit.c       |  77 ----
 boards/arm/stm32/emw3162/src/stm32_bringup.c       |   2 -
 boards/arm/stm32/et-stm32-stamp/src/CMakeLists.txt |  16 -
 boards/arm/stm32/et-stm32-stamp/src/Make.defs      |  13 -
 .../arm/stm32/et-stm32-stamp/src/stm32_appinit.c   |  65 ----
 boards/arm/stm32/et-stm32-stamp/src/stm32_boot.c   |  20 +
 boards/arm/stm32/fire-stm32v2/src/CMakeLists.txt   |   4 -
 boards/arm/stm32/fire-stm32v2/src/Make.defs        |   4 -
 boards/arm/stm32/fire-stm32v2/src/stm32_appinit.c  | 240 ------------
 boards/arm/stm32/fire-stm32v2/src/stm32_boot.c     | 187 +++++++++
 boards/arm/stm32/fire-stm32v2/src/stm32_usbmsc.c   |   3 +-
 boards/arm/stm32/hymini-stm32v/src/CMakeLists.txt  |   4 -
 boards/arm/stm32/hymini-stm32v/src/Make.defs       |   4 -
 boards/arm/stm32/hymini-stm32v/src/stm32_appinit.c | 222 -----------
 boards/arm/stm32/hymini-stm32v/src/stm32_boot.c    | 179 +++++++++
 boards/arm/stm32/hymini-stm32v/src/stm32_usbmsc.c  |   3 +-
 boards/arm/stm32/maple/src/CMakeLists.txt          |   4 -
 boards/arm/stm32/maple/src/Make.defs               |   4 -
 boards/arm/stm32/maple/src/stm32_appinit.c         |  65 ----
 boards/arm/stm32/maple/src/stm32_boot.c            |  25 ++
 boards/arm/stm32/mikroe-stm32f4/src/CMakeLists.txt |   4 -
 boards/arm/stm32/mikroe-stm32f4/src/Make.defs      |   4 -
 .../arm/stm32/mikroe-stm32f4/src/stm32_appinit.c   | 416 ---------------------
 boards/arm/stm32/mikroe-stm32f4/src/stm32_boot.c   | 369 ++++++++++++++++++
 boards/arm/stm32/nucleo-f103rb/src/CMakeLists.txt  |   4 -
 boards/arm/stm32/nucleo-f103rb/src/Make.defs       |   4 -
 boards/arm/stm32/nucleo-f103rb/src/nucleo-f103rb.h |   7 +-
 boards/arm/stm32/nucleo-f103rb/src/stm32_appinit.c |  78 ----
 .../stm32/nucleo-f103rb/src/stm32_foc_ihm07m1.c    |   2 -
 boards/arm/stm32/nucleo-f207zg/src/CMakeLists.txt  |   4 -
 boards/arm/stm32/nucleo-f207zg/src/Make.defs       |   4 -
 .../stm32/nucleo-f207zg/src/stm32_appinitialize.c  |  78 ----
 boards/arm/stm32/nucleo-f207zg/src/stm32_boot.c    |   6 -
 boards/arm/stm32/nucleo-f207zg/src/stm32_bringup.c |   4 -
 boards/arm/stm32/nucleo-f302r8/src/CMakeLists.txt  |   4 -
 boards/arm/stm32/nucleo-f302r8/src/Make.defs       |   4 -
 boards/arm/stm32/nucleo-f302r8/src/nucleo-f302r8.h |   7 +-
 boards/arm/stm32/nucleo-f302r8/src/stm32_appinit.c |  78 ----
 .../stm32/nucleo-f302r8/src/stm32_foc_ihm07m1.c    |   2 -
 boards/arm/stm32/nucleo-f303re/src/CMakeLists.txt  |   4 -
 boards/arm/stm32/nucleo-f303re/src/Make.defs       |   4 -
 .../stm32/nucleo-f303re/src/stm32_appinitialize.c  | 141 -------
 boards/arm/stm32/nucleo-f303re/src/stm32_boot.c    |  92 +++++
 boards/arm/stm32/nucleo-f303ze/src/CMakeLists.txt  |   4 -
 boards/arm/stm32/nucleo-f303ze/src/Make.defs       |   4 -
 .../stm32/nucleo-f303ze/src/stm32_appinitialize.c  |  78 ----
 boards/arm/stm32/nucleo-f303ze/src/stm32_boot.c    |   6 -
 boards/arm/stm32/nucleo-f303ze/src/stm32_bringup.c |   4 -
 boards/arm/stm32/nucleo-f334r8/src/CMakeLists.txt  |   4 -
 boards/arm/stm32/nucleo-f334r8/src/Make.defs       |   4 -
 boards/arm/stm32/nucleo-f334r8/src/stm32_appinit.c | 139 -------
 boards/arm/stm32/nucleo-f334r8/src/stm32_boot.c    |  90 +++++
 boards/arm/stm32/nucleo-f401re/src/CMakeLists.txt  |   4 -
 boards/arm/stm32/nucleo-f401re/src/Make.defs       |   4 -
 boards/arm/stm32/nucleo-f401re/src/nucleo-f401re.h |   7 +-
 boards/arm/stm32/nucleo-f401re/src/stm32_appinit.c |  78 ----
 boards/arm/stm32/nucleo-f401re/src/stm32_boot.c    |   4 -
 boards/arm/stm32/nucleo-f410rb/src/CMakeLists.txt  |   4 -
 boards/arm/stm32/nucleo-f410rb/src/Make.defs       |   4 -
 boards/arm/stm32/nucleo-f410rb/src/stm32_appinit.c |  78 ----
 boards/arm/stm32/nucleo-f410rb/src/stm32_boot.c    |   4 -
 boards/arm/stm32/nucleo-f411re/src/CMakeLists.txt  |   4 -
 boards/arm/stm32/nucleo-f411re/src/Make.defs       |   4 -
 boards/arm/stm32/nucleo-f411re/src/nucleo-f411re.h |   7 +-
 boards/arm/stm32/nucleo-f411re/src/stm32_appinit.c |  78 ----
 boards/arm/stm32/nucleo-f411re/src/stm32_boot.c    |   4 -
 boards/arm/stm32/nucleo-f412zg/src/CMakeLists.txt  |   4 -
 boards/arm/stm32/nucleo-f412zg/src/Make.defs       |   4 -
 boards/arm/stm32/nucleo-f412zg/src/stm32_appinit.c |  80 ----
 boards/arm/stm32/nucleo-f429zi/src/CMakeLists.txt  |   4 -
 boards/arm/stm32/nucleo-f429zi/src/Make.defs       |   4 -
 .../stm32/nucleo-f429zi/src/stm32_appinitialize.c  | 226 -----------
 boards/arm/stm32/nucleo-f429zi/src/stm32_boot.c    | 167 ++++++++-
 boards/arm/stm32/nucleo-f446re/src/CMakeLists.txt  |   4 -
 boards/arm/stm32/nucleo-f446re/src/Make.defs       |   4 -
 boards/arm/stm32/nucleo-f446re/src/nucleo-f446re.h |   7 +-
 boards/arm/stm32/nucleo-f446re/src/stm32_appinit.c |  78 ----
 .../stm32/nucleo-f446re/src/stm32_foc_ihm08m1.c    |   2 -
 boards/arm/stm32/nucleo-g431kb/src/CMakeLists.txt  |   4 -
 boards/arm/stm32/nucleo-g431kb/src/Make.defs       |   4 -
 boards/arm/stm32/nucleo-g431kb/src/nucleo-g431kb.h |   9 +-
 boards/arm/stm32/nucleo-g431kb/src/stm32_appinit.c |  78 ----
 boards/arm/stm32/nucleo-g431rb/src/CMakeLists.txt  |   4 -
 boards/arm/stm32/nucleo-g431rb/src/Make.defs       |   4 -
 boards/arm/stm32/nucleo-g431rb/src/nucleo-g431rb.h |   7 +-
 boards/arm/stm32/nucleo-g431rb/src/stm32_appinit.c |  78 ----
 .../stm32/nucleo-g431rb/src/stm32_foc_ihm16m1.c    |   2 -
 boards/arm/stm32/nucleo-g474re/src/CMakeLists.txt  |   4 -
 boards/arm/stm32/nucleo-g474re/src/Make.defs       |   4 -
 boards/arm/stm32/nucleo-g474re/src/stm32_appinit.c |  77 ----
 boards/arm/stm32/nucleo-g474re/src/stm32_boot.c    |   7 -
 boards/arm/stm32/nucleo-l152re/src/CMakeLists.txt  |   4 -
 boards/arm/stm32/nucleo-l152re/src/Make.defs       |   4 -
 .../stm32/nucleo-l152re/src/stm32_appinitialize.c  | 175 ---------
 boards/arm/stm32/nucleo-l152re/src/stm32_boot.c    | 107 +++++-
 boards/arm/stm32/odrive36/src/CMakeLists.txt       |   4 -
 boards/arm/stm32/odrive36/src/Make.defs            |   4 -
 boards/arm/stm32/odrive36/src/odrive.h             |   7 +-
 boards/arm/stm32/odrive36/src/stm32_appinit.c      |  73 ----
 boards/arm/stm32/odrive36/src/stm32_foc.c          |   2 -
 .../arm/stm32/olimex-stm32-e407/src/CMakeLists.txt |   4 -
 boards/arm/stm32/olimex-stm32-e407/src/Make.defs   |   4 -
 .../stm32/olimex-stm32-e407/src/stm32_appinit.c    |  78 ----
 .../arm/stm32/olimex-stm32-h405/src/CMakeLists.txt |   4 -
 boards/arm/stm32/olimex-stm32-h405/src/Make.defs   |   4 -
 .../stm32/olimex-stm32-h405/src/stm32_appinit.c    | 117 ------
 .../arm/stm32/olimex-stm32-h405/src/stm32_boot.c   |  49 ++-
 .../arm/stm32/olimex-stm32-h407/src/CMakeLists.txt |   4 -
 boards/arm/stm32/olimex-stm32-h407/src/Make.defs   |   4 -
 .../olimex-stm32-h407/src/olimex-stm32-h407.h      |   7 +-
 .../stm32/olimex-stm32-h407/src/stm32_appinit.c    |  88 -----
 .../arm/stm32/olimex-stm32-h407/src/stm32_boot.c   |   9 -
 .../stm32/olimex-stm32-h407/src/stm32_bringup.c    |   7 +-
 .../arm/stm32/olimex-stm32-p107/src/CMakeLists.txt |   4 -
 boards/arm/stm32/olimex-stm32-p107/src/Make.defs   |   4 -
 .../stm32/olimex-stm32-p107/src/stm32_appinit.c    |  92 -----
 .../arm/stm32/olimex-stm32-p107/src/stm32_boot.c   |  38 ++
 .../arm/stm32/olimex-stm32-p207/src/CMakeLists.txt |   4 -
 boards/arm/stm32/olimex-stm32-p207/src/Make.defs   |   4 -
 .../stm32/olimex-stm32-p207/src/stm32_appinit.c    | 180 ---------
 .../arm/stm32/olimex-stm32-p207/src/stm32_boot.c   | 110 +++++-
 .../arm/stm32/olimex-stm32-p407/src/CMakeLists.txt |   4 -
 boards/arm/stm32/olimex-stm32-p407/src/Make.defs   |   4 -
 .../stm32/olimex-stm32-p407/src/stm32_appinit.c    |  85 -----
 .../arm/stm32/olimexino-stm32/src/CMakeLists.txt   |   4 -
 boards/arm/stm32/olimexino-stm32/src/Make.defs     |   4 -
 .../arm/stm32/olimexino-stm32/src/stm32_appinit.c  | 104 ------
 boards/arm/stm32/olimexino-stm32/src/stm32_boot.c  |  47 ++-
 .../stm32/olimexino-stm32/src/stm32_composite.c    |   3 +-
 .../arm/stm32/olimexino-stm32/src/stm32_usbmsc.c   |   3 +-
 boards/arm/stm32/omnibusf4/src/CMakeLists.txt      |  14 +-
 boards/arm/stm32/omnibusf4/src/Make.defs           |   3 -
 boards/arm/stm32/omnibusf4/src/stm32_appinit.c     |  80 ----
 boards/arm/stm32/omnibusf4/src/stm32_boot.c        |  17 +-
 boards/arm/stm32/omnibusf4/src/stm32_usbmsc.c      |   5 +-
 boards/arm/stm32/photon/src/CMakeLists.txt         |   4 -
 boards/arm/stm32/photon/src/Make.defs              |   4 -
 boards/arm/stm32/photon/src/photon.h               |   8 +-
 boards/arm/stm32/photon/src/stm32_appinit.c        |  77 ----
 boards/arm/stm32/photon/src/stm32_bringup.c        |   2 -
 boards/arm/stm32/shenzhou/src/CMakeLists.txt       |   4 -
 boards/arm/stm32/shenzhou/src/Make.defs            |   4 -
 boards/arm/stm32/shenzhou/src/stm32_appinit.c      | 229 ------------
 boards/arm/stm32/shenzhou/src/stm32_boot.c         | 180 +++++++++
 boards/arm/stm32/shenzhou/src/stm32_usbmsc.c       |   3 +-
 boards/arm/stm32/stm3210e-eval/src/CMakeLists.txt  |   4 -
 boards/arm/stm32/stm3210e-eval/src/Make.defs       |   4 -
 boards/arm/stm32/stm3210e-eval/src/stm32_appinit.c |  78 ----
 .../arm/stm32/stm3210e-eval/src/stm32_composite.c  |   3 +-
 boards/arm/stm32/stm3210e-eval/src/stm32_usbmsc.c  |   3 +-
 boards/arm/stm32/stm3220g-eval/src/CMakeLists.txt  |   4 -
 boards/arm/stm32/stm3220g-eval/src/Make.defs       |   4 -
 boards/arm/stm32/stm3220g-eval/src/stm32_appinit.c | 326 ----------------
 boards/arm/stm32/stm3220g-eval/src/stm32_boot.c    | 271 ++++++++++++++
 boards/arm/stm32/stm3240g-eval/src/CMakeLists.txt  |   4 -
 boards/arm/stm32/stm3240g-eval/src/Make.defs       |   4 -
 boards/arm/stm32/stm3240g-eval/src/stm32_appinit.c |  78 ----
 boards/arm/stm32/stm32_tiny/src/CMakeLists.txt     |   4 -
 boards/arm/stm32/stm32_tiny/src/Make.defs          |   4 -
 boards/arm/stm32/stm32_tiny/src/stm32_appinit.c    |  97 -----
 boards/arm/stm32/stm32_tiny/src/stm32_boot.c       |  45 +++
 boards/arm/stm32/stm32butterfly2/src/stm32_boot.c  |  21 +-
 .../arm/stm32/stm32f103-minimum/src/CMakeLists.txt |   7 +-
 boards/arm/stm32/stm32f103-minimum/src/Make.defs   |   3 -
 .../stm32/stm32f103-minimum/src/stm32_appinit.c    |  74 ----
 .../arm/stm32/stm32f103-minimum/src/stm32_boot.c   |   6 -
 .../arm/stm32/stm32f103-minimum/src/stm32_usbmsc.c |   3 +-
 .../stm32f103-minimum/src/stm32f103_minimum.h      |   7 +-
 .../arm/stm32/stm32f334-disco/src/CMakeLists.txt   |   4 -
 boards/arm/stm32/stm32f334-disco/src/Make.defs     |   4 -
 .../arm/stm32/stm32f334-disco/src/stm32_appinit.c  | 171 ---------
 boards/arm/stm32/stm32f334-disco/src/stm32_boot.c  | 122 ++++++
 .../arm/stm32/stm32f334-disco/src/stm32_powerled.c |   2 -
 boards/arm/stm32/stm32f334-disco/src/stm32_smps.c  |   2 -
 .../arm/stm32/stm32f3discovery/src/CMakeLists.txt  |   4 -
 boards/arm/stm32/stm32f3discovery/src/Make.defs    |   4 -
 .../arm/stm32/stm32f3discovery/src/stm32_appinit.c |  78 ----
 .../arm/stm32/stm32f401rc-rs485/src/CMakeLists.txt |   7 +-
 boards/arm/stm32/stm32f401rc-rs485/src/Make.defs   |   5 +-
 .../stm32/stm32f401rc-rs485/src/stm32_appinit.c    |  78 ----
 .../arm/stm32/stm32f401rc-rs485/src/stm32_boot.c   |   4 -
 .../arm/stm32/stm32f401rc-rs485/src/stm32_usbmsc.c |   3 +-
 .../stm32f401rc-rs485/src/stm32f401rc-rs485.h      |   7 +-
 .../arm/stm32/stm32f411-minimum/src/CMakeLists.txt |   4 -
 boards/arm/stm32/stm32f411-minimum/src/Make.defs   |   4 -
 .../stm32/stm32f411-minimum/src/stm32_appinit.c    |  81 ----
 .../arm/stm32/stm32f411-minimum/src/stm32_usbmsc.c |   3 +-
 .../arm/stm32/stm32f411e-disco/src/CMakeLists.txt  |   4 -
 boards/arm/stm32/stm32f411e-disco/src/Make.defs    |   4 -
 .../arm/stm32/stm32f411e-disco/src/stm32_appinit.c |  81 ----
 .../arm/stm32/stm32f429i-disco/src/CMakeLists.txt  |   4 -
 boards/arm/stm32/stm32f429i-disco/src/Make.defs    |   4 -
 .../arm/stm32/stm32f429i-disco/src/stm32_appinit.c |  79 ----
 .../configs/mpr121_keypad/defconfig                |   1 -
 .../stm32f4discovery/configs/st7567/defconfig      |   1 -
 .../arm/stm32/stm32f4discovery/src/CMakeLists.txt  |   7 +-
 boards/arm/stm32/stm32f4discovery/src/Make.defs    |   3 -
 .../arm/stm32/stm32f4discovery/src/stm32_appinit.c |  78 ----
 .../arm/stm32/stm32f4discovery/src/stm32_usbmsc.c  |   3 +-
 .../arm/stm32/stm32ldiscovery/src/CMakeLists.txt   |   4 -
 boards/arm/stm32/stm32ldiscovery/src/Make.defs     |   4 -
 .../arm/stm32/stm32ldiscovery/src/stm32_appinit.c  |  72 ----
 boards/arm/stm32/stm32ldiscovery/src/stm32_boot.c  |   4 -
 .../stm32/stm32ldiscovery/src/stm32ldiscovery.h    |   7 +-
 .../arm/stm32/stm32vldiscovery/src/CMakeLists.txt  |   4 -
 boards/arm/stm32/stm32vldiscovery/src/Make.defs    |   4 -
 .../arm/stm32/stm32vldiscovery/src/stm32_appinit.c |  78 ----
 .../stm32/viewtool-stm32f107/src/CMakeLists.txt    |   4 -
 boards/arm/stm32/viewtool-stm32f107/src/Make.defs  |   4 -
 .../stm32/viewtool-stm32f107/src/stm32_appinit.c   |  78 ----
 .../stm32/viewtool-stm32f107/src/stm32_usbmsc.c    |   3 +-
 .../stm32f0l0g0/b-l072z-lrwan1/src/CMakeLists.txt  |   4 -
 .../arm/stm32f0l0g0/b-l072z-lrwan1/src/Make.defs   |   4 -
 .../stm32f0l0g0/b-l072z-lrwan1/src/stm32_appinit.c |  81 ----
 .../stm32f0l0g0/b-l072z-lrwan1/src/stm32_boot.c    |   2 +-
 .../nucleo-c071rb/configs/adcscope/defconfig       |   1 -
 .../stm32f0l0g0/nucleo-c071rb/src/CMakeLists.txt   |   4 -
 boards/arm/stm32f0l0g0/nucleo-c071rb/src/Make.defs |   4 -
 .../stm32f0l0g0/nucleo-c071rb/src/stm32_appinit.c  |  73 ----
 .../arm/stm32f0l0g0/nucleo-c071rb/src/stm32_boot.c |   4 -
 .../stm32f0l0g0/nucleo-c092rc/src/CMakeLists.txt   |   4 -
 boards/arm/stm32f0l0g0/nucleo-c092rc/src/Make.defs |   4 -
 .../stm32f0l0g0/nucleo-c092rc/src/stm32_appinit.c  |  73 ----
 .../arm/stm32f0l0g0/nucleo-c092rc/src/stm32_boot.c |   4 -
 .../stm32f0l0g0/nucleo-f072rb/src/CMakeLists.txt   |   4 -
 boards/arm/stm32f0l0g0/nucleo-f072rb/src/Make.defs |   4 -
 .../stm32f0l0g0/nucleo-f072rb/src/stm32_appinit.c  |  73 ----
 .../stm32f0l0g0/nucleo-f091rc/src/CMakeLists.txt   |   4 -
 boards/arm/stm32f0l0g0/nucleo-f091rc/src/Make.defs |   4 -
 .../stm32f0l0g0/nucleo-f091rc/src/stm32_appinit.c  |  73 ----
 .../stm32f0l0g0/nucleo-g070rb/src/CMakeLists.txt   |   4 -
 boards/arm/stm32f0l0g0/nucleo-g070rb/src/Make.defs |   4 -
 .../stm32f0l0g0/nucleo-g070rb/src/stm32_appinit.c  |  81 ----
 .../arm/stm32f0l0g0/nucleo-g070rb/src/stm32_boot.c |   4 -
 .../stm32f0l0g0/nucleo-g070rb/src/stm32_bringup.c  |   4 -
 .../stm32f0l0g0/nucleo-g071rb/src/CMakeLists.txt   |   4 -
 boards/arm/stm32f0l0g0/nucleo-g071rb/src/Make.defs |   4 -
 .../stm32f0l0g0/nucleo-g071rb/src/stm32_appinit.c  |  77 ----
 .../stm32f0l0g0/nucleo-g0b1re/src/CMakeLists.txt   |   4 -
 boards/arm/stm32f0l0g0/nucleo-g0b1re/src/Make.defs |   4 -
 .../stm32f0l0g0/nucleo-g0b1re/src/stm32_appinit.c  |  77 ----
 .../stm32f0l0g0/nucleo-l073rz/src/CMakeLists.txt   |   4 -
 boards/arm/stm32f0l0g0/nucleo-l073rz/src/Make.defs |   4 -
 .../stm32f0l0g0/nucleo-l073rz/src/stm32_appinit.c  |  81 ----
 .../stm32f051-discovery/src/CMakeLists.txt         |   4 -
 .../stm32f0l0g0/stm32f051-discovery/src/Make.defs  |   4 -
 .../stm32f051-discovery/src/stm32_appinit.c        |  73 ----
 .../stm32f072-discovery/src/CMakeLists.txt         |   4 -
 .../stm32f0l0g0/stm32f072-discovery/src/Make.defs  |   4 -
 .../stm32f072-discovery/src/stm32_appinit.c        |  73 ----
 .../stm32g071b-disco/src/CMakeLists.txt            |   4 -
 .../arm/stm32f0l0g0/stm32g071b-disco/src/Make.defs |   4 -
 .../stm32g071b-disco/src/stm32_appinit.c           |  73 ----
 .../stm32l0538-disco/src/CMakeLists.txt            |   4 -
 .../arm/stm32f0l0g0/stm32l0538-disco/src/Make.defs |   4 -
 .../stm32l0538-disco/src/stm32_appinit.c           |  73 ----
 .../arm/stm32f7/nucleo-f722ze/src/CMakeLists.txt   |   4 -
 boards/arm/stm32f7/nucleo-f722ze/src/Make.defs     |   4 -
 .../arm/stm32f7/nucleo-f722ze/src/nucleo-f722ze.h  |   9 +-
 .../nucleo-f722ze/src/stm32_appinitialize.c        |  75 ----
 .../arm/stm32f7/nucleo-f746zg/src/CMakeLists.txt   |   4 -
 boards/arm/stm32f7/nucleo-f746zg/src/Make.defs     |   4 -
 .../arm/stm32f7/nucleo-f746zg/src/nucleo-f746zg.h  |   9 +-
 .../nucleo-f746zg/src/stm32_appinitialize.c        |  75 ----
 .../arm/stm32f7/nucleo-f767zi/src/CMakeLists.txt   |   4 -
 boards/arm/stm32f7/nucleo-f767zi/src/Make.defs     |   4 -
 .../arm/stm32f7/nucleo-f767zi/src/nucleo-f767zi.h  |  10 +-
 .../nucleo-f767zi/src/stm32_appinitialize.c        |  75 ----
 .../arm/stm32f7/steval-eth001v1/src/CMakeLists.txt |   4 -
 boards/arm/stm32f7/steval-eth001v1/src/Make.defs   |   4 -
 .../stm32f7/steval-eth001v1/src/stm32_appinit.c    |  74 ----
 boards/arm/stm32f7/steval-eth001v1/src/stm32_foc.c |   2 -
 boards/arm/stm32f7/stm32f746-ws/src/CMakeLists.txt |   4 -
 boards/arm/stm32f7/stm32f746-ws/src/Make.defs      |   4 -
 .../stm32f7/stm32f746-ws/src/stm32_appinitialize.c | 104 ------
 boards/arm/stm32f7/stm32f746-ws/src/stm32_boot.c   |  62 ++-
 .../stm32f7/stm32f746g-disco/src/CMakeLists.txt    |   4 -
 boards/arm/stm32f7/stm32f746g-disco/src/Make.defs  |   4 -
 .../stm32f746g-disco/src/stm32_appinitialize.c     |  74 ----
 .../stm32f7/stm32f769i-disco/src/CMakeLists.txt    |   4 -
 boards/arm/stm32f7/stm32f769i-disco/src/Make.defs  |   4 -
 .../stm32f769i-disco/src/stm32_appinitialize.c     |  72 ----
 .../stm32f777zit6-meadow/src/CMakeLists.txt        |   7 +-
 .../arm/stm32f7/stm32f777zit6-meadow/src/Make.defs |   3 -
 .../stm32f777zit6-meadow/src/stm32_appinitialize.c |  72 ----
 .../stm32f7/stm32f777zit6-meadow/src/stm32_boot.c  |   8 -
 .../arm/stm32h5/nucleo-h563zi/src/CMakeLists.txt   |   4 -
 boards/arm/stm32h5/nucleo-h563zi/src/Makefile      |   4 -
 .../arm/stm32h5/nucleo-h563zi/src/stm32_appinit.c  |  73 ----
 .../stm32h7/linum-stm32h753bi/src/CMakeLists.txt   |   4 -
 boards/arm/stm32h7/linum-stm32h753bi/src/Makefile  |   4 -
 .../linum-stm32h753bi/src/linum-stm32h753bi.h      |   4 -
 .../linum-stm32h753bi/src/stm32_appinitialize.c    |  78 ----
 .../stm32h7/linum-stm32h753bi/src/stm32_bringup.c  |   4 -
 .../stm32h7/linum-stm32h753bi/src/stm32_usbmsc.c   |   3 +-
 .../stm32h7/nucleo-h723zg/configs/oa_tc6/defconfig |   1 -
 .../arm/stm32h7/nucleo-h723zg/src/CMakeLists.txt   |   4 -
 boards/arm/stm32h7/nucleo-h723zg/src/Makefile      |   4 -
 .../nucleo-h723zg/src/stm32_appinitialize.c        |  78 ----
 .../arm/stm32h7/nucleo-h723zg/src/stm32_usbmsc.c   |   3 +-
 .../arm/stm32h7/nucleo-h743zi/src/CMakeLists.txt   |   4 -
 boards/arm/stm32h7/nucleo-h743zi/src/Makefile      |   4 -
 .../arm/stm32h7/nucleo-h743zi/src/nucleo-h743zi.h  |   4 -
 .../nucleo-h743zi/src/stm32_appinitialize.c        |  78 ----
 .../arm/stm32h7/nucleo-h743zi/src/stm32_bringup.c  |   4 -
 .../arm/stm32h7/nucleo-h743zi/src/stm32_usbmsc.c   |   3 +-
 .../arm/stm32h7/nucleo-h743zi2/src/CMakeLists.txt  |   4 -
 boards/arm/stm32h7/nucleo-h743zi2/src/Makefile     |   4 -
 .../nucleo-h743zi2/src/stm32_appinitialize.c       |  77 ----
 .../arm/stm32h7/nucleo-h743zi2/src/stm32_bringup.c |   4 -
 .../arm/stm32h7/nucleo-h745zi/src/CMakeLists.txt   |   4 -
 boards/arm/stm32h7/nucleo-h745zi/src/Makefile      |   4 -
 .../arm/stm32h7/nucleo-h745zi/src/nucleo-h745zi.h  |   4 -
 .../nucleo-h745zi/src/stm32_appinitialize.c        |  78 ----
 .../arm/stm32h7/nucleo-h745zi/src/stm32_bringup.c  |   6 +-
 boards/arm/stm32h7/openh743i/src/CMakeLists.txt    |   4 -
 boards/arm/stm32h7/openh743i/src/Makefile          |   4 -
 .../stm32h7/openh743i/src/stm32_appinitialize.c    |  78 ----
 boards/arm/stm32h7/openh743i/src/stm32_boot.c      |   6 -
 boards/arm/stm32h7/openh743i/src/stm32_bringup.c   |   2 -
 boards/arm/stm32h7/openh743i/src/stm32_usbmsc.c    |   3 +-
 boards/arm/stm32h7/portenta-h7/src/CMakeLists.txt  |   4 -
 boards/arm/stm32h7/portenta-h7/src/Makefile        |   4 -
 boards/arm/stm32h7/portenta-h7/src/portenta-h7.h   |   4 -
 .../stm32h7/portenta-h7/src/stm32_appinitialize.c  |  78 ----
 boards/arm/stm32h7/portenta-h7/src/stm32_bringup.c |   4 -
 .../stm32h7/stm32h745i-disco/src/CMakeLists.txt    |   4 -
 boards/arm/stm32h7/stm32h745i-disco/src/Makefile   |   4 -
 .../stm32h745i-disco/src/stm32_appinitialize.c     |  78 ----
 .../stm32h7/stm32h745i-disco/src/stm32_bringup.c   |   4 -
 .../stm32h7/stm32h747i-disco/src/CMakeLists.txt    |   4 -
 boards/arm/stm32h7/stm32h747i-disco/src/Makefile   |   4 -
 .../stm32h747i-disco/src/stm32_appinitialize.c     |  78 ----
 .../stm32h7/stm32h747i-disco/src/stm32_bringup.c   |   4 -
 .../stm32h747i-disco/src/stm32h747i-disco.h        |   4 -
 .../arm/stm32h7/stm32h750b-dk/src/CMakeLists.txt   |   4 -
 boards/arm/stm32h7/stm32h750b-dk/src/Makefile      |   6 +-
 .../stm32h750b-dk/src/stm32_appinitialize.c        |  76 ----
 .../arm/stm32h7/stm32h750b-dk/src/stm32_bringup.c  |   4 -
 .../arm/stm32h7/weact-stm32h743/src/CMakeLists.txt |   4 -
 boards/arm/stm32h7/weact-stm32h743/src/Makefile    |   4 -
 .../weact-stm32h743/src/stm32_appinitialize.c      |  78 ----
 .../stm32h7/weact-stm32h743/src/stm32_bringup.c    |   4 -
 .../stm32h7/weact-stm32h743/src/weact-stm32h743.h  |   4 -
 .../arm/stm32h7/weact-stm32h750/src/CMakeLists.txt |   7 +-
 boards/arm/stm32h7/weact-stm32h750/src/Makefile    |   4 -
 .../weact-stm32h750/src/stm32_appinitialize.c      |  78 ----
 .../stm32h7/weact-stm32h750/src/stm32_bringup.c    |   4 -
 .../stm32h7/weact-stm32h750/src/weact-stm32h750.h  |   4 -
 .../arm/stm32l4/b-l475e-iot01a/src/CMakeLists.txt  |   4 -
 boards/arm/stm32l4/b-l475e-iot01a/src/Makefile     |   4 -
 .../stm32l4/b-l475e-iot01a/src/b-l475e-iot01a.h    |   6 +-
 .../arm/stm32l4/b-l475e-iot01a/src/stm32_appinit.c |  77 ----
 .../arm/stm32l4/b-l475e-iot01a/src/stm32_bringup.c |   6 +-
 .../arm/stm32l4/nucleo-l432kc/src/CMakeLists.txt   |   7 +-
 boards/arm/stm32l4/nucleo-l432kc/src/Makefile      |   3 -
 .../arm/stm32l4/nucleo-l432kc/src/stm32_appinit.c  |  76 ----
 boards/arm/stm32l4/nucleo-l432kc/src/stm32_boot.c  |   2 +-
 .../arm/stm32l4/nucleo-l432kc/src/stm32_bringup.c  |   3 +-
 .../arm/stm32l4/nucleo-l452re/src/CMakeLists.txt   |   4 -
 boards/arm/stm32l4/nucleo-l452re/src/Makefile      |   4 -
 .../arm/stm32l4/nucleo-l452re/src/stm32_appinit.c  |  73 ----
 .../arm/stm32l4/nucleo-l476rg/src/CMakeLists.txt   |   7 +-
 boards/arm/stm32l4/nucleo-l476rg/src/Makefile      |   3 -
 .../arm/stm32l4/nucleo-l476rg/src/stm32_appinit.c  |  76 ----
 boards/arm/stm32l4/nucleo-l476rg/src/stm32_boot.c  |   2 +-
 .../arm/stm32l4/nucleo-l496zg/src/CMakeLists.txt   |   7 +-
 boards/arm/stm32l4/nucleo-l496zg/src/Makefile      |   3 -
 .../arm/stm32l4/nucleo-l496zg/src/stm32_appinit.c  |  76 ----
 .../nucleo-l496zg/src/stm32_appinitialize.c        | 208 -----------
 boards/arm/stm32l4/nucleo-l496zg/src/stm32_boot.c  |  16 +-
 .../stm32l4/steval-stlcs01v1/src/CMakeLists.txt    |   4 -
 boards/arm/stm32l4/steval-stlcs01v1/src/Makefile   |   4 -
 .../steval-stlcs01v1/src/steval-stlcs01v1.h        |   9 +-
 .../stm32l4/steval-stlcs01v1/src/stm32_appinit.c   |  79 ----
 .../arm/stm32l4/stm32l476-mdk/src/CMakeLists.txt   |   6 +-
 boards/arm/stm32l4/stm32l476-mdk/src/Makefile      |   6 +-
 .../arm/stm32l4/stm32l476-mdk/src/stm32_appinit.c  |  77 ----
 boards/arm/stm32l4/stm32l476-mdk/src/stm32_boot.c  | 101 ++++-
 .../arm/stm32l4/stm32l476-mdk/src/stm32_bringup.c  | 168 ---------
 boards/arm/stm32l4/stm32l476vg-disco/src/Makefile  |   3 -
 .../stm32l4/stm32l476vg-disco/src/stm32_appinit.c  |  76 ----
 .../arm/stm32l4/stm32l476vg-disco/src/stm32_boot.c |   2 +-
 boards/arm/stm32l4/stm32l4r9ai-disco/src/Makefile  |   3 -
 .../stm32l4/stm32l4r9ai-disco/src/stm32_appinit.c  |  76 ----
 .../arm/stm32l4/stm32l4r9ai-disco/src/stm32_boot.c |   2 +-
 .../arm/stm32l5/nucleo-l552ze/src/CMakeLists.txt   |   4 -
 boards/arm/stm32l5/nucleo-l552ze/src/Makefile      |   4 -
 .../arm/stm32l5/nucleo-l552ze/src/stm32_appinit.c  |  73 ----
 .../arm/stm32l5/stm32l562e-dk/src/CMakeLists.txt   |   4 -
 boards/arm/stm32l5/stm32l562e-dk/src/Makefile      |   4 -
 .../arm/stm32l5/stm32l562e-dk/src/stm32_appinit.c  |  73 ----
 .../arm/stm32u5/b-u585i-iot02a/src/CMakeLists.txt  |   4 -
 boards/arm/stm32u5/b-u585i-iot02a/src/Makefile     |   4 -
 .../arm/stm32u5/b-u585i-iot02a/src/stm32_appinit.c |  73 ----
 .../arm/stm32u5/nucleo-u5a5zj-q/src/CMakeLists.txt |   4 -
 boards/arm/stm32u5/nucleo-u5a5zj-q/src/Makefile    |   4 -
 .../stm32u5/nucleo-u5a5zj-q/src/stm32_appinit.c    |  73 ----
 boards/arm/stm32wb/flipperzero/src/CMakeLists.txt  |   4 -
 boards/arm/stm32wb/flipperzero/src/Makefile        |   4 -
 boards/arm/stm32wb/flipperzero/src/stm32_appinit.c | 196 ----------
 boards/arm/stm32wb/flipperzero/src/stm32_boot.c    | 122 +++++-
 .../arm/stm32wb/nucleo-wb55rg/src/CMakeLists.txt   |   4 -
 boards/arm/stm32wb/nucleo-wb55rg/src/Makefile      |   4 -
 .../arm/stm32wb/nucleo-wb55rg/src/stm32_appinit.c  | 188 ----------
 boards/arm/stm32wb/nucleo-wb55rg/src/stm32_boot.c  | 116 +++++-
 .../arm/stm32wl5/nucleo-wl55jc/src/CMakeLists.txt  |   4 -
 boards/arm/stm32wl5/nucleo-wl55jc/src/Makefile     |   1 -
 .../arm/stm32wl5/nucleo-wl55jc/src/stm32_appinit.c | 175 ---------
 boards/arm/stm32wl5/nucleo-wl55jc/src/stm32_boot.c | 103 ++++-
 boards/arm/str71x/olimex-strp711/src/Makefile      |   6 +-
 .../src/{str71_appinit.c => str71_boardinit.c}     |  38 +-
 boards/arm/tiva/dk-tm4c129x/src/Makefile           |   4 -
 boards/arm/tiva/dk-tm4c129x/src/tm4c_appinit.c     |  71 ----
 boards/arm/tiva/eagle100/src/Makefile              |   3 -
 boards/arm/tiva/eagle100/src/lm_appinit.c          | 139 -------
 boards/arm/tiva/eagle100/src/lm_boot.c             |  94 ++++-
 boards/arm/tiva/ekk-lm3s9b96/src/CMakeLists.txt    |   3 -
 boards/arm/tiva/ekk-lm3s9b96/src/Makefile          |   3 -
 boards/arm/tiva/ekk-lm3s9b96/src/lm_appinit.c      |  69 ----
 boards/arm/tiva/ekk-lm3s9b96/src/lm_boot.c         |  20 +
 boards/arm/tiva/launchxl-cc1310/src/Makefile       |   8 +-
 .../arm/tiva/launchxl-cc1310/src/cc1310_appinit.c  |  77 ----
 .../arm/tiva/launchxl-cc1312r1/src/CMakeLists.txt  |   8 +-
 boards/arm/tiva/launchxl-cc1312r1/src/Makefile     |   8 +-
 .../tiva/launchxl-cc1312r1/src/cc1312_appinit.c    |  77 ----
 boards/arm/tiva/lm3s6432-s2e/src/Makefile          |   3 -
 boards/arm/tiva/lm3s6432-s2e/src/lm_appinit.c      |  67 ----
 boards/arm/tiva/lm3s6432-s2e/src/lm_boot.c         |  20 +
 boards/arm/tiva/lm3s6965-ek/src/CMakeLists.txt     |   4 -
 boards/arm/tiva/lm3s6965-ek/src/Makefile           |   4 -
 boards/arm/tiva/lm3s6965-ek/src/lm_appinit.c       |  65 ----
 boards/arm/tiva/lm3s8962-ek/src/CMakeLists.txt     |   4 -
 boards/arm/tiva/lm3s8962-ek/src/Makefile           |   4 -
 boards/arm/tiva/lm3s8962-ek/src/lm_appinit.c       | 138 -------
 boards/arm/tiva/lm3s8962-ek/src/lm_boot.c          |  91 +++++
 .../arm/tiva/lm4f120-launchpad/src/CMakeLists.txt  |   4 -
 boards/arm/tiva/lm4f120-launchpad/src/Makefile     |   4 -
 .../arm/tiva/lm4f120-launchpad/src/lm4f_appinit.c  |  88 -----
 boards/arm/tiva/lm4f120-launchpad/src/lm4f_boot.c  |  19 +
 .../arm/tiva/tm4c123g-launchpad/src/CMakeLists.txt |   4 -
 boards/arm/tiva/tm4c123g-launchpad/src/Makefile    |   4 -
 .../arm/tiva/tm4c123g-launchpad/src/tm4c_appinit.c |  73 ----
 .../arm/tiva/tm4c1294-launchpad/src/CMakeLists.txt |   4 -
 boards/arm/tiva/tm4c1294-launchpad/src/Makefile    |   4 -
 .../arm/tiva/tm4c1294-launchpad/src/tm4c_appinit.c |  77 ----
 .../arm/tiva/tm4c129e-launchpad/src/CMakeLists.txt |   4 -
 boards/arm/tiva/tm4c129e-launchpad/src/Makefile    |   4 -
 .../arm/tiva/tm4c129e-launchpad/src/tm4c_appinit.c |  77 ----
 boards/arm/tlsr82/tlsr8278adk80d/src/Makefile      |   1 -
 .../tlsr82/tlsr8278adk80d/src/tlsr8278_appinit.c   |  94 -----
 .../arm/tlsr82/tlsr8278adk80d/src/tlsr8278_boot.c  |  29 ++
 .../tms570/launchxl-tms57004/src/CMakeLists.txt    |   4 -
 boards/arm/tms570/launchxl-tms57004/src/Makefile   |   4 -
 .../tms570/launchxl-tms57004/src/tms570_appinit.c  |  72 ----
 .../tms570/tms570ls31x-usb-kit/src/CMakeLists.txt  |   4 -
 boards/arm/tms570/tms570ls31x-usb-kit/src/Makefile |   4 -
 .../tms570ls31x-usb-kit/src/tms570_appinit.c       |  72 ----
 boards/arm/xmc4/xmc4500-relax/src/CMakeLists.txt   |   4 -
 boards/arm/xmc4/xmc4500-relax/src/Makefile         |   4 -
 boards/arm/xmc4/xmc4500-relax/src/xmc4_appinit.c   |  73 ----
 boards/arm/xmc4/xmc4700-relax/src/CMakeLists.txt   |   4 -
 boards/arm/xmc4/xmc4700-relax/src/Makefile         |   4 -
 boards/arm/xmc4/xmc4700-relax/src/xmc4_appinit.c   |  73 ----
 boards/arm/xmc4/xmc4800-relax/src/CMakeLists.txt   |   4 -
 boards/arm/xmc4/xmc4800-relax/src/Makefile         |   4 -
 boards/arm/xmc4/xmc4800-relax/src/xmc4_appinit.c   |  73 ----
 946 files changed, 6681 insertions(+), 27430 deletions(-)

diff --git a/boards/arm/a1x/pcduino-a10/src/CMakeLists.txt b/boards/arm/a1x/pcduino-a10/src/CMakeLists.txt
index cc31b938751..c65ee126397 100644
--- a/boards/arm/a1x/pcduino-a10/src/CMakeLists.txt
+++ b/boards/arm/a1x/pcduino-a10/src/CMakeLists.txt
@@ -22,10 +22,6 @@
 
 set(SRCS a1x_boot.c a1x_bringup.c a1x_leds.c)
 
-if(CONFIG_BOARDCTL)
-  list(APPEND SRCS a1x_appinit.c)
-endif()
-
 if(CONFIG_ARCH_BUTTONS)
   list(APPEND SRCS a1x_buttons.c)
 endif()
diff --git a/boards/arm/a1x/pcduino-a10/src/Makefile b/boards/arm/a1x/pcduino-a10/src/Makefile
index bcaa1debec9..cecb3d5cf0c 100644
--- a/boards/arm/a1x/pcduino-a10/src/Makefile
+++ b/boards/arm/a1x/pcduino-a10/src/Makefile
@@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs
 
 CSRCS = a1x_boot.c a1x_bringup.c a1x_leds.c
 
-ifeq ($(CONFIG_BOARDCTL),y)
-CSRCS += a1x_appinit.c
-endif
-
 ifeq ($(CONFIG_ARCH_BUTTONS),y)
 CSRCS += a1x_buttons.c
 endif
diff --git a/boards/arm/a1x/pcduino-a10/src/a1x_appinit.c b/boards/arm/a1x/pcduino-a10/src/a1x_appinit.c
deleted file mode 100644
index 3471ef774ea..00000000000
--- a/boards/arm/a1x/pcduino-a10/src/a1x_appinit.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/****************************************************************************
- * boards/arm/a1x/pcduino-a10/src/a1x_appinit.c
- *
- * SPDX-License-Identifier: Apache-2.0
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <sys/types.h>
-#include <stdint.h>
-
-#include <nuttx/board.h>
-
-#include "pcduino_a10.h"
-
-/****************************************************************************
- * Pre-processor Definitions
- ****************************************************************************/
-
-/****************************************************************************
- * 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 a1x_bringup();
-#endif
-}
diff --git a/boards/arm/am335x/beaglebone-black/src/CMakeLists.txt b/boards/arm/am335x/beaglebone-black/src/CMakeLists.txt
index 90057ac2ca6..f0acea7cbc7 100644
--- a/boards/arm/am335x/beaglebone-black/src/CMakeLists.txt
+++ b/boards/arm/am335x/beaglebone-black/src/CMakeLists.txt
@@ -22,10 +22,6 @@
 
 set(SRCS am335x_boot.c am335x_bringup.c am335x_leds.c)
 
-if(CONFIG_BOARDCTL)
-  list(APPEND SRCS am335x_appinit.c)
-endif()
-
 if(CONFIG_ARCH_BUTTONS)
   list(APPEND SRCS am335x_buttons.c)
 endif()
diff --git a/boards/arm/am335x/beaglebone-black/src/Makefile b/boards/arm/am335x/beaglebone-black/src/Makefile
index 4ee7508a804..5002d5d8ca5 100644
--- a/boards/arm/am335x/beaglebone-black/src/Makefile
+++ b/boards/arm/am335x/beaglebone-black/src/Makefile
@@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs
 
 CSRCS = am335x_boot.c am335x_bringup.c am335x_leds.c
 
-ifeq ($(CONFIG_BOARDCTL),y)
-CSRCS += am335x_appinit.c
-endif
-
 ifeq ($(CONFIG_ARCH_BUTTONS),y)
 CSRCS += am335x_buttons.c
 endif
diff --git a/boards/arm/am335x/beaglebone-black/src/am335x_appinit.c b/boards/arm/am335x/beaglebone-black/src/am335x_appinit.c
deleted file mode 100644
index 821436013fa..00000000000
--- a/boards/arm/am335x/beaglebone-black/src/am335x_appinit.c
+++ /dev/null
@@ -1,78 +0,0 @@
-/****************************************************************************
- * boards/arm/am335x/beaglebone-black/src/am335x_appinit.c
- *
- * SPDX-License-Identifier: Apache-2.0
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <sys/types.h>
-#include <nuttx/board.h>
-
-#include "beaglebone-black.h"
-
-/****************************************************************************
- * Pre-processor Definitions
- ****************************************************************************/
-
-/****************************************************************************
- * 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 am335x_bringup();
-#endif
-}
diff --git a/boards/arm/at32/at32f437-mini/src/Makefile b/boards/arm/at32/at32f437-mini/src/Makefile
index fe4346a648a..291e0427054 100644
--- a/boards/arm/at32/at32f437-mini/src/Makefile
+++ b/boards/arm/at32/at32f437-mini/src/Makefile
@@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs
 
 CSRCS = at32_boot.c at32_bringup.c
 
-ifeq ($(CONFIG_BOARDCTL),y)
-	CSRCS += at32_appinit.c
-endif
-
 ifeq ($(CONFIG_DEV_GPIO),y)
 	CSRCS += at32_gpio.c
 endif
diff --git a/boards/arm/at32/at32f437-mini/src/at32_appinit.c b/boards/arm/at32/at32f437-mini/src/at32_appinit.c
deleted file mode 100644
index 777531517b6..00000000000
--- a/boards/arm/at32/at32f437-mini/src/at32_appinit.c
+++ /dev/null
@@ -1,78 +0,0 @@
-/****************************************************************************
- * boards/arm/at32/at32f437-mini/src/at32_appinit.c
- *
- * SPDX-License-Identifier: Apache-2.0
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <sys/types.h>
-#include <nuttx/board.h>
-
-#include "at32f437-mini.h"
-
-/****************************************************************************
- * Pre-processor Definitions
- ****************************************************************************/
-
-/****************************************************************************
- * 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 at32_bringup();
-#endif
-}
diff --git a/boards/arm/c5471/c5471evm/src/c5471_leds.c b/boards/arm/c5471/c5471evm/src/c5471_leds.c
index c90c4e18d60..a9483aa8e55 100644
--- a/boards/arm/c5471/c5471evm/src/c5471_leds.c
+++ b/boards/arm/c5471/c5471evm/src/c5471_leds.c
@@ -96,3 +96,22 @@ void board_autoled_off(int led)
 }
 
 #endif /* CONFIG_ARCH_LEDS */
+
+/****************************************************************************
+ * Name: board_late_initialize
+ *
+ * Description:
+ *   If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional
+ *   initialization call will be performed in the boot-up sequence to a
+ *   function called board_late_initialize(). board_late_initialize() will be
+ *   called immediately after up_initialize() is called and just before the
+ *   initial application is started.  This additional initialization phase
+ *   may be used, for example, to initialize board-specific device drivers.
+ *
+ ****************************************************************************/
+
+#ifdef CONFIG_BOARD_LATE_INITIALIZE
+void board_late_initialize(void)
+{
+}
+#endif /* CONFIG_BOARD_LATE_INITIALIZE */
diff --git a/boards/arm/csk6/csk6011a-nano/src/CMakeLists.txt b/boards/arm/csk6/csk6011a-nano/src/CMakeLists.txt
index f8c5639559f..4941a4d551f 100644
--- a/boards/arm/csk6/csk6011a-nano/src/CMakeLists.txt
+++ b/boards/arm/csk6/csk6011a-nano/src/CMakeLists.txt
@@ -20,7 +20,7 @@
 #
 # ##############################################################################
 
-set(SRCS csk6011a_nano_appinit.c)
+set(SRCS csk6011a_nano_boardinit.c)
 
 target_sources(board PRIVATE ${SRCS})
 
diff --git a/boards/arm/csk6/csk6011a-nano/src/Makefile b/boards/arm/csk6/csk6011a-nano/src/Makefile
index ccece7f7ad2..31b18025fa9 100644
--- a/boards/arm/csk6/csk6011a-nano/src/Makefile
+++ b/boards/arm/csk6/csk6011a-nano/src/Makefile
@@ -22,6 +22,6 @@
 
 include $(TOPDIR)/Make.defs
 
-CSRCS = csk6011a_nano_appinit.c
+CSRCS = csk6011a_nano_boardinit.c
 
 include $(TOPDIR)/boards/Board.mk
diff --git a/boards/arm/csk6/csk6011a-nano/src/csk6011a_nano_appinit.c b/boards/arm/csk6/csk6011a-nano/src/csk6011a_nano_boardinit.c
similarity index 67%
rename from boards/arm/csk6/csk6011a-nano/src/csk6011a_nano_appinit.c
rename to boards/arm/csk6/csk6011a-nano/src/csk6011a_nano_boardinit.c
index 482c6991344..9809a14bc78 100644
--- a/boards/arm/csk6/csk6011a-nano/src/csk6011a_nano_appinit.c
+++ b/boards/arm/csk6/csk6011a-nano/src/csk6011a_nano_boardinit.c
@@ -1,5 +1,5 @@
 /****************************************************************************
- * boards/arm/csk6/csk6011a-nano/src/csk6011a_nano_appinit.c
+ * boards/arm/csk6/csk6011a-nano/src/csk6011a_nano_boardinit.c
  *
  * SPDX-License-Identifier: Apache-2.0
  *
@@ -26,7 +26,12 @@
 
 #include <nuttx/config.h>
 
+#include <nuttx/debug.h>
+
+#include <stdio.h>
+#include <errno.h>
 #include <sys/types.h>
+
 #include <nuttx/board.h>
 
 /****************************************************************************
@@ -60,46 +65,23 @@ static const char verification_table[] VERIFICATION_TABLE_ATTR =
  ****************************************************************************/
 
 /****************************************************************************
- * Name: board_app_initialize
+ * Name: board_late_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.
+ *   If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional
+ *   initialization call will be performed in the boot-up sequence to a
+ *   function called board_late_initialize(). board_late_initialize() will be
+ *   called immediately after up_intitialize() is called and just before the
+ *   initial application is started.  This additional initialization phase
+ *   may be used, for example, to initialize board-specific device drivers.
  *
  ****************************************************************************/
 
-int board_app_initialize(uintptr_t arg)
-{
-  /* Perform board-specific initialization */
-
-  /* TODO */
-
-  return OK;
-}
-
 #ifdef CONFIG_BOARD_LATE_INITIALIZE
-
 void board_late_initialize(void)
 {
   /* Perform board-specific initialization */
 
   /* TODO */
 }
-
 #endif
diff --git a/boards/arm/cxd56xx/common/src/cxd56_usbmsc.c b/boards/arm/cxd56xx/common/src/cxd56_usbmsc.c
index 0f6b95b92fb..b84b4373cf1 100644
--- a/boards/arm/cxd56xx/common/src/cxd56_usbmsc.c
+++ b/boards/arm/cxd56xx/common/src/cxd56_usbmsc.c
@@ -54,8 +54,7 @@
 int board_usbmsc_initialize(int port)
 {
   /* If system/usbmsc is built as an NSH command, then SD slot should
-   * already have been initialized in board_app_initialize()
-   * (see stm32_appinit.c).
+   * already have been initialized.
    * In this case, there is nothing further to be done here.
    */
 
diff --git a/boards/arm/cxd56xx/spresense/src/CMakeLists.txt b/boards/arm/cxd56xx/spresense/src/CMakeLists.txt
index 25f089b3f0d..ea80531c4cf 100644
--- a/boards/arm/cxd56xx/spresense/src/CMakeLists.txt
+++ b/boards/arm/cxd56xx/spresense/src/CMakeLists.txt
@@ -22,12 +22,8 @@
 
 set(SRCS)
 
-set(SRCS cxd56_main.c cxd56_clock.c cxd56_bringup.c)
-
-if(CONFIG_BOARDCTL)
-  list(APPEND SRCS cxd56_appinit.c)
-  list(APPEND SRCS cxd56_power.c)
-endif()
+set(SRCS cxd56_main.c cxd56_clock.c cxd56_bringup.c cxd56_boardinit.c
+         cxd56_power.c)
 
 if(CONFIG_BOARDCTL_IOCTL)
   list(APPEND SRCS cxd56_ioctl.c)
diff --git a/boards/arm/cxd56xx/spresense/src/Make.defs b/boards/arm/cxd56xx/spresense/src/Make.defs
index 06e14e890d8..3fc13a2db2a 100644
--- a/boards/arm/cxd56xx/spresense/src/Make.defs
+++ b/boards/arm/cxd56xx/spresense/src/Make.defs
@@ -23,11 +23,8 @@
 CSRCS += cxd56_main.c
 CSRCS += cxd56_clock.c
 CSRCS += cxd56_bringup.c
-
-ifeq ($(CONFIG_BOARDCTL),y)
-CSRCS += cxd56_appinit.c
+CSRCS += cxd56_boardinit.c
 CSRCS += cxd56_power.c
-endif
 
 ifeq ($(CONFIG_BOARDCTL_IOCTL),y)
 CSRCS += cxd56_ioctl.c
diff --git a/boards/arm/cxd56xx/spresense/src/cxd56_appinit.c b/boards/arm/cxd56xx/spresense/src/cxd56_appinit.c
deleted file mode 100644
index e1d29d36c47..00000000000
--- a/boards/arm/cxd56xx/spresense/src/cxd56_appinit.c
+++ /dev/null
@@ -1,104 +0,0 @@
-/****************************************************************************
- * boards/arm/cxd56xx/spresense/src/cxd56_appinit.c
- *
- * SPDX-License-Identifier: Apache-2.0
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-#include <nuttx/compiler.h>
-
-#include <sys/types.h>
-#include <nuttx/board.h>
-
-#include "spresense.h"
-
-/****************************************************************************
- * Pre-processor Definitions
- ****************************************************************************/
-
-/****************************************************************************
- * 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 cxd56_bringup();
-#endif
-}
-
-/****************************************************************************
- * Name: board_late_initialize
- *
- * Description:
- *   If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional
- *   initialization call will be performed in the boot-up sequence to a
- *   function called board_late_initialize().  board_late_initialize()
- *   will be called immediately after up_initialize() is called and just
- *   before the initial application is started.  This additional
- *   initialization phase may be used, for example, to initialize board-
- *   specific device drivers.
- *
- ****************************************************************************/
-
-#ifdef CONFIG_BOARD_LATE_INITIALIZE
-void weak_function board_late_initialize(void)
-{
-  /* Perform board bring-up here instead of from the
-   * board_app_initialize().
-   */
-
-  cxd56_bringup();
-}
-#endif
diff --git a/boards/arm/stm32h7/openh743i/src/stm32_boot.c b/boards/arm/cxd56xx/spresense/src/cxd56_boardinit.c
similarity index 73%
copy from boards/arm/stm32h7/openh743i/src/stm32_boot.c
copy to boards/arm/cxd56xx/spresense/src/cxd56_boardinit.c
index 48aa8414257..c3c7544581d 100644
--- a/boards/arm/stm32h7/openh743i/src/stm32_boot.c
+++ b/boards/arm/cxd56xx/spresense/src/cxd56_boardinit.c
@@ -1,5 +1,5 @@
 /****************************************************************************
- * boards/arm/stm32h7/openh743i/src/stm32_boot.c
+ * boards/arm/cxd56xx/spresense/src/cxd56_boardinit.c
  *
  * SPDX-License-Identifier: Apache-2.0
  *
@@ -25,40 +25,26 @@
  ****************************************************************************/
 
 #include <nuttx/config.h>
+#include <nuttx/compiler.h>
 
 #include <nuttx/debug.h>
 
+#include <stdio.h>
+#include <errno.h>
+#include <sys/types.h>
+
 #include <nuttx/board.h>
-#include <arch/board/board.h>
 
-#include "arm_internal.h"
-#include "stm32_start.h"
-#include "openh743i.h"
+#include "spresense.h"
 
 /****************************************************************************
- * Public Functions
+ * Pre-processor Definitions
  ****************************************************************************/
 
 /****************************************************************************
- * Name: stm32_boardinitialize
- *
- * Description:
- *   All STM32 architectures must provide the following entry point.
- *   This entry point is called early in the initialization -- after all
- *   memory has been configured and mapped but before any devices have been
- *   initialized.
- *
+ * Public Functions
  ****************************************************************************/
 
-void stm32_boardinitialize(void)
-{
-#if defined(CONFIG_STM32H7_OTGFS_HOST) || defined(CONFIG_STM32H7_OTGHS_HOST)
-  /* Initialize USB */
-
-  stm32_usbinitialize();
-#endif
-}
-
 /****************************************************************************
  * Name: board_late_initialize
  *
@@ -74,14 +60,8 @@ void stm32_boardinitialize(void)
  ****************************************************************************/
 
 #ifdef CONFIG_BOARD_LATE_INITIALIZE
-void board_late_initialize(void)
+void weak_function board_late_initialize(void)
 {
-#if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_BOARDCTL)
-  /* Perform board bring-up here instead of from the
-   * board_app_initialize().
-   */
-
-  stm32_bringup();
-#endif
+  cxd56_bringup();
 }
 #endif
diff --git a/boards/arm/cxd56xx/spresense/src/cxd56_ioctl.c b/boards/arm/cxd56xx/spresense/src/cxd56_ioctl.c
index b70fc672fac..83b992d3f64 100644
--- a/boards/arm/cxd56xx/spresense/src/cxd56_ioctl.c
+++ b/boards/arm/cxd56xx/spresense/src/cxd56_ioctl.c
@@ -85,7 +85,6 @@ int board_ioctl(unsigned int cmd, uintptr_t arg)
        *                and supply current value.
        * ARG:           None
        * CONFIGURATION: CONFIG_BOARDCTL
-       * DEPENDENCIES:  Board logic must provide board_app_initialization
        */
 
       case BOARDIOC_USBDEV_SETNOTIFYSIG:
diff --git a/boards/arm/dm320/ntosd-dm320/src/Makefile b/boards/arm/dm320/ntosd-dm320/src/Makefile
index c84cc1751df..2dc99532d6c 100644
--- a/boards/arm/dm320/ntosd-dm320/src/Makefile
+++ b/boards/arm/dm320/ntosd-dm320/src/Makefile
@@ -28,8 +28,4 @@ ifeq ($(CONFIG_BOARD_LATE_INITIALIZE),y)
 CSRCS += dm320_boardinit.c
 endif
 
-ifeq ($(CONFIG_BOARDCTL),y)
-CSRCS += dm320_appinit.c
-endif
-
 include $(TOPDIR)/boards/Board.mk
diff --git a/boards/arm/dm320/ntosd-dm320/src/dm320_appinit.c b/boards/arm/dm320/ntosd-dm320/src/dm320_appinit.c
deleted file mode 100644
index 7f35a0afaf2..00000000000
--- a/boards/arm/dm320/ntosd-dm320/src/dm320_appinit.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/****************************************************************************
- * boards/arm/dm320/ntosd-dm320/src/dm320_appinit.c
- *
- * SPDX-License-Identifier: Apache-2.0
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <sys/types.h>
-#include <nuttx/board.h>
-
-/****************************************************************************
- * Pre-processor Definitions
- ****************************************************************************/
-
-/****************************************************************************
- * 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)
-{
-  return OK;
-}
diff --git a/boards/arm/eoss3/quickfeather/src/CMakeLists.txt b/boards/arm/eoss3/quickfeather/src/CMakeLists.txt
index 0b6d3334fba..4fdae9c25f6 100644
--- a/boards/arm/eoss3/quickfeather/src/CMakeLists.txt
+++ b/boards/arm/eoss3/quickfeather/src/CMakeLists.txt
@@ -20,7 +20,7 @@
 #
 # ##############################################################################
 
-set(SRCS eoss3_boot.c eoss3_bringup.c eoss3_appinit.c)
+set(SRCS eoss3_boot.c eoss3_bringup.c)
 
 if(CONFIG_ARCH_LEDS)
   list(APPEND SRCS eoss3_autoleds.c)
diff --git a/boards/arm/eoss3/quickfeather/src/Makefile b/boards/arm/eoss3/quickfeather/src/Makefile
index eaa7341472a..cdd0ae9c124 100644
--- a/boards/arm/eoss3/quickfeather/src/Makefile
+++ b/boards/arm/eoss3/quickfeather/src/Makefile
@@ -22,7 +22,7 @@
 
 include $(TOPDIR)/Make.defs
 
-CSRCS = eoss3_boot.c eoss3_bringup.c eoss3_appinit.c
+CSRCS = eoss3_boot.c eoss3_bringup.c
 
 ifeq ($(CONFIG_ARCH_LEDS),y)
 CSRCS += eoss3_autoleds.c
@@ -30,4 +30,4 @@ else
 CSRCS += eoss3_userleds.c
 endif
 
-include $(TOPDIR)/boards/Board.mk
\ No newline at end of file
+include $(TOPDIR)/boards/Board.mk
diff --git a/boards/arm/eoss3/quickfeather/src/eoss3_appinit.c b/boards/arm/eoss3/quickfeather/src/eoss3_appinit.c
deleted file mode 100644
index f5562cca630..00000000000
--- a/boards/arm/eoss3/quickfeather/src/eoss3_appinit.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/****************************************************************************
- * boards/arm/eoss3/quickfeather/src/eoss3_appinit.c
- *
- * SPDX-License-Identifier: Apache-2.0
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <sys/types.h>
-
-#include <nuttx/board.h>
-
-#ifdef CONFIG_BOARDCTL
-
-/****************************************************************************
- * 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)
-{
-  return OK;
-}
-
-#endif /* CONFIG_BOARDCTL */
diff --git a/boards/arm/fvp-v8r-aarch32/fvp-armv8r-aarch32/src/CMakeLists.txt b/boards/arm/fvp-v8r-aarch32/fvp-armv8r-aarch32/src/CMakeLists.txt
index b9932aa82a1..cc71d166c5c 100644
--- a/boards/arm/fvp-v8r-aarch32/fvp-armv8r-aarch32/src/CMakeLists.txt
+++ b/boards/arm/fvp-v8r-aarch32/fvp-armv8r-aarch32/src/CMakeLists.txt
@@ -22,10 +22,6 @@
 
 set(SRCS fvp_boardinit.c fvp_bringup.c)
 
-if(CONFIG_BOARDCTL)
-  list(APPEND SRCS fvp_appinit.c)
-endif()
-
 target_sources(board PRIVATE ${SRCS})
 
 set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/dramboot.ld")
diff --git a/boards/arm/fvp-v8r-aarch32/fvp-armv8r-aarch32/src/Makefile b/boards/arm/fvp-v8r-aarch32/fvp-armv8r-aarch32/src/Makefile
index 945a32b2d8e..404dd54a381 100644
--- a/boards/arm/fvp-v8r-aarch32/fvp-armv8r-aarch32/src/Makefile
+++ b/boards/arm/fvp-v8r-aarch32/fvp-armv8r-aarch32/src/Makefile
@@ -24,8 +24,4 @@ include $(TOPDIR)/Make.defs
 
 CSRCS = fvp_boardinit.c fvp_bringup.c
 
-ifeq ($(CONFIG_BOARDCTL),y)
-CSRCS += fvp_appinit.c
-endif
-
 include $(TOPDIR)/boards/Board.mk
diff --git a/boards/arm/fvp-v8r-aarch32/fvp-armv8r-aarch32/src/fvp_appinit.c b/boards/arm/fvp-v8r-aarch32/fvp-armv8r-aarch32/src/fvp_appinit.c
deleted file mode 100644
index f653f198ac5..00000000000
--- a/boards/arm/fvp-v8r-aarch32/fvp-armv8r-aarch32/src/fvp_appinit.c
+++ /dev/null
@@ -1,75 +0,0 @@
-/****************************************************************************
- * boards/arm/fvp-v8r-aarch32/fvp-armv8r-aarch32/src/fvp_appinit.c
- *
- * SPDX-License-Identifier: Apache-2.0
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-#include <sys/types.h>
-#include <nuttx/board.h>
-#include "fvp-armv8r.h"
-
-#ifdef CONFIG_BOARDCTL
-
-/****************************************************************************
- * 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)
-{
-  UNUSED(arg);
-#ifndef CONFIG_BOARD_LATE_INITIALIZE
-  /* Perform board initialization */
-
-  return fvp_bringup();
-#else
-  return OK;
-#endif
-}
-
-#endif /* CONFIG_BOARDCTL */
diff --git a/boards/arm/gd32f4/gd32f450zk-aiotbox/src/CMakeLists.txt b/boards/arm/gd32f4/gd32f450zk-aiotbox/src/CMakeLists.txt
index 7ae638988e7..a3eceac076d 100644
--- a/boards/arm/gd32f4/gd32f450zk-aiotbox/src/CMakeLists.txt
+++ b/boards/arm/gd32f4/gd32f450zk-aiotbox/src/CMakeLists.txt
@@ -22,9 +22,7 @@
 
 set(SRCS gd32f4xx_boot.c)
 
-if(CONFIG_BOARDCTL)
-  list(APPEND SRCS gd32f4xx_appinit.c gd32f4xx_bringup.c)
-elseif(CONFIG_BOARD_LATE_INITIALIZE)
+if(CONFIG_BOARD_LATE_INITIALIZE)
   list(APPEND SRCS gd32f4xx_bringup.c)
 endif()
 
diff --git a/boards/arm/gd32f4/gd32f450zk-aiotbox/src/Makefile b/boards/arm/gd32f4/gd32f450zk-aiotbox/src/Makefile
index 39c9efbaed9..f1e4b19e3fb 100644
--- a/boards/arm/gd32f4/gd32f450zk-aiotbox/src/Makefile
+++ b/boards/arm/gd32f4/gd32f450zk-aiotbox/src/Makefile
@@ -22,17 +22,7 @@
 
 include $(TOPDIR)/Make.defs
 
-CSRCS = gd32f4xx_boot.c
-
-# ifeq ($(CONFIG_BOARDCTL),y)
-# CSRCS += gd32f4xx_appinit.c
-# endif
-
-ifeq ($(CONFIG_BOARDCTL),y)
-CSRCS += gd32f4xx_appinit.c gd32f4xx_bringup.c
-else ifeq ($(CONFIG_BOARD_LATE_INITIALIZE),y)
-CSRCS += gd32f4xx_bringup.c
-endif
+CSRCS = gd32f4xx_boot.c gd32f4xx_bringup.c
 
 ifeq ($(CONFIG_ARCH_LEDS),y)
 CSRCS += gd32f4xx_autoleds.c
diff --git a/boards/arm/gd32f4/gd32f450zk-aiotbox/src/gd32f450z_aiotbox.h b/boards/arm/gd32f4/gd32f450zk-aiotbox/src/gd32f450z_aiotbox.h
index 4fa311a5112..149a4560006 100644
--- a/boards/arm/gd32f4/gd32f450zk-aiotbox/src/gd32f450z_aiotbox.h
+++ b/boards/arm/gd32f4/gd32f450zk-aiotbox/src/gd32f450z_aiotbox.h
@@ -136,16 +136,9 @@
  * Description:
  *   Perform architecture specific initialization
  *
- *   CONFIG_BOARDCTL=y:
- *     If CONFIG_NSH_ARCHINIT=y:
- *       Called from the NSH library (or other application)
- *     Otherwise, assumed to be called from some other application.
- *
- *   Otherwise CONFIG_BOARD_LATE_INITIALIZE=y:
+ *   CONFIG_BOARD_LATE_INITIALIZE=y:
  *     Called from board_late_initialize().
  *
- *   Otherwise, bad news:  Never called
- *
  ****************************************************************************/
 
 int gd32_bringup(void);
@@ -348,16 +341,9 @@ void gd32_i2c_initialize(void);
  * Description:
  *   Perform architecture specific initialization
  *
- *   CONFIG_BOARDCTL=y:
- *     If CONFIG_NSH_ARCHINIT=y:
- *       Called from the NSH library (or other application)
- *     Otherwise, assumed to be called from some other application.
- *
- *   Otherwise CONFIG_BOARD_LATE_INITIALIZE=y:
+ *   CONFIG_BOARD_LATE_INITIALIZE=y:
  *     Called from board_late_initialize().
  *
- *   Otherwise, bad news:  Never called
- *
  ****************************************************************************/
 
 int gd32_bringup(void);
@@ -422,4 +408,4 @@ int gd32_sdio_initialize(void);
 
 #ifdef CONFIG_I2C
 void gd32_i2c_initialize(void);
-#endif
\ No newline at end of file
+#endif
diff --git a/boards/arm/gd32f4/gd32f450zk-aiotbox/src/gd32f4xx_appinit.c b/boards/arm/gd32f4/gd32f450zk-aiotbox/src/gd32f4xx_appinit.c
deleted file mode 100644
index 2f7d3b307f2..00000000000
--- a/boards/arm/gd32f4/gd32f450zk-aiotbox/src/gd32f4xx_appinit.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/****************************************************************************
- * boards/arm/gd32f4/gd32f450zk-aiotbox/src/gd32f4xx_appinit.c
- *
- * SPDX-License-Identifier: Apache-2.0
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <stdbool.h>
-#include <stdio.h>
-#include <syslog.h>
-#include <errno.h>
-
-#include <nuttx/board.h>
-
-#include "gd32f4xx.h"
-#include "gd32f450z_aiotbox.h"
-
-/****************************************************************************
- * 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)
-{
-  /* Perform board initialization here */
-
-  return gd32_bringup();
-}
diff --git a/boards/arm/gd32f4/gd32f450zk-eval/src/CMakeLists.txt b/boards/arm/gd32f4/gd32f450zk-eval/src/CMakeLists.txt
index 7036cfa561b..aab550e4633 100644
--- a/boards/arm/gd32f4/gd32f450zk-eval/src/CMakeLists.txt
+++ b/boards/arm/gd32f4/gd32f450zk-eval/src/CMakeLists.txt
@@ -22,9 +22,7 @@
 
 set(SRCS gd32f4xx_boot.c)
 
-if(CONFIG_BOARDCTL)
-  list(APPEND SRCS gd32f4xx_appinit.c gd32f4xx_bringup.c)
-elseif(CONFIG_BOARD_LATE_INITIALIZE)
+if(CONFIG_BOARD_LATE_INITIALIZE)
   list(APPEND SRCS gd32f4xx_bringup.c)
 endif()
 
diff --git a/boards/arm/gd32f4/gd32f450zk-eval/src/Makefile b/boards/arm/gd32f4/gd32f450zk-eval/src/Makefile
index 8f87b677fb3..e9a79e6727a 100644
--- a/boards/arm/gd32f4/gd32f450zk-eval/src/Makefile
+++ b/boards/arm/gd32f4/gd32f450zk-eval/src/Makefile
@@ -22,17 +22,7 @@
 
 include $(TOPDIR)/Make.defs
 
-CSRCS = gd32f4xx_boot.c
-
-# ifeq ($(CONFIG_BOARDCTL),y)
-# CSRCS += gd32f4xx_appinit.c
-# endif
-
-ifeq ($(CONFIG_BOARDCTL),y)
-CSRCS += gd32f4xx_appinit.c gd32f4xx_bringup.c
-else ifeq ($(CONFIG_BOARD_LATE_INITIALIZE),y)
-CSRCS += gd32f4xx_bringup.c
-endif
+CSRCS = gd32f4xx_boot.c gd32f4xx_bringup.c
 
 ifeq ($(CONFIG_ARCH_LEDS),y)
 CSRCS += gd32f4xx_autoleds.c
diff --git a/boards/arm/gd32f4/gd32f450zk-eval/src/gd32f450z_eval.h b/boards/arm/gd32f4/gd32f450zk-eval/src/gd32f450z_eval.h
index b1caed736aa..2022049d294 100644
--- a/boards/arm/gd32f4/gd32f450zk-eval/src/gd32f450z_eval.h
+++ b/boards/arm/gd32f4/gd32f450zk-eval/src/gd32f450z_eval.h
@@ -188,16 +188,9 @@
  * Description:
  *   Perform architecture specific initialization
  *
- *   CONFIG_BOARDCTL=y:
- *     If CONFIG_NSH_ARCHINIT=y:
- *       Called from the NSH library (or other application)
- *     Otherwise, assumed to be called from some other application.
- *
- *   Otherwise CONFIG_BOARD_LATE_INITIALIZE=y:
+ *   CONFIG_BOARD_LATE_INITIALIZE=y:
  *     Called from board_late_initialize().
  *
- *   Otherwise, bad news:  Never called
- *
  ****************************************************************************/
 
 int gd32_bringup(void);
diff --git a/boards/arm/gd32f4/gd32f450zk-eval/src/gd32f4xx_appinit.c b/boards/arm/gd32f4/gd32f450zk-eval/src/gd32f4xx_appinit.c
deleted file mode 100644
index 23df26fd7de..00000000000
--- a/boards/arm/gd32f4/gd32f450zk-eval/src/gd32f4xx_appinit.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/****************************************************************************
- * boards/arm/gd32f4/gd32f450zk-eval/src/gd32f4xx_appinit.c
- *
- * SPDX-License-Identifier: Apache-2.0
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <stdbool.h>
-#include <stdio.h>
-#include <syslog.h>
-#include <errno.h>
-
-#include <nuttx/board.h>
-
-#include "gd32f4xx.h"
-#include "gd32f450z_eval.h"
-
-/****************************************************************************
- * 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)
-{
-  /* Perform board initialization here */
-
-  return gd32_bringup();
-}
diff --git a/boards/arm/gd32f4/gd32f470ik-eval/src/CMakeLists.txt b/boards/arm/gd32f4/gd32f470ik-eval/src/CMakeLists.txt
index b6af78fd172..2ff2544822e 100644
--- a/boards/arm/gd32f4/gd32f470ik-eval/src/CMakeLists.txt
+++ b/boards/arm/gd32f4/gd32f470ik-eval/src/CMakeLists.txt
@@ -22,9 +22,7 @@
 
 set(SRCS gd32f4xx_boot.c)
 
-if(CONFIG_BOARDCTL)
-  list(APPEND SRCS gd32f4xx_appinit.c gd32f4xx_bringup.c)
-elseif(CONFIG_BOARD_LATE_INITIALIZE)
+if(CONFIG_BOARD_LATE_INITIALIZE)
   list(APPEND SRCS gd32f4xx_bringup.c)
 endif()
 
diff --git a/boards/arm/gd32f4/gd32f470ik-eval/src/Makefile b/boards/arm/gd32f4/gd32f470ik-eval/src/Makefile
index ad497847e28..9b10a9d5e30 100644
--- a/boards/arm/gd32f4/gd32f470ik-eval/src/Makefile
+++ b/boards/arm/gd32f4/gd32f470ik-eval/src/Makefile
@@ -22,17 +22,7 @@
 
 include $(TOPDIR)/Make.defs
 
-CSRCS = gd32f4xx_boot.c
-
-# ifeq ($(CONFIG_BOARDCTL),y)
-# CSRCS += gd32f4xx_appinit.c
-# endif
-
-ifeq ($(CONFIG_BOARDCTL),y)
-CSRCS += gd32f4xx_appinit.c gd32f4xx_bringup.c
-else ifeq ($(CONFIG_BOARD_LATE_INITIALIZE),y)
-CSRCS += gd32f4xx_bringup.c
-endif
+CSRCS = gd32f4xx_boot.c gd32f4xx_bringup.c
 
 ifeq ($(CONFIG_ARCH_LEDS),y)
 CSRCS += gd32f4xx_autoleds.c
diff --git a/boards/arm/gd32f4/gd32f470ik-eval/src/gd32f470i_eval.h b/boards/arm/gd32f4/gd32f470ik-eval/src/gd32f470i_eval.h
index 1077a7ea1a9..3af1c63bcf3 100644
--- a/boards/arm/gd32f4/gd32f470ik-eval/src/gd32f470i_eval.h
+++ b/boards/arm/gd32f4/gd32f470ik-eval/src/gd32f470i_eval.h
@@ -188,16 +188,9 @@
  * Description:
  *   Perform architecture specific initialization
  *
- *   CONFIG_BOARDCTL=y:
- *     If CONFIG_NSH_ARCHINITIALIZE=y:
- *       Called from the NSH library (or other application)
- *     Otherwise, assumed to be called from some other application.
- *
- *   Otherwise CONFIG_BOARD_LATE_INITIALIZE=y:
+ *   CONFIG_BOARD_LATE_INITIALIZE=y:
  *     Called from board_late_initialize().
  *
- *   Otherwise, bad news:  Never called
- *
  ****************************************************************************/
 
 int gd32_bringup(void);
diff --git a/boards/arm/gd32f4/gd32f470ik-eval/src/gd32f4xx_appinit.c b/boards/arm/gd32f4/gd32f470ik-eval/src/gd32f4xx_appinit.c
deleted file mode 100644
index fb7e387b822..00000000000
--- a/boards/arm/gd32f4/gd32f470ik-eval/src/gd32f4xx_appinit.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/****************************************************************************
- * boards/arm/gd32f4/gd32f470ik-eval/src/gd32f4xx_appinit.c
- *
- * SPDX-License-Identifier: Apache-2.0
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <stdbool.h>
-#include <stdio.h>
-#include <syslog.h>
-#include <errno.h>
-
-#include <nuttx/board.h>
-
-#include "gd32f4xx.h"
-#include "gd32f470i_eval.h"
-
-/****************************************************************************
- * 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)
-{
-  /* Perform board initialization here */
-
-  return gd32_bringup();
-}
diff --git a/boards/arm/gd32f4/gd32f470zk-aiotbox/src/Makefile b/boards/arm/gd32f4/gd32f470zk-aiotbox/src/Makefile
index 70295bf60b2..b429046bd67 100644
--- a/boards/arm/gd32f4/gd32f470zk-aiotbox/src/Makefile
+++ b/boards/arm/gd32f4/gd32f470zk-aiotbox/src/Makefile
@@ -22,17 +22,7 @@
 
 include $(TOPDIR)/Make.defs
 
-CSRCS = gd32f4xx_boot.c
-
-# ifeq ($(CONFIG_BOARDCTL),y)
-# CSRCS += gd32f4xx_appinit.c
-# endif
-
-ifeq ($(CONFIG_BOARDCTL),y)
-CSRCS += gd32f4xx_appinit.c gd32f4xx_bringup.c
-else ifeq ($(CONFIG_BOARD_LATE_INITIALIZE),y)
-CSRCS += gd32f4xx_bringup.c
-endif
+CSRCS = gd32f4xx_boot.c gd32f4xx_bringup.c
 
 ifeq ($(CONFIG_ARCH_LEDS),y)
 CSRCS += gd32f4xx_autoleds.c
diff --git a/boards/arm/gd32f4/gd32f470zk-aiotbox/src/gd32f470z_aiotbox.h b/boards/arm/gd32f4/gd32f470zk-aiotbox/src/gd32f470z_aiotbox.h
index 55aaae51656..17eda55614b 100644
--- a/boards/arm/gd32f4/gd32f470zk-aiotbox/src/gd32f470z_aiotbox.h
+++ b/boards/arm/gd32f4/gd32f470zk-aiotbox/src/gd32f470z_aiotbox.h
@@ -188,16 +188,9 @@
  * Description:
  *   Perform architecture specific initialization
  *
- *   CONFIG_BOARDCTL=y:
- *     If CONFIG_NSH_ARCHINITIALIZE=y:
- *       Called from the NSH library (or other application)
- *     Otherwise, assumed to be called from some other application.
- *
- *   Otherwise CONFIG_BOARD_LATE_INITIALIZE=y:
+ *   CONFIG_BOARD_LATE_INITIALIZE=y:
  *     Called from board_late_initialize().
  *
- *   Otherwise, bad news:  Never called
- *
  ****************************************************************************/
 
 int gd32_bringup(void);
diff --git a/boards/arm/gd32f4/gd32f470zk-aiotbox/src/gd32f4xx_appinit.c b/boards/arm/gd32f4/gd32f470zk-aiotbox/src/gd32f4xx_appinit.c
deleted file mode 100644
index fb5720f9414..00000000000
--- a/boards/arm/gd32f4/gd32f470zk-aiotbox/src/gd32f4xx_appinit.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/****************************************************************************
- * boards/arm/gd32f4/gd32f470zk-aiotbox/src/gd32f4xx_appinit.c
- *
- * SPDX-License-Identifier: Apache-2.0
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <stdbool.h>
-#include <stdio.h>
-#include <syslog.h>
-#include <errno.h>
-
-#include <nuttx/board.h>
-
-#include "gd32f4xx.h"
-#include "gd32f470z_aiotbox.h"
-
-/****************************************************************************
- * 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)
-{
-  /* Perform board initialization here */
-
-  return gd32_bringup();
-}
diff --git a/boards/arm/gd32f4/gd32f470zk-eval/src/Makefile b/boards/arm/gd32f4/gd32f470zk-eval/src/Makefile
index 0ac508bc75e..853d8448313 100644
--- a/boards/arm/gd32f4/gd32f470zk-eval/src/Makefile
+++ b/boards/arm/gd32f4/gd32f470zk-eval/src/Makefile
@@ -22,17 +22,7 @@
 
 include $(TOPDIR)/Make.defs
 
-CSRCS = gd32f4xx_boot.c
-
-# ifeq ($(CONFIG_BOARDCTL),y)
-# CSRCS += gd32f4xx_appinit.c
-# endif
-
-ifeq ($(CONFIG_BOARDCTL),y)
-CSRCS += gd32f4xx_appinit.c gd32f4xx_bringup.c
-else ifeq ($(CONFIG_BOARD_LATE_INITIALIZE),y)
-CSRCS += gd32f4xx_bringup.c
-endif
+CSRCS = gd32f4xx_boot.c gd32f4xx_bringup.c
 
 ifeq ($(CONFIG_ARCH_LEDS),y)
 CSRCS += gd32f4xx_autoleds.c
diff --git a/boards/arm/gd32f4/gd32f470zk-eval/src/gd32f470z_eval.h b/boards/arm/gd32f4/gd32f470zk-eval/src/gd32f470z_eval.h
index bb01ac00580..e00df0aa7cd 100644
--- a/boards/arm/gd32f4/gd32f470zk-eval/src/gd32f470z_eval.h
+++ b/boards/arm/gd32f4/gd32f470zk-eval/src/gd32f470z_eval.h
@@ -188,16 +188,9 @@
  * Description:
  *   Perform architecture specific initialization
  *
- *   CONFIG_BOARDCTL=y:
- *     If CONFIG_NSH_ARCHINITIALIZE=y:
- *       Called from the NSH library (or other application)
- *     Otherwise, assumed to be called from some other application.
- *
- *   Otherwise CONFIG_BOARD_LATE_INITIALIZE=y:
+ *   CONFIG_BOARD_LATE_INITIALIZE=y:
  *     Called from board_late_initialize().
  *
- *   Otherwise, bad news:  Never called
- *
  ****************************************************************************/
 
 int gd32_bringup(void);
diff --git a/boards/arm/gd32f4/gd32f470zk-eval/src/gd32f4xx_appinit.c b/boards/arm/gd32f4/gd32f470zk-eval/src/gd32f4xx_appinit.c
deleted file mode 100644
index 523a6339e54..00000000000
--- a/boards/arm/gd32f4/gd32f470zk-eval/src/gd32f4xx_appinit.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/****************************************************************************
- * boards/arm/gd32f4/gd32f470zk-eval/src/gd32f4xx_appinit.c
- *
- * SPDX-License-Identifier: Apache-2.0
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <stdbool.h>
-#include <stdio.h>
-#include <syslog.h>
-#include <errno.h>
-
-#include <nuttx/board.h>
-
-#include "gd32f4xx.h"
-#include "gd32f470z_eval.h"
-
-/****************************************************************************
- * 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)
-{
-  /* Perform board initialization here */
-
-  return gd32_bringup();
-}
diff --git a/boards/arm/ht32f491x3/esk32/include/board.h b/boards/arm/ht32f491x3/esk32/include/board.h
index 1a5e99c7650..9fff7de0157 100644
--- a/boards/arm/ht32f491x3/esk32/include/board.h
+++ b/boards/arm/ht32f491x3/esk32/include/board.h
@@ -118,8 +118,6 @@
 void ht32f491x3_clockconfig(void);
 void ht32f491x3_boardinitialize(void);
 
-int board_app_initialize(uintptr_t arg);
-
 #ifdef CONFIG_PWM
 int ht32_pwm_setup(void);
 #endif
diff --git a/boards/arm/ht32f491x3/esk32/src/CMakeLists.txt b/boards/arm/ht32f491x3/esk32/src/CMakeLists.txt
index a76fb93ce64..6d4a8b63c4e 100644
--- a/boards/arm/ht32f491x3/esk32/src/CMakeLists.txt
+++ b/boards/arm/ht32f491x3/esk32/src/CMakeLists.txt
@@ -22,8 +22,8 @@
 
 set(SRCS ht32_boot.c)
 
-if(CONFIG_BOARDCTL OR CONFIG_BOARD_LATE_INITIALIZE)
-  list(APPEND SRCS ht32_appinit.c)
+if(CONFIG_BOARD_LATE_INITIALIZE)
+  list(APPEND SRCS ht32_bringup.c)
 endif()
 
 if(CONFIG_USERLED)
diff --git a/boards/arm/ht32f491x3/esk32/src/Makefile b/boards/arm/ht32f491x3/esk32/src/Makefile
index 2ff294bed3b..f0f4a7fd236 100644
--- a/boards/arm/ht32f491x3/esk32/src/Makefile
+++ b/boards/arm/ht32f491x3/esk32/src/Makefile
@@ -24,10 +24,8 @@ include $(TOPDIR)/Make.defs
 
 CSRCS += ht32_boot.c
 
-ifeq ($(CONFIG_BOARDCTL),y)
-CSRCS += ht32_appinit.c
-else ifeq ($(CONFIG_BOARD_LATE_INITIALIZE),y)
-CSRCS += ht32_appinit.c
+ifeq ($(CONFIG_BOARD_LATE_INITIALIZE),y)
+CSRCS += ht32_bringup.c
 endif
 
 ifeq ($(CONFIG_USERLED),y)
diff --git a/boards/arm/ht32f491x3/esk32/src/ht32_appinit.c b/boards/arm/ht32f491x3/esk32/src/ht32_bringup.c
similarity index 93%
rename from boards/arm/ht32f491x3/esk32/src/ht32_appinit.c
rename to boards/arm/ht32f491x3/esk32/src/ht32_bringup.c
index 3c1d276f0f7..f715b657181 100644
--- a/boards/arm/ht32f491x3/esk32/src/ht32_appinit.c
+++ b/boards/arm/ht32f491x3/esk32/src/ht32_bringup.c
@@ -1,5 +1,5 @@
 /****************************************************************************
- * boards/arm/ht32f491x3/esk32/src/ht32_appinit.c
+ * boards/arm/ht32f491x3/esk32/src/ht32_bringup.c
  *
  * SPDX-License-Identifier: Apache-2.0
  *
@@ -91,17 +91,6 @@ static int ht32_bringup(void)
  * Public Functions
  ****************************************************************************/
 
-int board_app_initialize(uintptr_t arg)
-{
-  (void)arg;
-
-#ifdef CONFIG_BOARD_LATE_INITIALIZE
-  return OK;
-#else
-  return ht32_bringup();
-#endif
-}
-
 #ifdef CONFIG_BOARD_LATE_INITIALIZE
 void board_late_initialize(void)
 {
diff --git a/boards/arm/imx6/sabre-6quad/src/CMakeLists.txt b/boards/arm/imx6/sabre-6quad/src/CMakeLists.txt
index f4d998bbaf0..d8ba2b7f9fe 100644
--- a/boards/arm/imx6/sabre-6quad/src/CMakeLists.txt
+++ b/boards/arm/imx6/sabre-6quad/src/CMakeLists.txt
@@ -22,10 +22,6 @@
 
 set(SRCS imx_boardinit.c imx_bringup.c)
 
-if(CONFIG_BOARDCTL)
-  list(APPEND SRCS imx_appinit.c)
-endif()
-
 if(CONFIG_ARCH_LEDS)
   list(APPEND SRCS imx_autoleds.c)
 else()
diff --git a/boards/arm/imx6/sabre-6quad/src/Makefile b/boards/arm/imx6/sabre-6quad/src/Makefile
index d80f1c02a0a..95ae85ce8f8 100644
--- a/boards/arm/imx6/sabre-6quad/src/Makefile
+++ b/boards/arm/imx6/sabre-6quad/src/Makefile
@@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs
 
 CSRCS = imx_boardinit.c imx_bringup.c
 
-ifeq ($(CONFIG_BOARDCTL),y)
-CSRCS += imx_appinit.c
-endif
-
 ifeq ($(CONFIG_ARCH_LEDS),y)
 CSRCS += imx_autoleds.c
 else
diff --git a/boards/arm/imx6/sabre-6quad/src/imx_appinit.c b/boards/arm/imx6/sabre-6quad/src/imx_appinit.c
deleted file mode 100644
index 93f2f8c9435..00000000000
--- a/boards/arm/imx6/sabre-6quad/src/imx_appinit.c
+++ /dev/null
@@ -1,77 +0,0 @@
-/****************************************************************************
- * boards/arm/imx6/sabre-6quad/src/imx_appinit.c
- *
- * SPDX-License-Identifier: Apache-2.0
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <sys/types.h>
-
-#include <nuttx/board.h>
-
-#include "sabre-6quad.h"
-
-#ifdef CONFIG_BOARDCTL
-
-/****************************************************************************
- * 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)
-{
-#ifndef CONFIG_BOARD_LATE_INITIALIZE
-  /* Perform board initialization */
-
-  return imx_bringup();
-#else
-  return OK;
-#endif
-}
-
-#endif /* CONFIG_BOARDCTL */
diff --git a/boards/arm/imx9/imx93-qsb/src/CMakeLists.txt b/boards/arm/imx9/imx93-qsb/src/CMakeLists.txt
index 1e9702770a8..bac76e40de6 100644
--- a/boards/arm/imx9/imx93-qsb/src/CMakeLists.txt
+++ b/boards/arm/imx9/imx93-qsb/src/CMakeLists.txt
@@ -22,10 +22,6 @@
 
 set(SRCS imx93_boardinit.c imx93_bringup.c)
 
-if(CONFIG_BOARDCTL)
-  list(APPEND SRCS imx93_appinit.c)
-endif()
-
 target_sources(board PRIVATE ${SRCS})
 
 if(CONFIG_IMX93_RUN_FROM_ITCM)
diff --git a/boards/arm/imx9/imx93-qsb/src/Makefile b/boards/arm/imx9/imx93-qsb/src/Makefile
index 953a4c7109b..b1f3fecc154 100644
--- a/boards/arm/imx9/imx93-qsb/src/Makefile
+++ b/boards/arm/imx9/imx93-qsb/src/Makefile
@@ -25,8 +25,4 @@ include $(TOPDIR)/Make.defs
 
 CSRCS = imx93_boardinit.c imx93_bringup.c
 
-ifeq ($(CONFIG_BOARDCTL),y)
-CSRCS += imx93_appinit.c
-endif
-
 include $(TOPDIR)/boards/Board.mk
diff --git a/boards/arm/imx9/imx93-qsb/src/imx93_appinit.c b/boards/arm/imx9/imx93-qsb/src/imx93_appinit.c
deleted file mode 100644
index e7836900add..00000000000
--- a/boards/arm/imx9/imx93-qsb/src/imx93_appinit.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/****************************************************************************
- * boards/arm/imx9/imx93-qsb/src/imx93_appinit.c
- *
- * SPDX-License-Identifier: Apache-2.0
- * SPDX-FileCopyrightText: 2024 NXP
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-#include <sys/types.h>
-#include <nuttx/board.h>
-#include "imx93-qsb.h"
-
-#ifdef CONFIG_BOARDCTL
-
-/****************************************************************************
- * 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)
-{
-  UNUSED(arg);
-#ifndef CONFIG_BOARD_LATE_INITIALIZE
-  /* Perform board initialization */
-
-  return imx93_bringup();
-#else
-  return OK;
-#endif
-}
-
-#endif /* CONFIG_BOARDCTL */
diff --git a/boards/arm/imx9/imx95-evk/src/CMakeLists.txt b/boards/arm/imx9/imx95-evk/src/CMakeLists.txt
index 470144134ce..b867984a064 100644
--- a/boards/arm/imx9/imx95-evk/src/CMakeLists.txt
+++ b/boards/arm/imx9/imx95-evk/src/CMakeLists.txt
@@ -22,10 +22,6 @@
 
 set(SRCS imx95_boardinit.c imx95_bringup.c)
 
-if(CONFIG_BOARDCTL)
-  list(APPEND SRCS imx95_appinit.c)
-endif()
-
 if(CONFIG_PWM)
   list(APPEND SRCS imx95_pwm.c)
 endif()
diff --git a/boards/arm/imx9/imx95-evk/src/Makefile b/boards/arm/imx9/imx95-evk/src/Makefile
index ad36c4085c2..38e0db974f0 100644
--- a/boards/arm/imx9/imx95-evk/src/Makefile
+++ b/boards/arm/imx9/imx95-evk/src/Makefile
@@ -25,10 +25,6 @@ include $(TOPDIR)/Make.defs
 
 CSRCS = imx95_boardinit.c imx95_bringup.c
 
-ifeq ($(CONFIG_BOARDCTL),y)
-CSRCS += imx95_appinit.c
-endif
-
 ifeq ($(CONFIG_PWM),y)
 CSRCS += imx95_pwm.c
 endif
diff --git a/boards/arm/imx9/imx95-evk/src/imx95_appinit.c b/boards/arm/imx9/imx95-evk/src/imx95_appinit.c
deleted file mode 100644
index 207befa8147..00000000000
--- a/boards/arm/imx9/imx95-evk/src/imx95_appinit.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/****************************************************************************
- * boards/arm/imx9/imx95-evk/src/imx95_appinit.c
- *
- * SPDX-License-Identifier: Apache-2.0
- * SPDX-FileCopyrightText: 2024 NXP
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-#include <sys/types.h>
-#include <nuttx/board.h>
-#include "imx95-evk.h"
-
-#ifdef CONFIG_BOARDCTL
-
-/****************************************************************************
- * 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)
-{
-  UNUSED(arg);
-#ifndef CONFIG_BOARD_LATE_INITIALIZE
-  /* Perform board initialization */
-
-  return imx95_bringup();
-#else
-  return OK;
-#endif
-}
-
-#endif /* CONFIG_BOARDCTL */
diff --git a/boards/arm/imx9/mr-navq95b/src/CMakeLists.txt b/boards/arm/imx9/mr-navq95b/src/CMakeLists.txt
index 2a30bf6bce7..affbdf1de0d 100644
--- a/boards/arm/imx9/mr-navq95b/src/CMakeLists.txt
+++ b/boards/arm/imx9/mr-navq95b/src/CMakeLists.txt
@@ -22,10 +22,6 @@
 
 set(SRCS imx95_boardinit.c imx95_bringup.c)
 
-if(CONFIG_BOARDCTL)
-  list(APPEND SRCS imx95_appinit.c)
-endif()
-
 if(CONFIG_PWM)
   list(APPEND SRCS imx95_pwm.c)
 endif()
diff --git a/boards/arm/imx9/mr-navq95b/src/Makefile b/boards/arm/imx9/mr-navq95b/src/Makefile
index 5f75df705b0..9ece31344a2 100644
--- a/boards/arm/imx9/mr-navq95b/src/Makefile
+++ b/boards/arm/imx9/mr-navq95b/src/Makefile
@@ -25,10 +25,6 @@ include $(TOPDIR)/Make.defs
 
 CSRCS = imx95_boardinit.c imx95_bringup.c
 
-ifeq ($(CONFIG_BOARDCTL),y)
-CSRCS += imx95_appinit.c
-endif
-
 ifeq ($(CONFIG_PWM),y)
 CSRCS += imx95_pwm.c
 endif
diff --git a/boards/arm/imx9/mr-navq95b/src/imx95_appinit.c b/boards/arm/imx9/mr-navq95b/src/imx95_appinit.c
deleted file mode 100644
index 6a3d2d40e3f..00000000000
--- a/boards/arm/imx9/mr-navq95b/src/imx95_appinit.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/****************************************************************************
- * boards/arm/imx9/mr-navq95b/src/imx95_appinit.c
- *
- * SPDX-License-Identifier: Apache-2.0
- * SPDX-FileCopyrightText: 2026 NXP
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-#include <sys/types.h>
-#include <nuttx/board.h>
-#include "mr-navq95b.h"
-
-#ifdef CONFIG_BOARDCTL
-
-/****************************************************************************
- * 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)
-{
-  UNUSED(arg);
-#ifndef CONFIG_BOARD_LATE_INITIALIZE
-  /* Perform board initialization */
-
-  return imx95_bringup();
-#else
-  return OK;
-#endif
-}
-
-#endif /* CONFIG_BOARDCTL */
diff --git a/boards/arm/imxrt/arcx-socket-grid/src/CMakeLists.txt b/boards/arm/imxrt/arcx-socket-grid/src/CMakeLists.txt
index 393a38a41bc..bb59f42c1f7 100644
--- a/boards/arm/imxrt/arcx-socket-grid/src/CMakeLists.txt
+++ b/boards/arm/imxrt/arcx-socket-grid/src/CMakeLists.txt
@@ -20,18 +20,13 @@
 #
 # ##############################################################################
 
-set(SRCS imxrt_boot.c imxrt_flexspi_nor_boot.c imxrt_flexspi_nor_flash.c)
+set(SRCS imxrt_boot.c imxrt_flexspi_nor_boot.c imxrt_flexspi_nor_flash.c
+         imxrt_bringup.c)
 
 if(CONFIG_IMXRT_SDRAMC)
   list(APPEND SRCS imxrt_sdram.c)
 endif()
 
-if(CONFIG_BOARDCTL)
-  list(APPEND SRCS imxrt_appinit.c imxrt_bringup.c)
-elseif(CONFIG_BOARD_LATE_INITIALIZE)
-  list(APPEND SRCS imxrt_bringup.c)
-endif()
-
 if(CONFIG_ARCH_LEDS)
   list(APPEND SRCS imxrt_autoleds.c)
 else()
diff --git a/boards/arm/imxrt/arcx-socket-grid/src/Makefile b/boards/arm/imxrt/arcx-socket-grid/src/Makefile
index c4b41eb81df..06417d05b1a 100644
--- a/boards/arm/imxrt/arcx-socket-grid/src/Makefile
+++ b/boards/arm/imxrt/arcx-socket-grid/src/Makefile
@@ -23,17 +23,12 @@
 include $(TOPDIR)/Make.defs
 
 CSRCS = imxrt_boot.c imxrt_flexspi_nor_boot.c imxrt_flexspi_nor_flash.c
+CSRCS += imxrt_bringup.c
 
 ifeq ($(CONFIG_IMXRT_SDRAMC),y)
 CSRCS += imxrt_sdram.c
 endif
 
-ifeq ($(CONFIG_BOARDCTL),y)
-CSRCS += imxrt_appinit.c imxrt_bringup.c
-else ifeq ($(CONFIG_BOARD_LATE_INITIALIZE),y)
-CSRCS += imxrt_bringup.c
-endif
-
 ifeq ($(CONFIG_ARCH_LEDS),y)
 CSRCS += imxrt_autoleds.c
 else
diff --git a/boards/arm/imxrt/arcx-socket-grid/src/arcx-socket-grid.h b/boards/arm/imxrt/arcx-socket-grid/src/arcx-socket-grid.h
index c211cbeb055..6272bec74c8 100644
--- a/boards/arm/imxrt/arcx-socket-grid/src/arcx-socket-grid.h
+++ b/boards/arm/imxrt/arcx-socket-grid/src/arcx-socket-grid.h
@@ -138,9 +138,7 @@
  *
  ****************************************************************************/
 
-#if defined(CONFIG_BOARDCTL) || defined(CONFIG_BOARD_LATE_INITIALIZE)
 int imxrt_bringup(void);
-#endif
 
 /****************************************************************************
  * Name: imxrt_spidev_initialize
diff --git a/boards/arm/imxrt/arcx-socket-grid/src/imxrt_appinit.c b/boards/arm/imxrt/arcx-socket-grid/src/imxrt_appinit.c
deleted file mode 100644
index dd599b1a5e2..00000000000
--- a/boards/arm/imxrt/arcx-socket-grid/src/imxrt_appinit.c
+++ /dev/null
@@ -1,77 +0,0 @@
-/****************************************************************************
- * boards/arm/imxrt/arcx-socket-grid/src/imxrt_appinit.c
- *
- * SPDX-License-Identifier: Apache-2.0
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <sys/types.h>
-
-#include <nuttx/board.h>
-
-#include "arcx-socket-grid.h"
-
-#ifdef CONFIG_BOARDCTL
-
-/****************************************************************************
- * 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)
-{
-#ifndef CONFIG_BOARD_LATE_INITIALIZE
-  /* Perform board initialization */
-
-  return imxrt_bringup();
-#else
-  return OK;
-#endif
-}
-
-#endif /* CONFIG_BOARDCTL */
diff --git a/boards/arm/imxrt/imxrt1020-evk/src/CMakeLists.txt b/boards/arm/imxrt/imxrt1020-evk/src/CMakeLists.txt
index 78b11bbd725..b7bc46c6803 100644
--- a/boards/arm/imxrt/imxrt1020-evk/src/CMakeLists.txt
+++ b/boards/arm/imxrt/imxrt1020-evk/src/CMakeLists.txt
@@ -20,18 +20,13 @@
 #
 # ##############################################################################
 
-set(SRCS imxrt_flexspi_nor_flash.c imxrt_boot.c imxrt_flexspi_nor_boot.c)
+set(SRCS imxrt_flexspi_nor_flash.c imxrt_boot.c imxrt_flexspi_nor_boot.c
+         imxrt_bringup.c)
 
 if(CONFIG_IMXRT_SDRAMC)
   list(APPEND SRCS imxrt_sdram.c)
 endif()
 
-if(CONFIG_BOARDCTL)
-  list(APPEND SRCS imxrt_appinit.c imxrt_bringup.c)
-elseif(CONFIG_BOARD_LATE_INITIALIZE)
-  list(APPEND SRCS imxrt_bringup.c)
-endif()
-
 if(CONFIG_ARCH_LEDS)
   list(APPEND SRCS imxrt_autoleds.c)
 else()
diff --git a/boards/arm/imxrt/imxrt1020-evk/src/Makefile b/boards/arm/imxrt/imxrt1020-evk/src/Makefile
index 271a9274b8d..d2404930d37 100644
--- a/boards/arm/imxrt/imxrt1020-evk/src/Makefile
+++ b/boards/arm/imxrt/imxrt1020-evk/src/Makefile
@@ -23,16 +23,12 @@
 include $(TOPDIR)/Make.defs
 
 CSRCS = imxrt_flexspi_nor_flash.c imxrt_boot.c imxrt_flexspi_nor_boot.c
+CSRCS += imxrt_bringup.c
+
 ifeq ($(CONFIG_IMXRT_SDRAMC),y)
 CSRCS += imxrt_sdram.c
 endif
 
-ifeq ($(CONFIG_BOARDCTL),y)
-CSRCS += imxrt_appinit.c imxrt_bringup.c
-else ifeq ($(CONFIG_BOARD_LATE_INITIALIZE),y)
-CSRCS += imxrt_bringup.c
-endif
-
 ifeq ($(CONFIG_ARCH_LEDS),y)
 CSRCS += imxrt_autoleds.c
 else
diff --git a/boards/arm/imxrt/imxrt1020-evk/src/imxrt_appinit.c b/boards/arm/imxrt/imxrt1020-evk/src/imxrt_appinit.c
deleted file mode 100644
index eaba3ad8258..00000000000
--- a/boards/arm/imxrt/imxrt1020-evk/src/imxrt_appinit.c
+++ /dev/null
@@ -1,77 +0,0 @@
-/****************************************************************************
- * boards/arm/imxrt/imxrt1020-evk/src/imxrt_appinit.c
- *
- * SPDX-License-Identifier: Apache-2.0
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <sys/types.h>
-
-#include <nuttx/board.h>
-
-#include "imxrt1020-evk.h"
-
-#ifdef CONFIG_BOARDCTL
-
-/****************************************************************************
- * 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)
-{
-#ifndef CONFIG_BOARD_LATE_INITIALIZE
-  /* Perform board initialization */
-
-  return imxrt_bringup();
-#else
-  return OK;
-#endif
-}
-
-#endif /* CONFIG_BOARDCTL */
diff --git a/boards/arm/imxrt/imxrt1050-evk/src/CMakeLists.txt b/boards/arm/imxrt/imxrt1050-evk/src/CMakeLists.txt
index 0810cb71c88..972d105f16f 100644
--- a/boards/arm/imxrt/imxrt1050-evk/src/CMakeLists.txt
+++ b/boards/arm/imxrt/imxrt1050-evk/src/CMakeLists.txt
@@ -20,18 +20,13 @@
 #
 # ##############################################################################
 
-set(SRCS imxrt_boot.c imxrt_flexspi_nor_boot.c imxrt_flexspi_nor_flash.c)
+set(SRCS imxrt_boot.c imxrt_flexspi_nor_boot.c imxrt_flexspi_nor_flash.c
+         imxrt_bringup.c)
 
 if(CONFIG_IMXRT_SDRAMC)
   list(APPEND SRCS imxrt_sdram.c)
 endif()
 
-if(CONFIG_BOARDCTL)
-  list(APPEND SRCS imxrt_appinit.c imxrt_bringup.c)
-elseif(CONFIG_BOARD_LATE_INITIALIZE)
-  list(APPEND SRCS imxrt_bringup.c)
-endif()
-
 if(CONFIG_ARCH_LEDS)
   list(APPEND SRCS imxrt_autoleds.c)
 else()
diff --git a/boards/arm/imxrt/imxrt1050-evk/src/Makefile b/boards/arm/imxrt/imxrt1050-evk/src/Makefile
index a088fb4ec62..ee67fd28bb2 100644
--- a/boards/arm/imxrt/imxrt1050-evk/src/Makefile
+++ b/boards/arm/imxrt/imxrt1050-evk/src/Makefile
@@ -23,17 +23,12 @@
 include $(TOPDIR)/Make.defs
 
 CSRCS = imxrt_boot.c imxrt_flexspi_nor_boot.c imxrt_flexspi_nor_flash.c
+CSRCS += imxrt_bringup.c
 
 ifeq ($(CONFIG_IMXRT_SDRAMC),y)
 CSRCS += imxrt_sdram.c
 endif
 
-ifeq ($(CONFIG_BOARDCTL),y)
-CSRCS += imxrt_appinit.c imxrt_bringup.c
-else ifeq ($(CONFIG_BOARD_LATE_INITIALIZE),y)
-CSRCS += imxrt_bringup.c
-endif
-
 ifeq ($(CONFIG_ARCH_LEDS),y)
 CSRCS += imxrt_autoleds.c
 else
diff --git a/boards/arm/imxrt/imxrt1050-evk/src/imxrt_appinit.c b/boards/arm/imxrt/imxrt1050-evk/src/imxrt_appinit.c
deleted file mode 100644
index 9857be556f0..00000000000
--- a/boards/arm/imxrt/imxrt1050-evk/src/imxrt_appinit.c
+++ /dev/null
@@ -1,77 +0,0 @@
-/****************************************************************************
- * boards/arm/imxrt/imxrt1050-evk/src/imxrt_appinit.c
- *
- * SPDX-License-Identifier: Apache-2.0
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <sys/types.h>
-
-#include <nuttx/board.h>
-
-#include "imxrt1050-evk.h"
-
-#ifdef CONFIG_BOARDCTL
-
-/****************************************************************************
- * 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)
-{
-#ifndef CONFIG_BOARD_LATE_INITIALIZE
-  /* Perform board initialization */
-
-  return imxrt_bringup();
-#else
-  return OK;
-#endif
-}
-
-#endif /* CONFIG_BOARDCTL */
diff --git a/boards/arm/imxrt/imxrt1060-evk/src/CMakeLists.txt b/boards/arm/imxrt/imxrt1060-evk/src/CMakeLists.txt
index 3493fd541e0..02c6fb86936 100644
--- a/boards/arm/imxrt/imxrt1060-evk/src/CMakeLists.txt
+++ b/boards/arm/imxrt/imxrt1060-evk/src/CMakeLists.txt
@@ -20,18 +20,13 @@
 #
 # ##############################################################################
 
-set(SRCS imxrt_boot.c imxrt_flexspi_nor_boot.c imxrt_flexspi_nor_flash.c)
+set(SRCS imxrt_boot.c imxrt_flexspi_nor_boot.c imxrt_flexspi_nor_flash.c
+         imxrt_bringup.c)
 
 if(CONFIG_IMXRT_SDRAMC)
   list(APPEND SRCS imxrt_sdram.c)
 endif()
 
-if(CONFIG_BOARDCTL)
-  list(APPEND SRCS imxrt_appinit.c imxrt_bringup.c)
-elseif(CONFIG_BOARD_LATE_INITIALIZE)
-  list(APPEND SRCS imxrt_bringup.c)
-endif()
-
 if(CONFIG_ARCH_LEDS)
   list(APPEND SRCS imxrt_autoleds.c)
 else()
diff --git a/boards/arm/imxrt/imxrt1060-evk/src/Makefile b/boards/arm/imxrt/imxrt1060-evk/src/Makefile
index 7c0d5099ce2..5248d181414 100644
--- a/boards/arm/imxrt/imxrt1060-evk/src/Makefile
+++ b/boards/arm/imxrt/imxrt1060-evk/src/Makefile
@@ -23,17 +23,12 @@
 include $(TOPDIR)/Make.defs
 
 CSRCS = imxrt_boot.c imxrt_flexspi_nor_boot.c imxrt_flexspi_nor_flash.c
+CSRCS += imxrt_bringup.c
 
 ifeq ($(CONFIG_IMXRT_SDRAMC),y)
 CSRCS += imxrt_sdram.c
 endif
 
-ifeq ($(CONFIG_BOARDCTL),y)
-CSRCS += imxrt_appinit.c imxrt_bringup.c
-else ifeq ($(CONFIG_BOARD_LATE_INITIALIZE),y)
-CSRCS += imxrt_bringup.c
-endif
-
 ifeq ($(CONFIG_ARCH_LEDS),y)
 CSRCS += imxrt_autoleds.c
 else
diff --git a/boards/arm/imxrt/imxrt1060-evk/src/imxrt_appinit.c b/boards/arm/imxrt/imxrt1060-evk/src/imxrt_appinit.c
deleted file mode 100644
index b5efb37b5c7..00000000000
--- a/boards/arm/imxrt/imxrt1060-evk/src/imxrt_appinit.c
+++ /dev/null
@@ -1,90 +0,0 @@
-/****************************************************************************
- * boards/arm/imxrt/imxrt1060-evk/src/imxrt_appinit.c
- *
- * SPDX-License-Identifier: Apache-2.0
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-#include <syslog.h>
-#include <sys/types.h>
-
-#include <nuttx/board.h>
-#include <nuttx/leds/userled.h>
-
-#include "imxrt1060-evk.h"
-
-#ifdef CONFIG_BOARDCTL
-
-/****************************************************************************
- * 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)
-{
-#if !defined(CONFIG_ARCH_LEDS) && defined(CONFIG_USERLED_LOWER)
-  /* Register the LED driver */
-
-  int ret;
-  ret = userled_lower_initialize(LED_DRIVER_PATH);
-  if (ret < 0)
-    {
-      syslog(LOG_ERR, "ERROR: userled_lower_initialize() failed: %d\n", ret);
-      return ret;
-    }
-#endif
-
-#ifndef CONFIG_BOARD_LATE_INITIALIZE
-  /* Perform board initialization */
-
-  return imxrt_bringup();
-#else
-  return OK;
-#endif
-}
-
-#endif /* CONFIG_BOARDCTL */
diff --git a/boards/arm/imxrt/imxrt1060-evk/src/imxrt_boot.c b/boards/arm/imxrt/imxrt1060-evk/src/imxrt_boot.c
index d6237861a04..15fd608aeee 100644
--- a/boards/arm/imxrt/imxrt1060-evk/src/imxrt_boot.c
+++ b/boards/arm/imxrt/imxrt1060-evk/src/imxrt_boot.c
@@ -26,8 +26,12 @@
 
 #include <nuttx/config.h>
 
+#include <syslog.h>
+#include <sys/types.h>
+
 #include <nuttx/board.h>
 #include <arch/board/board.h>
+#include <nuttx/leds/userled.h>
 
 #include "imxrt_start.h"
 #include "imxrt1060-evk.h"
@@ -112,6 +116,17 @@ void imxrt_boardinitialize(void)
 #ifdef CONFIG_BOARD_LATE_INITIALIZE
 void board_late_initialize(void)
 {
+#if !defined(CONFIG_ARCH_LEDS) && defined(CONFIG_USERLED_LOWER)
+  /* Register the LED driver */
+
+  int ret;
+  ret = userled_lower_initialize(LED_DRIVER_PATH);
+  if (ret < 0)
+    {
+      syslog(LOG_ERR, "ERROR: userled_lower_initialize() failed: %d\n", ret);
+    }
+#endif
+
   /* Perform board initialization */
 
   imxrt_bringup();
diff --git a/boards/arm/imxrt/imxrt1064-evk/src/CMakeLists.txt b/boards/arm/imxrt/imxrt1064-evk/src/CMakeLists.txt
index 5b36e3338c7..0711958020d 100644
--- a/boards/arm/imxrt/imxrt1064-evk/src/CMakeLists.txt
+++ b/boards/arm/imxrt/imxrt1064-evk/src/CMakeLists.txt
@@ -20,18 +20,13 @@
 #
 # ##############################################################################
 
-set(SRCS imxrt_boot.c imxrt_flexspi_nor_boot.c imxrt_flexspi_nor_flash.c)
+set(SRCS imxrt_boot.c imxrt_flexspi_nor_boot.c imxrt_flexspi_nor_flash.c
+         imxrt_bringup.c)
 
 if(CONFIG_IMXRT_SDRAMC)
   list(APPEND SRCS imxrt_sdram.c)
 endif()
 
-if(CONFIG_BOARDCTL)
-  list(APPEND SRCS imxrt_appinit.c imxrt_bringup.c)
-elseif(CONFIG_BOARD_LATE_INITIALIZE)
-  list(APPEND SRCS imxrt_bringup.c)
-endif()
-
 if(CONFIG_ARCH_LEDS)
   list(APPEND SRCS imxrt_autoleds.c)
 else()
diff --git a/boards/arm/imxrt/imxrt1064-evk/src/Makefile b/boards/arm/imxrt/imxrt1064-evk/src/Makefile
index 86e1bb5f965..73df28beab7 100644
--- a/boards/arm/imxrt/imxrt1064-evk/src/Makefile
+++ b/boards/arm/imxrt/imxrt1064-evk/src/Makefile
@@ -23,17 +23,12 @@
 include $(TOPDIR)/Make.defs
 
 CSRCS = imxrt_boot.c imxrt_flexspi_nor_boot.c imxrt_flexspi_nor_flash.c
+CSRCS += imxrt_bringup.c
 
 ifeq ($(CONFIG_IMXRT_SDRAMC),y)
 CSRCS += imxrt_sdram.c
 endif
 
-ifeq ($(CONFIG_BOARDCTL),y)
-CSRCS += imxrt_appinit.c imxrt_bringup.c
-else ifeq ($(CONFIG_BOARD_LATE_INITIALIZE),y)
-CSRCS += imxrt_bringup.c
-endif
-
 ifeq ($(CONFIG_ARCH_LEDS),y)
 CSRCS += imxrt_autoleds.c
 else
diff --git a/boards/arm/imxrt/imxrt1064-evk/src/imxrt_appinit.c b/boards/arm/imxrt/imxrt1064-evk/src/imxrt_appinit.c
deleted file mode 100644
index 63dad92bf56..00000000000
--- a/boards/arm/imxrt/imxrt1064-evk/src/imxrt_appinit.c
+++ /dev/null
@@ -1,90 +0,0 @@
-/****************************************************************************
- * boards/arm/imxrt/imxrt1064-evk/src/imxrt_appinit.c
- *
- * SPDX-License-Identifier: Apache-2.0
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-#include <syslog.h>
-#include <sys/types.h>
-
-#include <nuttx/board.h>
-#include <nuttx/leds/userled.h>
-
-#include "imxrt1064-evk.h"
-
-#ifdef CONFIG_BOARDCTL
-
-/****************************************************************************
- * 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)
-{
-#if !defined(CONFIG_ARCH_LEDS) && defined(CONFIG_USERLED_LOWER)
-  /* Register the LED driver */
-
-  int ret;
-  ret = userled_lower_initialize(LED_DRIVER_PATH);
-  if (ret < 0)
-    {
-      syslog(LOG_ERR, "ERROR: userled_lower_initialize() failed: %d\n", ret);
-      return ret;
-    }
-#endif
-
-#ifndef CONFIG_BOARD_LATE_INITIALIZE
-  /* Perform board initialization */
-
-  return imxrt_bringup();
-#else
-  return OK;
-#endif
-}
-
-#endif /* CONFIG_BOARDCTL */
diff --git a/boards/arm/imxrt/imxrt1064-evk/src/imxrt_boot.c b/boards/arm/imxrt/imxrt1064-evk/src/imxrt_boot.c
index 8ff31cf02a4..afcc69ad53a 100644
--- a/boards/arm/imxrt/imxrt1064-evk/src/imxrt_boot.c
+++ b/boards/arm/imxrt/imxrt1064-evk/src/imxrt_boot.c
@@ -26,8 +26,12 @@
 
 #include <nuttx/config.h>
 
+#include <syslog.h>
+#include <sys/types.h>
+
 #include <nuttx/board.h>
 #include <arch/board/board.h>
+#include <nuttx/leds/userled.h>
 
 #include "imxrt_start.h"
 #include "imxrt1064-evk.h"
@@ -112,6 +116,17 @@ void imxrt_boardinitialize(void)
 #ifdef CONFIG_BOARD_LATE_INITIALIZE
 void board_late_initialize(void)
 {
+#if !defined(CONFIG_ARCH_LEDS) && defined(CONFIG_USERLED_LOWER)
+  /* Register the LED driver */
+
+  int ret;
+  ret = userled_lower_initialize(LED_DRIVER_PATH);
+  if (ret < 0)
+    {
+      syslog(LOG_ERR, "ERROR: userled_lower_initialize() failed: %d\n", ret);
+    }
+#endif
+
   /* Perform board initialization */
 
   imxrt_bringup();
diff --git a/boards/arm/imxrt/imxrt1170-evk/src/CMakeLists.txt b/boards/arm/imxrt/imxrt1170-evk/src/CMakeLists.txt
index a152cf3f22f..99e1741b417 100644
--- a/boards/arm/imxrt/imxrt1170-evk/src/CMakeLists.txt
+++ b/boards/arm/imxrt/imxrt1170-evk/src/CMakeLists.txt
@@ -21,18 +21,12 @@
 # ##############################################################################
 
 set(SRCS imxrt_boot.c imxrt_flexspi_nor_boot.c imxrt_flexspi_nor_flash.c
-         imxrt_clockconfig.c)
+         imxrt_clockconfig.c imxrt_bringup.c)
 
 if(CONFIG_IMXRT_SDRAMC)
   list(APPEND SRCS imxrt_sdram.c)
 endif()
 
-if(CONFIG_BOARDCTL)
-  list(APPEND SRCS imxrt_appinit.c imxrt_bringup.c)
-elseif(CONFIG_BOARD_LATE_INITIALIZE)
-  list(APPEND SRCS imxrt_bringup.c)
-endif()
-
 if(CONFIG_ARCH_LEDS)
   list(APPEND SRCS imxrt_autoleds.c)
 else()
diff --git a/boards/arm/imxrt/imxrt1170-evk/src/Makefile b/boards/arm/imxrt/imxrt1170-evk/src/Makefile
index 33b33360ed7..87f0a675393 100644
--- a/boards/arm/imxrt/imxrt1170-evk/src/Makefile
+++ b/boards/arm/imxrt/imxrt1170-evk/src/Makefile
@@ -23,18 +23,12 @@
 include $(TOPDIR)/Make.defs
 
 CSRCS  = imxrt_boot.c imxrt_flexspi_nor_boot.c imxrt_flexspi_nor_flash.c
-CSRCS += imxrt_clockconfig.c
+CSRCS += imxrt_clockconfig.c imxrt_bringup.c
 
 ifeq ($(CONFIG_IMXRT_SDRAMC),y)
 CSRCS += imxrt_sdram.c
 endif
 
-ifeq ($(CONFIG_BOARDCTL),y)
-CSRCS += imxrt_appinit.c imxrt_bringup.c
-else ifeq ($(CONFIG_BOARD_LATE_INITIALIZE),y)
-CSRCS += imxrt_bringup.c
-endif
-
 ifeq ($(CONFIG_ARCH_LEDS),y)
 CSRCS += imxrt_autoleds.c
 else
diff --git a/boards/arm/imxrt/imxrt1170-evk/src/imxrt_appinit.c b/boards/arm/imxrt/imxrt1170-evk/src/imxrt_appinit.c
deleted file mode 100644
index b4e7fc7dcb4..00000000000
--- a/boards/arm/imxrt/imxrt1170-evk/src/imxrt_appinit.c
+++ /dev/null
@@ -1,90 +0,0 @@
-/****************************************************************************
- * boards/arm/imxrt/imxrt1170-evk/src/imxrt_appinit.c
- *
- * SPDX-License-Identifier: Apache-2.0
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-#include <syslog.h>
-#include <sys/types.h>
-
-#include <nuttx/board.h>
-#include <nuttx/leds/userled.h>
-
-#include "imxrt1170-evk.h"
-
-#ifdef CONFIG_BOARDCTL
-
-/****************************************************************************
- * 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)
-{
-#if !defined(CONFIG_ARCH_LEDS) && defined(CONFIG_USERLED_LOWER)
-  /* Register the LED driver */
-
-  int ret;
-  ret = userled_lower_initialize(LED_DRIVER_PATH);
-  if (ret < 0)
-    {
-      syslog(LOG_ERR, "ERROR: userled_lower_initialize() failed: %d\n", ret);
-      return ret;
-    }
-#endif
-
-#ifndef CONFIG_BOARD_LATE_INITIALIZE
-  /* Perform board initialization */
-
-  return imxrt_bringup();
-#else
-  return OK;
-#endif
-}
-
-#endif /* CONFIG_BOARDCTL */
diff --git a/boards/arm/imxrt/imxrt1170-evk/src/imxrt_boot.c b/boards/arm/imxrt/imxrt1170-evk/src/imxrt_boot.c
index c2b0a31c739..00ae6df22ea 100644
--- a/boards/arm/imxrt/imxrt1170-evk/src/imxrt_boot.c
+++ b/boards/arm/imxrt/imxrt1170-evk/src/imxrt_boot.c
@@ -26,8 +26,12 @@
 
 #include <nuttx/config.h>
 
+#include <syslog.h>
+#include <sys/types.h>
+
 #include <nuttx/board.h>
 #include <arch/board/board.h>
+#include <nuttx/leds/userled.h>
 
 #include "imxrt_start.h"
 #include "imxrt1170-evk.h"
@@ -124,6 +128,17 @@ void imxrt_boardinitialize(void)
 #ifdef CONFIG_BOARD_LATE_INITIALIZE
 void board_late_initialize(void)
 {
+#if !defined(CONFIG_ARCH_LEDS) && defined(CONFIG_USERLED_LOWER)
+  /* Register the LED driver */
+
+  int ret;
+  ret = userled_lower_initialize(LED_DRIVER_PATH);
+  if (ret < 0)
+    {
+      syslog(LOG_ERR, "ERROR: userled_lower_initialize() failed: %d\n", ret);
+    }
+#endif
+
   /* Perform board initialization */
 
   imxrt_bringup();
diff --git a/boards/arm/imxrt/teensy-4.x/src/CMakeLists.txt b/boards/arm/imxrt/teensy-4.x/src/CMakeLists.txt
index 8e6ab53f784..a96e99581ec 100644
--- a/boards/arm/imxrt/teensy-4.x/src/CMakeLists.txt
+++ b/boards/arm/imxrt/teensy-4.x/src/CMakeLists.txt
@@ -20,13 +20,8 @@
 #
 # ##############################################################################
 
-set(SRCS imxrt_boot.c imxrt_flexspi_nor_boot.c imxrt_flexspi_nor_flash.c)
-
-if(CONFIG_BOARDCTL)
-  list(APPEND SRCS imxrt_appinit.c imxrt_bringup.c)
-elseif(CONFIG_BOARD_LATE_INITIALIZE)
-  list(APPEND SRCS imxrt_bringup.c)
-endif()
+set(SRCS imxrt_boot.c imxrt_flexspi_nor_boot.c imxrt_flexspi_nor_flash.c
+         imxrt_bringup.c)
 
 if(CONFIG_BOARDCTL_RESET)
   list(APPEND SRCS imxrt_reset.c)
diff --git a/boards/arm/imxrt/teensy-4.x/src/Makefile b/boards/arm/imxrt/teensy-4.x/src/Makefile
index 5bb3b17c59f..fbb43ad76e5 100644
--- a/boards/arm/imxrt/teensy-4.x/src/Makefile
+++ b/boards/arm/imxrt/teensy-4.x/src/Makefile
@@ -23,12 +23,7 @@
 include $(TOPDIR)/Make.defs
 
 CSRCS = imxrt_boot.c imxrt_flexspi_nor_boot.c imxrt_flexspi_nor_flash.c
-
-ifeq ($(CONFIG_BOARDCTL),y)
-CSRCS += imxrt_appinit.c imxrt_bringup.c
-else ifeq ($(CONFIG_BOARD_LATE_INITIALIZE),y)
 CSRCS += imxrt_bringup.c
-endif
 
 ifeq ($(CONFIG_BOARDCTL_RESET),y)
 CSRCS += imxrt_reset.c
diff --git a/boards/arm/imxrt/teensy-4.x/src/imxrt_appinit.c b/boards/arm/imxrt/teensy-4.x/src/imxrt_appinit.c
deleted file mode 100644
index cefaabe207b..00000000000
--- a/boards/arm/imxrt/teensy-4.x/src/imxrt_appinit.c
+++ /dev/null
@@ -1,98 +0,0 @@
-/****************************************************************************
- * boards/arm/imxrt/teensy-4.x/src/imxrt_appinit.c
- *
- * SPDX-License-Identifier: Apache-2.0
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <sys/types.h>
-#include <syslog.h>
-
-#include <nuttx/board.h>
-#include <nuttx/leds/userled.h>
-
-#include "teensy-4.h"
-
-#ifdef CONFIG_BOARDCTL
-
-/****************************************************************************
- * 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)
-{
-  int ret;
-#if !defined(CONFIG_ARCH_LEDS) && defined(CONFIG_USERLED_LOWER)
-  /* Register the LED driver */
-
-  ret = userled_lower_initialize(LED_DRIVER_PATH);
-  if (ret < 0)
-    {
-      syslog(LOG_ERR, "ERROR: userled_lower_initialize() failed: %d\n", ret);
-      return ret;
-    }
-#endif
-
-#if defined(CONFIG_IMXRT_LPSPI1) || defined(CONFIG_IMXRT_LPSPI2) || \
-    defined(CONFIG_IMXRT_LPSPI3) || defined(CONFIG_IMXRT_LPSPI4)
-  imxrt_spidev_initialize();
-#endif
-
-#  ifndef CONFIG_BOARD_LATE_INITIALIZE
-  /* Perform board initialization */
-
-  return imxrt_bringup();
-#  else
-  return OK;
-#  endif
-
-  UNUSED(ret);
-}
-
-#endif /* CONFIG_BOARDCTL */
diff --git a/boards/arm/imxrt/teensy-4.x/src/imxrt_boot.c b/boards/arm/imxrt/teensy-4.x/src/imxrt_boot.c
index 2c0194c433c..80939907e8a 100644
--- a/boards/arm/imxrt/teensy-4.x/src/imxrt_boot.c
+++ b/boards/arm/imxrt/teensy-4.x/src/imxrt_boot.c
@@ -26,8 +26,12 @@
 
 #include <nuttx/config.h>
 
+#include <sys/types.h>
+#include <syslog.h>
+
 #include <nuttx/board.h>
 #include <arch/board/board.h>
+#include <nuttx/leds/userled.h>
 
 #include "imxrt_start.h"
 #include "teensy-4.h"
@@ -113,8 +117,24 @@ void imxrt_boardinitialize(void)
 #ifdef CONFIG_BOARD_LATE_INITIALIZE
 void board_late_initialize(void)
 {
-  /* Perform board initialization */
+  int ret;
+#if !defined(CONFIG_ARCH_LEDS) && defined(CONFIG_USERLED_LOWER)
+  /* Register the LED driver */
+
+  ret = userled_lower_initialize(LED_DRIVER_PATH);
+  if (ret < 0)
+    {
+      syslog(LOG_ERR, "ERROR: userled_lower_initialize() failed: %d\n", ret);
+    }
+#endif
+
+#if defined(CONFIG_IMXRT_LPSPI1) || defined(CONFIG_IMXRT_LPSPI2) || \
+    defined(CONFIG_IMXRT_LPSPI3) || defined(CONFIG_IMXRT_LPSPI4)
+  imxrt_spidev_initialize();
+#endif
 
   imxrt_bringup();
+
+  UNUSED(ret);
 }
 #endif /* CONFIG_BOARD_LATE_INITIALIZE */
diff --git a/boards/arm/kinetis/freedom-k28f/src/CMakeLists.txt b/boards/arm/kinetis/freedom-k28f/src/CMakeLists.txt
index 3041d649abf..de911f5d882 100644
--- a/boards/arm/kinetis/freedom-k28f/src/CMakeLists.txt
+++ b/boards/arm/kinetis/freedom-k28f/src/CMakeLists.txt
@@ -22,10 +22,6 @@
 
 set(SRCS k28_boot.c k28_bringup.c k28_spi.c k28_i2c.c)
 
-if(CONFIG_BOARDCTL)
-  list(APPEND SRCS k28_appinit.c)
-endif()
-
 # If the RGB driver is not enabled, then treat the RGB as 3 LEDs
 
 if(NOT CONFIG_RGBLED)
diff --git a/boards/arm/kinetis/freedom-k28f/src/Makefile b/boards/arm/kinetis/freedom-k28f/src/Makefile
index 8ba545e0828..0f3e1c14a45 100644
--- a/boards/arm/kinetis/freedom-k28f/src/Makefile
+++ b/boards/arm/kinetis/freedom-k28f/src/Makefile
@@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs
 
 CSRCS = k28_boot.c k28_bringup.c k28_spi.c k28_i2c.c
 
-ifeq ($(CONFIG_BOARDCTL),y)
-CSRCS += k28_appinit.c
-endif
-
 # If the RGB driver is not enabled, then treat the RGB as 3 LEDs
 
 ifneq ($(CONFIG_RGBLED),y)
diff --git a/boards/arm/kinetis/freedom-k28f/src/k28_appinit.c b/boards/arm/kinetis/freedom-k28f/src/k28_appinit.c
deleted file mode 100644
index 277c395ac26..00000000000
--- a/boards/arm/kinetis/freedom-k28f/src/k28_appinit.c
+++ /dev/null
@@ -1,85 +0,0 @@
-/****************************************************************************
- * boards/arm/kinetis/freedom-k28f/src/k28_appinit.c
- *
- * SPDX-License-Identifier: Apache-2.0
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <sys/types.h>
-#include <syslog.h>
-
-#include <nuttx/board.h>
-
-#include "kinetis_usbotg.h"
-#include "freedom-k28f.h"
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Pre-processor Definitions
- ****************************************************************************/
-
-/****************************************************************************
- * 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 k28_bringup();
-#endif
-}
diff --git a/boards/arm/kinetis/freedom-k64f/src/CMakeLists.txt b/boards/arm/kinetis/freedom-k64f/src/CMakeLists.txt
index 8987c8811bb..8a8a896b770 100644
--- a/boards/arm/kinetis/freedom-k64f/src/CMakeLists.txt
+++ b/boards/arm/kinetis/freedom-k64f/src/CMakeLists.txt
@@ -20,7 +20,7 @@
 #
 # ##############################################################################
 
-set(SRCS k64_boot.c k64_spi.c)
+set(SRCS k64_boot.c k64_spi.c k64_bringup.c)
 
 if(CONFIG_ARCH_LEDS)
   list(APPEND SRCS k64_autoleds.c)
@@ -32,12 +32,6 @@ if(CONFIG_ARCH_BUTTONS)
   list(APPEND SRCS k64_buttons.c)
 endif()
 
-if(CONFIG_BOARDCTL)
-  list(APPEND SRCS k64_appinit.c k64_bringup.c)
-elseif(CONFIG_BOARD_LATE_INITIALIZE)
-  list(APPEND SRCS k64_bringup.c)
-endif()
-
 if(CONFIG_I2C)
   list(APPEND SRCS k64_i2c.c)
 endif()
diff --git a/boards/arm/kinetis/freedom-k64f/src/Makefile b/boards/arm/kinetis/freedom-k64f/src/Makefile
index 1bd41fda42b..b3ef284e740 100644
--- a/boards/arm/kinetis/freedom-k64f/src/Makefile
+++ b/boards/arm/kinetis/freedom-k64f/src/Makefile
@@ -22,7 +22,7 @@
 
 include $(TOPDIR)/Make.defs
 
-CSRCS = k64_boot.c k64_spi.c
+CSRCS = k64_bringup.c k64_boot.c k64_spi.c
 
 ifeq ($(CONFIG_ARCH_LEDS),y)
 CSRCS += k64_autoleds.c
@@ -34,12 +34,6 @@ ifeq ($(CONFIG_ARCH_BUTTONS),y)
 CSRCS += k64_buttons.c
 endif
 
-ifeq ($(CONFIG_BOARDCTL),y)
-CSRCS += k64_appinit.c k64_bringup.c
-else ifeq ($(CONFIG_BOARD_LATE_INITIALIZE),y)
-CSRCS += k64_bringup.c
-endif
-
 ifeq ($(CONFIG_I2C),y)
 CSRCS += k64_i2c.c
 endif
diff --git a/boards/arm/kinetis/freedom-k64f/src/freedom-k64f.h b/boards/arm/kinetis/freedom-k64f/src/freedom-k64f.h
index d6c57b9a3ed..4f401446f9f 100644
--- a/boards/arm/kinetis/freedom-k64f/src/freedom-k64f.h
+++ b/boards/arm/kinetis/freedom-k64f/src/freedom-k64f.h
@@ -260,9 +260,7 @@ void weak_function k64_usbinitialize(void);
  *
  ****************************************************************************/
 
-#if defined(CONFIG_BOARDCTL) || defined(CONFIG_BOARD_LATE_INITIALIZE)
 int k64_bringup(void);
-#endif
 
 /****************************************************************************
  * Name: k64_sdhc_initialize
diff --git a/boards/arm/kinetis/freedom-k64f/src/k64_appinit.c b/boards/arm/kinetis/freedom-k64f/src/k64_appinit.c
deleted file mode 100644
index 664f27f1ebd..00000000000
--- a/boards/arm/kinetis/freedom-k64f/src/k64_appinit.c
+++ /dev/null
@@ -1,77 +0,0 @@
-/****************************************************************************
- * boards/arm/kinetis/freedom-k64f/src/k64_appinit.c
- *
- * SPDX-License-Identifier: Apache-2.0
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <sys/types.h>
-
-#include <nuttx/board.h>
-
-#include "freedom-k64f.h"
-
-#ifdef CONFIG_BOARDCTL
-
-/****************************************************************************
- * 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)
-{
-#ifndef CONFIG_BOARD_LATE_INITIALIZE
-  /* Perform board initialization */
-
-  return k64_bringup();
-#else
-  return OK;
-#endif
-}
-
-#endif /* CONFIG_BOARDCTL */
diff --git a/boards/arm/kinetis/freedom-k64f/src/k64_usbmsc.c b/boards/arm/kinetis/freedom-k64f/src/k64_usbmsc.c
index 7c399532fc0..9f660f328d8 100644
--- a/boards/arm/kinetis/freedom-k64f/src/k64_usbmsc.c
+++ b/boards/arm/kinetis/freedom-k64f/src/k64_usbmsc.c
@@ -73,8 +73,7 @@
 int board_usbmsc_initialize(int port)
 {
   /* If system/usbmsc is built as an NSH command, then SD slot should
-   * already have been initialized in board_app_initialize()
-   * (see k64_appinit.c).
+   * already have been initialized.
    * In this case, there is nothing further to be done here.
    */
 
diff --git a/boards/arm/kinetis/freedom-k66f/src/CMakeLists.txt b/boards/arm/kinetis/freedom-k66f/src/CMakeLists.txt
index 325329f673d..2e4f0f7c03a 100644
--- a/boards/arm/kinetis/freedom-k66f/src/CMakeLists.txt
+++ b/boards/arm/kinetis/freedom-k66f/src/CMakeLists.txt
@@ -20,7 +20,7 @@
 #
 # ##############################################################################
 
-set(SRCS k66_boot.c k66_spi.c)
+set(SRCS k66_boot.c k66_spi.c k66_bringup.c)
 
 if(CONFIG_ARCH_LEDS)
   list(APPEND SRCS k66_autoleds.c)
@@ -32,13 +32,8 @@ if(CONFIG_ARCH_BUTTONS)
   list(APPEND SRCS k66_buttons.c)
 endif()
 
-if(CONFIG_BOARDCTL)
-  list(APPEND SRCS k66_appinit.c k66_bringup.c)
-  if(CONFIG_BOARDCTL_RESET)
-    list(APPEND SRCS k66_reset.c)
-  endif()
-elseif(CONFIG_BOARD_LATE_INITIALIZE)
-  list(APPEND SRCS k66_bringup.c)
+if(CONFIG_BOARDCTL_RESET)
+  list(APPEND SRCS k66_reset.c)
 endif()
 
 if(CONFIG_KINETIS_SDHC)
diff --git a/boards/arm/kinetis/freedom-k66f/src/Makefile b/boards/arm/kinetis/freedom-k66f/src/Makefile
index 12ec96c1b25..192ff41df28 100644
--- a/boards/arm/kinetis/freedom-k66f/src/Makefile
+++ b/boards/arm/kinetis/freedom-k66f/src/Makefile
@@ -22,7 +22,7 @@
 
 include $(TOPDIR)/Make.defs
 
-CSRCS = k66_boot.c k66_spi.c
+CSRCS = k66_boot.c k66_spi.c k66_bringup.c
 
 ifeq ($(CONFIG_ARCH_LEDS),y)
 CSRCS += k66_autoleds.c
@@ -34,14 +34,9 @@ ifeq ($(CONFIG_ARCH_BUTTONS),y)
 CSRCS += k66_buttons.c
 endif
 
-ifeq ($(CONFIG_BOARDCTL),y)
-CSRCS += k66_appinit.c k66_bringup.c
 ifeq ($(CONFIG_BOARDCTL_RESET),y)
 CSRCS += k66_reset.c
 endif
-else ifeq ($(CONFIG_BOARD_LATE_INITIALIZE),y)
-CSRCS += k66_bringup.c
-endif
 
 ifeq ($(CONFIG_KINETIS_SDHC),y)
 CSRCS += k66_sdhc.c
diff --git a/boards/arm/kinetis/freedom-k66f/src/k66_appinit.c b/boards/arm/kinetis/freedom-k66f/src/k66_appinit.c
deleted file mode 100644
index 1d69ed84072..00000000000
--- a/boards/arm/kinetis/freedom-k66f/src/k66_appinit.c
+++ /dev/null
@@ -1,77 +0,0 @@
-/****************************************************************************
- * boards/arm/kinetis/freedom-k66f/src/k66_appinit.c
- *
- * SPDX-License-Identifier: Apache-2.0
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <sys/types.h>
-
-#include <nuttx/board.h>
-
-#include "freedom-k66f.h"
-
-#ifdef CONFIG_BOARDCTL
-
-/****************************************************************************
- * 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)
-{
-#ifndef CONFIG_BOARD_LATE_INITIALIZE
-  /* Perform board initialization */
-
-  return k66_bringup();
-#else
-  return OK;
-#endif
-}
-
-#endif /* CONFIG_BOARDCTL */
diff --git a/boards/arm/kinetis/freedom-k66f/src/k66_usbmsc.c b/boards/arm/kinetis/freedom-k66f/src/k66_usbmsc.c
index a21f1dce616..022cd6f2450 100644
--- a/boards/arm/kinetis/freedom-k66f/src/k66_usbmsc.c
+++ b/boards/arm/kinetis/freedom-k66f/src/k66_usbmsc.c
@@ -73,8 +73,7 @@
 int board_usbmsc_initialize(int port)
 {
   /* If system/usbmsc is built as an NSH command, then SD slot should
-   * already have been initialized in board_app_initialize()
-   * (see k66_appinit.c).
+   * already have been initialized.
    * In this case, there is nothing further to be done here.
    */
 
diff --git a/boards/arm/kinetis/kwikstik-k40/src/CMakeLists.txt b/boards/arm/kinetis/kwikstik-k40/src/CMakeLists.txt
index f970c3160d9..bf80c4b0acc 100644
--- a/boards/arm/kinetis/kwikstik-k40/src/CMakeLists.txt
+++ b/boards/arm/kinetis/kwikstik-k40/src/CMakeLists.txt
@@ -30,10 +30,6 @@ if(CONFIG_ARCH_BUTTONS)
   list(APPEND SRCS k40_buttons.c)
 endif()
 
-if(CONFIG_BOARDCTL)
-  list(APPEND SRCS k40_appinit.c)
-endif()
-
 if(CONFIG_USBDEV)
   list(APPEND SRCS k40_usbdev.c)
 endif()
diff --git a/boards/arm/kinetis/kwikstik-k40/src/Makefile b/boards/arm/kinetis/kwikstik-k40/src/Makefile
index 6111cebad24..19270ed97aa 100644
--- a/boards/arm/kinetis/kwikstik-k40/src/Makefile
+++ b/boards/arm/kinetis/kwikstik-k40/src/Makefile
@@ -32,10 +32,6 @@ ifeq ($(CONFIG_ARCH_BUTTONS),y)
 CSRCS += k40_buttons.c
 endif
 
-ifeq ($(CONFIG_BOARDCTL),y)
-CSRCS += k40_appinit.c
-endif
-
 ifeq ($(CONFIG_USBDEV),y)
 CSRCS += k40_usbdev.c
 endif
diff --git a/boards/arm/kinetis/kwikstik-k40/src/k40_appinit.c b/boards/arm/kinetis/kwikstik-k40/src/k40_appinit.c
deleted file mode 100644
index fde1e6c9b00..00000000000
--- a/boards/arm/kinetis/kwikstik-k40/src/k40_appinit.c
+++ /dev/null
@@ -1,253 +0,0 @@
-/****************************************************************************
- * boards/arm/kinetis/kwikstik-k40/src/k40_appinit.c
- *
- * SPDX-License-Identifier: Apache-2.0
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <stdbool.h>
-#include <stdio.h>
-#include <syslog.h>
-#include <errno.h>
-
-#include <nuttx/board.h>
-
-#ifdef CONFIG_KINETIS_SDHC
-#  include <nuttx/sdio.h>
-#  include <nuttx/mmcsd.h>
-#endif
-
-#include "kinetis.h"
-#include "kwikstik-k40.h"
-
-/****************************************************************************
- * Pre-processor Definitions
- ****************************************************************************/
-
-/* Configuration ************************************************************/
-
-/* PORT and SLOT number probably depend on the board configuration */
-
-#ifdef CONFIG_ARCH_BOARD_KWIKSTIK_K40
-#  define NSH_HAVEUSBDEV 1
-#  define NSH_HAVEMMCSD  1
-#  if defined(CONFIG_NSH_MMCSDSLOTNO) && CONFIG_NSH_MMCSDSLOTNO != 0
-#    error "Only one MMC/SD slot, slot 0"
-#    undef CONFIG_NSH_MMCSDSLOTNO
-#  endif
-#  ifndef CONFIG_NSH_MMCSDSLOTNO
-#    define CONFIG_NSH_MMCSDSLOTNO 0
-#  endif
-#else
-  /* Add configuration for new Kinetis boards here */
-
-#  error "Unrecognized Kinetis board"
-#  undef NSH_HAVEUSBDEV
-#  undef NSH_HAVEMMCSD
-#endif
-
-/* Can't support USB features if USB is not enabled */
-
-#ifndef CONFIG_USBDEV
-#  undef NSH_HAVEUSBDEV
-#endif
-
-/* Can't support MMC/SD features if mountpoints are disabled or if SDHC
- * support is not enabled.
- */
-
-#if defined(CONFIG_DISABLE_MOUNTPOINT) || !defined(CONFIG_KINETIS_SDHC)
-#  undef NSH_HAVEMMCSD
-#endif
-
-#ifndef CONFIG_NSH_MMCSDMINOR
-#  define CONFIG_NSH_MMCSDMINOR 0
-#endif
-
-/* We expect to receive GPIO interrupts for card insertion events */
-
-#ifndef CONFIG_KINETIS_GPIOIRQ
-#  error "CONFIG_KINETIS_GPIOIRQ required for card detect interrupt"
-#endif
-
-#ifndef CONFIG_KINETIS_PORTEINTS
-#  error "CONFIG_KINETIS_PORTEINTS required for card detect interrupt"
-#endif
-
-/****************************************************************************
- * Private Types
- ****************************************************************************/
-
-/* This structure encapsulates the global variable used in this file and
- * reduces the probability of name collisions.
- */
-
-#ifdef NSH_HAVEMMCSD
-struct kinetis_nsh_s
-{
-  struct sdio_dev_s *sdhc; /* SDIO driver handle */
-  bool inserted;           /* True: card is inserted */
-};
-#endif
-
-/****************************************************************************
- * Private Data
- ****************************************************************************/
-
-#ifdef NSH_HAVEMMCSD
-static struct kinetis_nsh_s g_nsh;
-#endif
-
-/****************************************************************************
- * Private Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Name: kinetis_mediachange
- ****************************************************************************/
-
-#ifdef NSH_HAVEMMCSD
-static void kinetis_mediachange(void)
-{
-  bool inserted;
-
-  /* Get the current value of the card detect pin.  This pin is pulled up on
-   * board.  So low means that a card is present.
-   */
-
-  inserted = !kinetis_gpioread(GPIO_SD_CARDDETECT);
-
-  /* Has the pin changed state? */
-
-  if (inserted != g_nsh.inserted)
-    {
-      /* Yes..
-       * perform the appropriate action (this might need some debounce).
-       */
-
-      g_nsh.inserted = inserted;
-      sdhc_mediachange(g_nsh.sdhc, inserted);
-    }
-}
-#endif
-
-/****************************************************************************
- * Name: kinetis_cdinterrupt
- ****************************************************************************/
-
-#ifdef NSH_HAVEMMCSD
-static int kinetis_cdinterrupt(int irq, void *context)
-{
-  /* All of the work is done by kinetis_mediachange() */
-
-  kinetis_mediachange();
-  return OK;
-}
-#endif
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Name: board_app_initialize
- *
- * Description:
- *   Perform architecture specific initialization
- *
- * 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 NSH_HAVEMMCSD
-  int ret;
-
-  /* Configure GPIO pins.
-   *
-   * First CD power.  The initial state will provide SD power.
-   */
-
-  kinetis_pinconfig(GPIO_SD_CARDON);      /* Applies power to the card */
-
-  /* Attached the card detect interrupt (but don't enable it yet) */
-
-  kinetis_pinconfig(GPIO_SD_CARDDETECT);
-  kinetis_pinirqattach(GPIO_SD_CARDDETECT, kinetis_cdinterrupt, NULL);
-
-  /* Mount the SDHC-based MMC/SD block driver */
-
-  /* First, get an instance of the SDHC interface */
-
-  syslog(LOG_INFO, "Initializing SDHC slot %d\n",
-         CONFIG_NSH_MMCSDSLOTNO);
-
-  g_nsh.sdhc = sdhc_initialize(CONFIG_NSH_MMCSDSLOTNO);
-  if (!g_nsh.sdhc)
-    {
-      syslog(LOG_ERR, "ERROR: Failed to initialize SDHC slot %d\n",
-             CONFIG_NSH_MMCSDSLOTNO);
-      return -ENODEV;
-    }
-
-  /* Now bind the SDHC interface to the MMC/SD driver */
-
-  syslog(LOG_INFO, "Bind SDHC to the MMC/SD driver, minor=%d\n",
-         CONFIG_NSH_MMCSDMINOR);
-
-  ret = mmcsd_slotinitialize(CONFIG_NSH_MMCSDMINOR, g_nsh.sdhc);
-  if (ret != OK)
-    {
-      syslog(LOG_ERR,
-             "ERROR: Failed to bind SDHC to the MMC/SD driver: %d\n",
-             ret);
-      return ret;
-    }
-
-  syslog(LOG_INFO, "Successfully bound SDHC to the MMC/SD driver\n");
-
-  /* Handle the initial card state */
-
-  kinetis_mediachange();
-
-  /* Enable CD interrupts to handle subsequent media changes */
-
-  kinetis_pinirqenable(GPIO_SD_CARDDETECT);
-#endif
-  return OK;
-}
diff --git a/boards/arm/kinetis/kwikstik-k40/src/k40_boot.c b/boards/arm/kinetis/kwikstik-k40/src/k40_boot.c
index d305aa05149..41de1245d5c 100644
--- a/boards/arm/kinetis/kwikstik-k40/src/k40_boot.c
+++ b/boards/arm/kinetis/kwikstik-k40/src/k40_boot.c
@@ -28,20 +28,149 @@
 
 #include <nuttx/debug.h>
 
+#include <stdbool.h>
+#include <stdio.h>
+#include <syslog.h>
+#include <errno.h>
+
 #include <nuttx/board.h>
 #include <arch/board/board.h>
 
+#ifdef CONFIG_KINETIS_SDHC
+#  include <nuttx/sdio.h>
+#  include <nuttx/mmcsd.h>
+#endif
+
 #include "arm_internal.h"
+#include "kinetis.h"
 #include "kwikstik-k40.h"
 
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
 
+/* Configuration ************************************************************/
+
+/* PORT and SLOT number probably depend on the board configuration */
+
+#ifdef CONFIG_ARCH_BOARD_KWIKSTIK_K40
+#  define NSH_HAVEUSBDEV 1
+#  define NSH_HAVEMMCSD  1
+#  if defined(CONFIG_NSH_MMCSDSLOTNO) && CONFIG_NSH_MMCSDSLOTNO != 0
+#    error "Only one MMC/SD slot, slot 0"
+#    undef CONFIG_NSH_MMCSDSLOTNO
+#  endif
+#  ifndef CONFIG_NSH_MMCSDSLOTNO
+#    define CONFIG_NSH_MMCSDSLOTNO 0
+#  endif
+#else
+  /* Add configuration for new Kinetis boards here */
+
+#  error "Unrecognized Kinetis board"
+#  undef NSH_HAVEUSBDEV
+#  undef NSH_HAVEMMCSD
+#endif
+
+/* Can't support USB features if USB is not enabled */
+
+#ifndef CONFIG_USBDEV
+#  undef NSH_HAVEUSBDEV
+#endif
+
+/* Can't support MMC/SD features if mountpoints are disabled or if SDHC
+ * support is not enabled.
+ */
+
+#if defined(CONFIG_DISABLE_MOUNTPOINT) || !defined(CONFIG_KINETIS_SDHC)
+#  undef NSH_HAVEMMCSD
+#endif
+
+#ifndef CONFIG_NSH_MMCSDMINOR
+#  define CONFIG_NSH_MMCSDMINOR 0
+#endif
+
+/* We expect to receive GPIO interrupts for card insertion events */
+
+#ifndef CONFIG_KINETIS_GPIOIRQ
+#  error "CONFIG_KINETIS_GPIOIRQ required for card detect interrupt"
+#endif
+
+#ifndef CONFIG_KINETIS_PORTEINTS
+#  error "CONFIG_KINETIS_PORTEINTS required for card detect interrupt"
+#endif
+
+/****************************************************************************
+ * Private Types
+ ****************************************************************************/
+
+/* This structure encapsulates the global variable used in this file and
+ * reduces the probability of name collisions.
+ */
+
+#ifdef NSH_HAVEMMCSD
+struct kinetis_nsh_s
+{
+  struct sdio_dev_s *sdhc; /* SDIO driver handle */
+  bool inserted;           /* True: card is inserted */
+};
+#endif
+
+/****************************************************************************
+ * Private Data
+ ****************************************************************************/
+
+#ifdef NSH_HAVEMMCSD
+static struct kinetis_nsh_s g_nsh;
+#endif
+
+
 /****************************************************************************
  * Private Functions
  ****************************************************************************/
 
+/****************************************************************************
+ * Name: kinetis_mediachange
+ ****************************************************************************/
+
+#ifdef NSH_HAVEMMCSD
+static void kinetis_mediachange(void)
+{
+  bool inserted;
+
+  /* Get the current value of the card detect pin.  This pin is pulled up on
+   * board.  So low means that a card is present.
+   */
+
+  inserted = !kinetis_gpioread(GPIO_SD_CARDDETECT);
+
+  /* Has the pin changed state? */
+
+  if (inserted != g_nsh.inserted)
+    {
+      /* Yes..
+       * perform the appropriate action (this might need some debounce).
+       */
+
+      g_nsh.inserted = inserted;
+      sdhc_mediachange(g_nsh.sdhc, inserted);
+    }
+}
+#endif
+
+/****************************************************************************
+ * Name: kinetis_cdinterrupt
+ ****************************************************************************/
+
+#ifdef NSH_HAVEMMCSD
+static int kinetis_cdinterrupt(int irq, void *context)
+{
+  /* All of the work is done by kinetis_mediachange() */
+
+  kinetis_mediachange();
+  return OK;
+}
+#endif
+
 /****************************************************************************
  * Public Functions
  ****************************************************************************/
@@ -88,3 +217,76 @@ void kinetis_boardinitialize(void)
   board_autoled_initialize();
 #endif
 }
+
+/****************************************************************************
+ * Name: board_late_initialize
+ *
+ * Description:
+ *   If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional
+ *   initialization call will be performed in the boot-up sequence to a
+ *   function called board_late_initialize(). board_late_initialize() will be
+ *   called immediately after up_initialize() is called and just before the
+ *   initial application is started.  This additional initialization phase
+ *   may be used, for example, to initialize board-specific device drivers.
+ *
+ ****************************************************************************/
+
+#ifdef CONFIG_BOARD_LATE_INITIALIZE
+void board_late_initialize(void)
+{
+#ifdef NSH_HAVEMMCSD
+  int ret;
+
+  /* Configure GPIO pins.
+   *
+   * First CD power.  The initial state will provide SD power.
+   */
+
+  kinetis_pinconfig(GPIO_SD_CARDON);      /* Applies power to the card */
+
+  /* Attached the card detect interrupt (but don't enable it yet) */
+
+  kinetis_pinconfig(GPIO_SD_CARDDETECT);
+  kinetis_pinirqattach(GPIO_SD_CARDDETECT, kinetis_cdinterrupt, NULL);
+
+  /* Mount the SDHC-based MMC/SD block driver */
+
+  /* First, get an instance of the SDHC interface */
+
+  syslog(LOG_INFO, "Initializing SDHC slot %d\n",
+         CONFIG_NSH_MMCSDSLOTNO);
+
+  g_nsh.sdhc = sdhc_initialize(CONFIG_NSH_MMCSDSLOTNO);
+  if (!g_nsh.sdhc)
+    {
+      syslog(LOG_ERR, "ERROR: Failed to initialize SDHC slot %d\n",
+             CONFIG_NSH_MMCSDSLOTNO);
+      return;
+    }
+
+  /* Now bind the SDHC interface to the MMC/SD driver */
+
+  syslog(LOG_INFO, "Bind SDHC to the MMC/SD driver, minor=%d\n",
+         CONFIG_NSH_MMCSDMINOR);
+
+  ret = mmcsd_slotinitialize(CONFIG_NSH_MMCSDMINOR, g_nsh.sdhc);
+  if (ret != OK)
+    {
+      syslog(LOG_ERR,
+             "ERROR: Failed to bind SDHC to the MMC/SD driver: %d\n",
+             ret);
+      return;
+    }
+
+  syslog(LOG_INFO, "Successfully bound SDHC to the MMC/SD driver\n");
+
+  /* Handle the initial card state */
+
+  kinetis_mediachange();
+
+  /* Enable CD interrupts to handle subsequent media changes */
+
+  kinetis_pinirqenable(GPIO_SD_CARDDETECT);
+#endif
+}
+#endif
diff --git a/boards/arm/kinetis/kwikstik-k40/src/k40_usbmsc.c b/boards/arm/kinetis/kwikstik-k40/src/k40_usbmsc.c
index 4be33dc3b1d..783b1bbda3d 100644
--- a/boards/arm/kinetis/kwikstik-k40/src/k40_usbmsc.c
+++ b/boards/arm/kinetis/kwikstik-k40/src/k40_usbmsc.c
@@ -72,8 +72,7 @@
 int board_usbmsc_initialize(int port)
 {
   /* If system/usbmsc is built as an NSH command, then SD slot should
-   * already have been initialized in board_app_initialize()
-   * (see k40_appinit.c).
+   * already have been initialized.
    * In this case, there is nothing further to be done here.
    */
 
diff --git a/boards/arm/kinetis/teensy-3.x/src/CMakeLists.txt b/boards/arm/kinetis/teensy-3.x/src/CMakeLists.txt
index d362c5d7091..125acc1514f 100644
--- a/boards/arm/kinetis/teensy-3.x/src/CMakeLists.txt
+++ b/boards/arm/kinetis/teensy-3.x/src/CMakeLists.txt
@@ -31,10 +31,6 @@ if(CONFIG_KINETIS_USBOTG)
   list(APPEND SRCS k20_usbdev.c)
 endif()
 
-if(CONFIG_BOARDCTL)
-  list(APPEND SRCS k20_appinit.c)
-endif()
-
 if(CONFIG_PWM)
   list(APPEND SRCS k20_pwm.c)
 endif()
diff --git a/boards/arm/kinetis/teensy-3.x/src/Makefile b/boards/arm/kinetis/teensy-3.x/src/Makefile
index e255c86ca0a..8d2e24fb1dc 100644
--- a/boards/arm/kinetis/teensy-3.x/src/Makefile
+++ b/boards/arm/kinetis/teensy-3.x/src/Makefile
@@ -33,10 +33,6 @@ ifeq ($(CONFIG_KINETIS_USBOTG),y)
 CSRCS += k20_usbdev.c
 endif
 
-ifeq ($(CONFIG_BOARDCTL),y)
-CSRCS += k20_appinit.c
-endif
-
 ifeq ($(CONFIG_PWM),y)
 CSRCS += k20_pwm.c
 endif
diff --git a/boards/arm/kinetis/teensy-3.x/src/k20_appinit.c b/boards/arm/kinetis/teensy-3.x/src/k20_appinit.c
deleted file mode 100644
index 03a15c79e63..00000000000
--- a/boards/arm/kinetis/teensy-3.x/src/k20_appinit.c
+++ /dev/null
@@ -1,82 +0,0 @@
-/****************************************************************************
- * boards/arm/kinetis/teensy-3.x/src/k20_appinit.c
- *
- * SPDX-License-Identifier: Apache-2.0
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <sys/types.h>
-#include <syslog.h>
-
-#include <nuttx/board.h>
-
-#include "kinetis_usbotg.h"
-#include "teensy-3x.h"
-
-/****************************************************************************
- * 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)
-{
-  int ret;
-
-#ifdef CONFIG_PWM
-  /* Initialize PWM and register the PWM device. */
-
-  ret = kinetis_pwm_setup();
-  if (ret < 0)
-    {
-      syslog(LOG_ERR, "ERROR: kinetis_pwm_setup() failed: %d\n", ret);
-    }
-#endif
-
-  UNUSED(ret);
-  return OK;
-}
diff --git a/boards/arm/kinetis/teensy-3.x/src/k20_boot.c b/boards/arm/kinetis/teensy-3.x/src/k20_boot.c
index aeb0592f1f5..e29df37400b 100644
--- a/boards/arm/kinetis/teensy-3.x/src/k20_boot.c
+++ b/boards/arm/kinetis/teensy-3.x/src/k20_boot.c
@@ -28,9 +28,14 @@
 
 #include <nuttx/debug.h>
 
+#include <debug.h>
+#include <sys/types.h>
+#include <syslog.h>
+
 #include <nuttx/board.h>
 #include <arch/board/board.h>
 
+#include "kinetis_usbotg.h"
 #include "arm_internal.h"
 #include "teensy-3x.h"
 
@@ -69,11 +74,39 @@ void kinetis_boardinitialize(void)
 #endif
 }
 
-#if defined(CONFIG_BOARD_LATE_INITIALIZE)
+/****************************************************************************
+ * Name: board_late_initialize
+ *
+ * Description:
+ *   If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional
+ *   initialization call will be performed in the boot-up sequence to a
+ *   function called board_late_initialize().  board_late_initialize() will
+ *   be called immediately after up_intitialize() is called and just before
+ *   the initial application is started.  This additional initialization
+ *   phase may be used, for example, to initialize board-specific device
+ *   drivers.
+ *
+ ****************************************************************************/
+
+#ifdef CONFIG_BOARD_LATE_INITIALIZE
 void board_late_initialize(void)
 {
+  int ret;
+
 #if defined(CONFIG_KINETIS_I2C0) || defined(CONFIG_KINETIS_I2C1)
   kinetis_i2cdev_initialize();
 #endif
-}
+
+#ifdef CONFIG_PWM
+  /* Initialize PWM and register the PWM device. */
+
+  ret = kinetis_pwm_setup();
+  if (ret < 0)
+    {
+      syslog(LOG_ERR, "ERROR: kinetis_pwm_setup() failed: %d\n", ret);
+    }
 #endif
+
+  UNUSED(ret);
+}
+#endif /* CONFIG_BOARD_LATE_INITIALIZE */
diff --git a/boards/arm/kinetis/twr-k60n512/src/CMakeLists.txt b/boards/arm/kinetis/twr-k60n512/src/CMakeLists.txt
index 262855afc8a..5d608a1c3bc 100644
--- a/boards/arm/kinetis/twr-k60n512/src/CMakeLists.txt
+++ b/boards/arm/kinetis/twr-k60n512/src/CMakeLists.txt
@@ -30,10 +30,6 @@ if(CONFIG_ARCH_BUTTONS)
   list(APPEND SRCS k60_buttons.c)
 endif()
 
-if(CONFIG_BOARDCTL)
-  list(APPEND SRCS k60_appinit.c)
-endif()
-
 if(CONFIG_USBDEV)
   list(APPEND SRCS k60_usbdev.c)
 endif()
diff --git a/boards/arm/kinetis/twr-k60n512/src/Makefile b/boards/arm/kinetis/twr-k60n512/src/Makefile
index f41ef1a939f..4e0b7170ee5 100644
--- a/boards/arm/kinetis/twr-k60n512/src/Makefile
+++ b/boards/arm/kinetis/twr-k60n512/src/Makefile
@@ -32,10 +32,6 @@ ifeq ($(CONFIG_ARCH_BUTTONS),y)
 CSRCS += k60_buttons.c
 endif
 
-ifeq ($(CONFIG_BOARDCTL),y)
-CSRCS += k60_appinit.c
-endif
-
 ifeq ($(CONFIG_USBDEV),y)
 CSRCS += k60_usbdev.c
 endif
diff --git a/boards/arm/kinetis/twr-k60n512/src/k60_appinit.c b/boards/arm/kinetis/twr-k60n512/src/k60_appinit.c
deleted file mode 100644
index eaab1f213dc..00000000000
--- a/boards/arm/kinetis/twr-k60n512/src/k60_appinit.c
+++ /dev/null
@@ -1,266 +0,0 @@
-/****************************************************************************
- * boards/arm/kinetis/twr-k60n512/src/k60_appinit.c
- *
- * SPDX-License-Identifier: Apache-2.0
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <stdbool.h>
-#include <stdio.h>
-#include <syslog.h>
-#include <errno.h>
-
-#include <nuttx/board.h>
-
-#ifdef CONFIG_KINETIS_SDHC
-#  include <nuttx/sdio.h>
-#  include <nuttx/mmcsd.h>
-#endif
-
-#include "kinetis.h"
-#include "twr-k60n512.h"
-
-/****************************************************************************
- * Pre-processor Definitions
- ****************************************************************************/
-
-/* Configuration ************************************************************/
-
-/* PORT and SLOT number probably depend on the board configuration */
-
-#ifdef CONFIG_ARCH_BOARD_TWR_K60N512
-#  define NSH_HAVEUSBDEV 1
-#  define NSH_HAVEMMCSD  1
-#  if defined(CONFIG_NSH_MMCSDSLOTNO) && CONFIG_NSH_MMCSDSLOTNO != 0
-#    error "Only one MMC/SD slot, slot 0"
-#    undef CONFIG_NSH_MMCSDSLOTNO
-#  endif
-#  ifndef CONFIG_NSH_MMCSDSLOTNO
-#    define CONFIG_NSH_MMCSDSLOTNO 0
-#  endif
-#else
-  /* Add configuration for new Kinetis boards here */
-
-#  error "Unrecognized Kinetis board"
-#  undef NSH_HAVEUSBDEV
-#  undef NSH_HAVEMMCSD
-#endif
-
-/* Can't support USB features if USB is not enabled */
-
-#ifndef CONFIG_USBDEV
-#  undef NSH_HAVEUSBDEV
-#endif
-
-/* Can't support MMC/SD features if mountpoints are disabled or if SDHC
- * support is not enabled.
- */
-
-#if defined(CONFIG_DISABLE_MOUNTPOINT) || !defined(CONFIG_KINETIS_SDHC)
-#  undef NSH_HAVEMMCSD
-#endif
-
-#ifndef CONFIG_NSH_MMCSDMINOR
-#  define CONFIG_NSH_MMCSDMINOR 0
-#endif
-
-/* We expect to receive GPIO interrupts for card insertion events */
-
-#ifdef NSH_HAVEMMCSD
-#  ifndef CONFIG_KINETIS_GPIOIRQ
-#    error "CONFIG_KINETIS_GPIOIRQ required for card detect interrupt"
-#  endif
-
-#  ifndef CONFIG_KINETIS_PORTEINTS
-#    error "CONFIG_KINETIS_PORTEINTS required for card detect interrupt"
-#  endif
-#endif
-
-/****************************************************************************
- * Private Types
- ****************************************************************************/
-
-/* This structure encapsulates the global variable used in this file and
- * reduces the probability of name collisions.
- */
-
-#ifdef NSH_HAVEMMCSD
-struct kinetis_nsh_s
-{
-  struct sdio_dev_s *sdhc; /* SDIO driver handle */
-  bool inserted;           /* True: card is inserted */
-};
-#endif
-
-/****************************************************************************
- * Private Data
- ****************************************************************************/
-
-#ifdef NSH_HAVEMMCSD
-static struct kinetis_nsh_s g_nsh;
-#endif
-
-/****************************************************************************
- * Private Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Name: kinetis_mediachange
- ****************************************************************************/
-
-#ifdef NSH_HAVEMMCSD
-static void kinetis_mediachange(void)
-{
-  bool inserted;
-
-  /* Get the current value of the card detect pin.  This pin is pulled up on
-   * board.  So low means that a card is present.
-   */
-
-  inserted = !kinetis_gpioread(GPIO_SD_CARDDETECT);
-
-  /* Has the pin changed state? */
-
-  if (inserted != g_nsh.inserted)
-    {
-      /* Yes..
-       * perform the appropriate action (this might need some debounce).
-       */
-
-      g_nsh.inserted = inserted;
-      sdhc_mediachange(g_nsh.sdhc, inserted);
-
-      /* If the card has been inserted, then check if it is write protected
-       * as well.  The pin is pulled up, but apparently logic high means
-       * write protected.
-       */
-
-      if (inserted)
-        {
-          sdhc_wrprotect(g_nsh.sdhc, kinetis_gpioread(GPIO_SD_WRPROTECT));
-        }
-    }
-}
-#endif
-
-/****************************************************************************
- * Name: kinetis_cdinterrupt
- ****************************************************************************/
-
-#ifdef NSH_HAVEMMCSD
-static int kinetis_cdinterrupt(int irq, void *context)
-{
-  /* All of the work is done by kinetis_mediachange() */
-
-  kinetis_mediachange();
-  return OK;
-}
-#endif
-
-/****************************************************************************
- * 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 NSH_HAVEMMCSD
-  int ret;
-
-  /* Configure GPIO pins */
-
-  /* Attached the card detect interrupt (but don't enable it yet) */
-
-  kinetis_pinconfig(GPIO_SD_CARDDETECT);
-  kinetis_pinirqattach(GPIO_SD_CARDDETECT, kinetis_cdinterrupt, NULL);
-
-  /* Configure the write protect GPIO */
-
-  kinetis_pinconfig(GPIO_SD_WRPROTECT);
-
-  /* Mount the SDHC-based MMC/SD block driver */
-
-  /* First, get an instance of the SDHC interface */
-
-  syslog(LOG_INFO, "Initializing SDHC slot %d\n",
-         CONFIG_NSH_MMCSDSLOTNO);
-
-  g_nsh.sdhc = sdhc_initialize(CONFIG_NSH_MMCSDSLOTNO);
-  if (!g_nsh.sdhc)
-    {
-      syslog(LOG_ERR, "ERROR: Failed to initialize SDHC slot %d\n",
-             CONFIG_NSH_MMCSDSLOTNO);
-      return -ENODEV;
-    }
-
-  /* Now bind the SDHC interface to the MMC/SD driver */
-
-  syslog(LOG_INFO, "Bind SDHC to the MMC/SD driver, minor=%d\n",
-         CONFIG_NSH_MMCSDMINOR);
-
-  ret = mmcsd_slotinitialize(CONFIG_NSH_MMCSDMINOR, g_nsh.sdhc);
-  if (ret != OK)
-    {
-      syslog(LOG_ERR,
-             "ERROR: Failed to bind SDHC to the MMC/SD driver: %d\n",
-             ret);
-      return ret;
-    }
-
-  syslog(LOG_INFO, "Successfully bound SDHC to the MMC/SD driver\n");
-
-  /* Handle the initial card state */
-
-  kinetis_mediachange();
-
-  /* Enable CD interrupts to handle subsequent media changes */
-
-  kinetis_pinirqenable(GPIO_SD_CARDDETECT);
-#endif
-  return OK;
-}
diff --git a/boards/arm/kinetis/twr-k60n512/src/k60_boot.c b/boards/arm/kinetis/twr-k60n512/src/k60_boot.c
index af711cb7568..b9195d42cb3 100644
--- a/boards/arm/kinetis/twr-k60n512/src/k60_boot.c
+++ b/boards/arm/kinetis/twr-k60n512/src/k60_boot.c
@@ -28,20 +28,160 @@
 
 #include <nuttx/debug.h>
 
+#include <stdbool.h>
+#include <stdio.h>
+#include <syslog.h>
+#include <errno.h>
+
 #include <nuttx/board.h>
 #include <arch/board/board.h>
 
+#ifdef CONFIG_KINETIS_SDHC
+#  include <nuttx/sdio.h>
+#  include <nuttx/mmcsd.h>
+#endif
+
 #include "arm_internal.h"
+#include "kinetis.h"
 #include "twr-k60n512.h"
 
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
 
+/* Configuration ************************************************************/
+
+/* PORT and SLOT number probably depend on the board configuration */
+
+#ifdef CONFIG_ARCH_BOARD_TWR_K60N512
+#  define NSH_HAVEUSBDEV 1
+#  define NSH_HAVEMMCSD  1
+#  if defined(CONFIG_NSH_MMCSDSLOTNO) && CONFIG_NSH_MMCSDSLOTNO != 0
+#    error "Only one MMC/SD slot, slot 0"
+#    undef CONFIG_NSH_MMCSDSLOTNO
+#  endif
+#  ifndef CONFIG_NSH_MMCSDSLOTNO
+#    define CONFIG_NSH_MMCSDSLOTNO 0
+#  endif
+#else
+  /* Add configuration for new Kinetis boards here */
+
+#  error "Unrecognized Kinetis board"
+#  undef NSH_HAVEUSBDEV
+#  undef NSH_HAVEMMCSD
+#endif
+
+/* Can't support USB features if USB is not enabled */
+
+#ifndef CONFIG_USBDEV
+#  undef NSH_HAVEUSBDEV
+#endif
+
+/* Can't support MMC/SD features if mountpoints are disabled or if SDHC
+ * support is not enabled.
+ */
+
+#if defined(CONFIG_DISABLE_MOUNTPOINT) || !defined(CONFIG_KINETIS_SDHC)
+#  undef NSH_HAVEMMCSD
+#endif
+
+#ifndef CONFIG_NSH_MMCSDMINOR
+#  define CONFIG_NSH_MMCSDMINOR 0
+#endif
+
+/* We expect to receive GPIO interrupts for card insertion events */
+
+#ifdef NSH_HAVEMMCSD
+#  ifndef CONFIG_KINETIS_GPIOIRQ
+#    error "CONFIG_KINETIS_GPIOIRQ required for card detect interrupt"
+#  endif
+
+#  ifndef CONFIG_KINETIS_PORTEINTS
+#    error "CONFIG_KINETIS_PORTEINTS required for card detect interrupt"
+#  endif
+#endif
+
+/****************************************************************************
+ * Private Types
+ ****************************************************************************/
+
+/* This structure encapsulates the global variable used in this file and
+ * reduces the probability of name collisions.
+ */
+
+#ifdef NSH_HAVEMMCSD
+struct kinetis_nsh_s
+{
+  struct sdio_dev_s *sdhc; /* SDIO driver handle */
+  bool inserted;           /* True: card is inserted */
+};
+#endif
+
+/****************************************************************************
+ * Private Data
+ ****************************************************************************/
+
+#ifdef NSH_HAVEMMCSD
+static struct kinetis_nsh_s g_nsh;
+#endif
+
 /****************************************************************************
  * Private Functions
  ****************************************************************************/
 
+/****************************************************************************
+ * Name: kinetis_mediachange
+ ****************************************************************************/
+
+#ifdef NSH_HAVEMMCSD
+static void kinetis_mediachange(void)
+{
+  bool inserted;
+
+  /* Get the current value of the card detect pin.  This pin is pulled up on
+   * board.  So low means that a card is present.
+   */
+
+  inserted = !kinetis_gpioread(GPIO_SD_CARDDETECT);
+
+  /* Has the pin changed state? */
+
+  if (inserted != g_nsh.inserted)
+    {
+      /* Yes..
+       * perform the appropriate action (this might need some debounce).
+       */
+
+      g_nsh.inserted = inserted;
+      sdhc_mediachange(g_nsh.sdhc, inserted);
+
+      /* If the card has been inserted, then check if it is write protected
+       * as well.  The pin is pulled up, but apparently logic high means
+       * write protected.
+       */
+
+      if (inserted)
+        {
+          sdhc_wrprotect(g_nsh.sdhc, kinetis_gpioread(GPIO_SD_WRPROTECT));
+        }
+    }
+}
+#endif
+
+/****************************************************************************
+ * Name: kinetis_cdinterrupt
+ ****************************************************************************/
+
+#ifdef NSH_HAVEMMCSD
+static int kinetis_cdinterrupt(int irq, void *context)
+{
+  /* All of the work is done by kinetis_mediachange() */
+
+  kinetis_mediachange();
+  return OK;
+}
+#endif
+
 /****************************************************************************
  * Public Functions
  ****************************************************************************/
@@ -88,3 +228,76 @@ void kinetis_boardinitialize(void)
   board_autoled_initialize();
 #endif
 }
+
+/****************************************************************************
+ * Name: board_late_initialize
+ *
+ * Description:
+ *   If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional
+ *   initialization call will be performed in the boot-up sequence to a
+ *   function called board_late_initialize().  board_late_initialize() will
+ *   be called immediately after up_intitialize() is called and just before
+ *   the initial application is started.  This additional initialization
+ *   phase may be used, for example, to initialize board-specific device
+ *   drivers.
+ *
+ ****************************************************************************/
+
+#ifdef CONFIG_BOARD_LATE_INITIALIZE
+void board_late_initialize(void)
+{
+#ifdef NSH_HAVEMMCSD
+  int ret;
+
+  /* Configure GPIO pins */
+
+  /* Attached the card detect interrupt (but don't enable it yet) */
+
+  kinetis_pinconfig(GPIO_SD_CARDDETECT);
+  kinetis_pinirqattach(GPIO_SD_CARDDETECT, kinetis_cdinterrupt, NULL);
+
+  /* Configure the write protect GPIO */
+
+  kinetis_pinconfig(GPIO_SD_WRPROTECT);
+
+  /* Mount the SDHC-based MMC/SD block driver */
+
+  /* First, get an instance of the SDHC interface */
+
+  syslog(LOG_INFO, "Initializing SDHC slot %d\n",
+         CONFIG_NSH_MMCSDSLOTNO);
+
+  g_nsh.sdhc = sdhc_initialize(CONFIG_NSH_MMCSDSLOTNO);
+  if (!g_nsh.sdhc)
+    {
+      syslog(LOG_ERR, "ERROR: Failed to initialize SDHC slot %d\n",
+             CONFIG_NSH_MMCSDSLOTNO);
+      return;
+    }
+
+  /* Now bind the SDHC interface to the MMC/SD driver */
+
+  syslog(LOG_INFO, "Bind SDHC to the MMC/SD driver, minor=%d\n",
+         CONFIG_NSH_MMCSDMINOR);
+
+  ret = mmcsd_slotinitialize(CONFIG_NSH_MMCSDMINOR, g_nsh.sdhc);
+  if (ret != OK)
+    {
+      syslog(LOG_ERR,
+             "ERROR: Failed to bind SDHC to the MMC/SD driver: %d\n",
+             ret);
+      return;
+    }
+
+  syslog(LOG_INFO, "Successfully bound SDHC to the MMC/SD driver\n");
+
+  /* Handle the initial card state */
+
+  kinetis_mediachange();
+
+  /* Enable CD interrupts to handle subsequent media changes */
+
+  kinetis_pinirqenable(GPIO_SD_CARDDETECT);
+#endif
+}
+#endif /* CONFIG_BOARD_LATE_INITIALIZE */
diff --git a/boards/arm/kinetis/twr-k60n512/src/k60_usbmsc.c b/boards/arm/kinetis/twr-k60n512/src/k60_usbmsc.c
index dc1fa7e7d8f..709ea9f1245 100644
--- a/boards/arm/kinetis/twr-k60n512/src/k60_usbmsc.c
+++ b/boards/arm/kinetis/twr-k60n512/src/k60_usbmsc.c
@@ -73,8 +73,7 @@
 int board_usbmsc_initialize(int port)
 {
   /* If system/usbmsc is built as an NSH command, then SD slot should
-   * already have been initialized in board_app_initialize()
-   * (see k60_appinit.c).
+   * already have been initialized.
    * In this case, there is nothing further to be done here.
    */
 
diff --git a/boards/arm/kinetis/twr-k64f120m/src/CMakeLists.txt b/boards/arm/kinetis/twr-k64f120m/src/CMakeLists.txt
index 06cdd7759f1..dfcf968053c 100644
--- a/boards/arm/kinetis/twr-k64f120m/src/CMakeLists.txt
+++ b/boards/arm/kinetis/twr-k64f120m/src/CMakeLists.txt
@@ -26,10 +26,6 @@ if(CONFIG_ARCH_LEDS)
   list(APPEND SRCS k64_leds.c)
 endif()
 
-if(CONFIG_BOARDCTL)
-  list(APPEND SRCS k64_appinit.c)
-endif()
-
 if(CONFIG_KINETIS_SDHC)
   list(APPEND SRCS k64_sdhc.c)
   if(CONFIG_FS_AUTOMOUNTER)
diff --git a/boards/arm/kinetis/twr-k64f120m/src/Makefile b/boards/arm/kinetis/twr-k64f120m/src/Makefile
index 3c721ecc1d3..f241be632ba 100644
--- a/boards/arm/kinetis/twr-k64f120m/src/Makefile
+++ b/boards/arm/kinetis/twr-k64f120m/src/Makefile
@@ -33,10 +33,6 @@ ifeq ($(CONFIG_ARCH_BUTTONS),y)
 #CSRCS += k64_buttons.c
 endif
 
-ifeq ($(CONFIG_BOARDCTL),y)
-CSRCS += k64_appinit.c
-endif
-
 ifeq ($(CONFIG_KINETIS_SDHC),y)
 CSRCS += k64_sdhc.c
 ifeq ($(CONFIG_FS_AUTOMOUNTER),y)
diff --git a/boards/arm/kinetis/twr-k64f120m/src/k64_appinit.c b/boards/arm/kinetis/twr-k64f120m/src/k64_appinit.c
deleted file mode 100644
index 3077c904d10..00000000000
--- a/boards/arm/kinetis/twr-k64f120m/src/k64_appinit.c
+++ /dev/null
@@ -1,98 +0,0 @@
-/****************************************************************************
- * boards/arm/kinetis/twr-k64f120m/src/k64_appinit.c
- *
- * SPDX-License-Identifier: Apache-2.0
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <stdbool.h>
-#include <stdio.h>
-#include <syslog.h>
-#include <errno.h>
-
-#include <nuttx/board.h>
-#include <nuttx/fs/fs.h>
-
-#ifdef CONFIG_KINETIS_SDHC
-#  include <nuttx/sdio.h>
-#  include <nuttx/mmcsd.h>
-#endif
-
-#include "kinetis.h"
-#include "twrk64.h"
-
-/****************************************************************************
- * 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)
-{
-  int ret;
-
-#ifdef HAVE_PROC
-  /* Mount the proc filesystem */
-
-  syslog(LOG_INFO, "Mounting procfs to /proc\n");
-
-  ret = nx_mount(NULL, PROCFS_MOUNTPOUNT, "procfs", 0, NULL);
-  if (ret < 0)
-    {
-      syslog(LOG_ERR,
-             "ERROR: Failed to mount the PROC filesystem: %d\n",  ret);
-      return ret;
-    }
-#endif
-
-#ifdef HAVE_MMCSD
-  /* Initialize the MMC/SD driver and possible automount */
-
-  return k64_sdhc_initialize();
-#endif
-  return OK;
-}
diff --git a/boards/arm/kinetis/twr-k64f120m/src/k64_boot.c b/boards/arm/kinetis/twr-k64f120m/src/k64_boot.c
index 76b2112ec8e..366dff5ef6e 100644
--- a/boards/arm/kinetis/twr-k64f120m/src/k64_boot.c
+++ b/boards/arm/kinetis/twr-k64f120m/src/k64_boot.c
@@ -28,9 +28,20 @@
 
 #include <nuttx/debug.h>
 
+#include <stdbool.h>
+#include <stdio.h>
+#include <syslog.h>
+#include <errno.h>
+
 #include <nuttx/board.h>
 #include <arch/board/board.h>
 
+#ifdef CONFIG_KINETIS_SDHC
+#  include <nuttx/sdio.h>
+#  include <nuttx/mmcsd.h>
+#endif
+
+#include "kinetis.h"
 #include "arm_internal.h"
 #include "twrk64.h"
 
@@ -88,3 +99,44 @@ void kinetis_boardinitialize(void)
   board_autoled_initialize();
 #endif
 }
+
+/****************************************************************************
+ * Name: board_late_initialize
+ *
+ * Description:
+ *   If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional
+ *   initialization call will be performed in the boot-up sequence to a
+ *   function called board_late_initialize().  board_late_initialize() will
+ *   be called immediately after up_intitialize() is called and just before
+ *   the initial application is started.  This additional initialization
+ *   phase may be used, for example, to initialize board-specific device
+ *   drivers.
+ *
+ ****************************************************************************/
+
+#ifdef CONFIG_BOARD_LATE_INITIALIZE
+void board_late_initialize(void)
+{
+  int ret;
+
+#ifdef HAVE_PROC
+  /* Mount the proc filesystem */
+
+  syslog(LOG_INFO, "Mounting procfs to /proc\n");
+
+  ret = nx_mount(NULL, PROCFS_MOUNTPOUNT, "procfs", 0, NULL);
+  if (ret < 0)
+    {
+      syslog(LOG_ERR,
+             "ERROR: Failed to mount the PROC filesystem: %d\n",  ret);
+      return;
+    }
+#endif
+
+#ifdef HAVE_MMCSD
+  /* Initialize the MMC/SD driver and possible automount */
+
+  k64_sdhc_initialize();
+#endif
+}
+#endif /* CONFIG_BOARD_LATE_INITIALIZE */
diff --git a/boards/arm/kl/freedom-kl25z/src/CMakeLists.txt b/boards/arm/kl/freedom-kl25z/src/CMakeLists.txt
index 19e6395ae98..ae654689399 100644
--- a/boards/arm/kl/freedom-kl25z/src/CMakeLists.txt
+++ b/boards/arm/kl/freedom-kl25z/src/CMakeLists.txt
@@ -22,10 +22,6 @@
 
 set(SRCS kl_boardinitialize.c)
 
-if(CONFIG_BOARDCTL)
-  list(APPEND SRCS kl_appinit.c)
-endif()
-
 if(CONFIG_KL_TSI)
   list(APPEND SRCS kl_tsi.c)
 endif()
diff --git a/boards/arm/kl/freedom-kl25z/src/Makefile b/boards/arm/kl/freedom-kl25z/src/Makefile
index b09f8213fe2..8a0e18b9d5d 100644
--- a/boards/arm/kl/freedom-kl25z/src/Makefile
+++ b/boards/arm/kl/freedom-kl25z/src/Makefile
@@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs
 
 CSRCS = kl_boardinitialize.c
 
-ifeq ($(CONFIG_BOARDCTL),y)
-CSRCS += kl_appinit.c
-endif
-
 ifeq ($(CONFIG_KL_TSI),y)
 CSRCS += kl_tsi.c
 endif
diff --git a/boards/arm/kl/freedom-kl25z/src/kl_appinit.c b/boards/arm/kl/freedom-kl25z/src/kl_appinit.c
deleted file mode 100644
index f4ff6b17865..00000000000
--- a/boards/arm/kl/freedom-kl25z/src/kl_appinit.c
+++ /dev/null
@@ -1,92 +0,0 @@
-/****************************************************************************
- * boards/arm/kl/freedom-kl25z/src/kl_appinit.c
- *
- * SPDX-License-Identifier: Apache-2.0
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <sys/types.h>
-#include <stdio.h>
-#include <syslog.h>
-
-#include <nuttx/board.h>
-
-#include "freedom-kl25z.h"
-
-#ifdef CONFIG_BOARDCTL
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Name: board_app_initialize
- *
- * Description:
- *   Perform architecture specific initialization
- *
- * 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)
-{
-  int ret;
-
-  #if defined(CONFIG_SENSORS_ADXL345)
-  ret = adxl345_archinitialize(0);
-  if (ret < 0)
-    {
-      syslog(LOG_ERR, "ERROR: adxl345_archinitialize failed: %d\n", ret);
-    }
-#endif
-
-#ifdef CONFIG_PWM
-  /* Initialize PWM and register the PWM device. */
-
-  ret = kl_pwm_setup();
-  if (ret < 0)
-    {
-      syslog(LOG_ERR, "ERROR: k64_pwm_setup() failed: %d\n", ret);
-    }
-#endif
-
-  UNUSED(ret);
-  return OK;
-}
-
-#endif /* CONFIG_BOARDCTL */
diff --git a/boards/arm/kl/freedom-kl25z/src/kl_boardinitialize.c b/boards/arm/kl/freedom-kl25z/src/kl_boardinitialize.c
index 089b199779f..e14bfeb4ef8 100644
--- a/boards/arm/kl/freedom-kl25z/src/kl_boardinitialize.c
+++ b/boards/arm/kl/freedom-kl25z/src/kl_boardinitialize.c
@@ -28,6 +28,10 @@
 
 #include <nuttx/debug.h>
 
+#include <sys/types.h>
+#include <stdio.h>
+#include <syslog.h>
+
 #include <nuttx/board.h>
 #include <arch/board/board.h>
 
@@ -106,13 +110,26 @@ void kl_boardinitialize(void)
 #ifdef CONFIG_BOARD_LATE_INITIALIZE
 void board_late_initialize(void)
 {
-  /* Perform NSH initialization here instead of from the NSH.  This
-   * alternative NSH initialization is necessary when NSH is ran in
-   * user-space but the initialization function must run in kernel space.
-   */
+  int ret;
+
+  #if defined(CONFIG_SENSORS_ADXL345)
+  ret = adxl345_archinitialize(0);
+  if (ret < 0)
+    {
+      syslog(LOG_ERR, "ERROR: adxl345_archinitialize failed: %d\n", ret);
+    }
+#endif
+
+#ifdef CONFIG_PWM
+  /* Initialize PWM and register the PWM device. */
 
-#if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_BOARDCTL)
-  board_app_initialize(0);
+  ret = kl_pwm_setup();
+  if (ret < 0)
+    {
+      syslog(LOG_ERR, "ERROR: k64_pwm_setup() failed: %d\n", ret);
+    }
 #endif
+
+  UNUSED(ret);
 }
 #endif
diff --git a/boards/arm/kl/freedom-kl26z/src/CMakeLists.txt b/boards/arm/kl/freedom-kl26z/src/CMakeLists.txt
index 86ab715d90c..d9e556a7637 100644
--- a/boards/arm/kl/freedom-kl26z/src/CMakeLists.txt
+++ b/boards/arm/kl/freedom-kl26z/src/CMakeLists.txt
@@ -22,10 +22,6 @@
 
 set(SRCS kl_boardinitialize.c)
 
-if(CONFIG_BOARDCTL)
-  list(APPEND SRCS kl_appinit.c)
-endif()
-
 if(CONFIG_KL_TSI)
   list(APPEND SRCS kl_tsi.c)
 endif()
diff --git a/boards/arm/kl/freedom-kl26z/src/Makefile b/boards/arm/kl/freedom-kl26z/src/Makefile
index c09674f3153..d5e68e860c9 100644
--- a/boards/arm/kl/freedom-kl26z/src/Makefile
+++ b/boards/arm/kl/freedom-kl26z/src/Makefile
@@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs
 
 CSRCS = kl_boardinitialize.c
 
-ifeq ($(CONFIG_BOARDCTL),y)
-CSRCS += kl_appinit.c
-endif
-
 ifeq ($(CONFIG_KL_TSI),y)
 CSRCS += kl_tsi.c
 endif
diff --git a/boards/arm/kl/freedom-kl26z/src/kl_appinit.c b/boards/arm/kl/freedom-kl26z/src/kl_appinit.c
deleted file mode 100644
index d4bf50931e6..00000000000
--- a/boards/arm/kl/freedom-kl26z/src/kl_appinit.c
+++ /dev/null
@@ -1,83 +0,0 @@
-/****************************************************************************
- * boards/arm/kl/freedom-kl26z/src/kl_appinit.c
- *
- * SPDX-License-Identifier: Apache-2.0
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <sys/types.h>
-#include <syslog.h>
-
-#include <nuttx/board.h>
-
-#include "freedom-kl26z.h"
-
-#ifdef CONFIG_BOARDCTL
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Name: board_app_initialize
- *
- * Description:
- *   Perform architecture specific initialization
- *
- * 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)
-{
-  int ret;
-
-#ifdef CONFIG_PWM
-  /* Initialize PWM and register the PWM device. */
-
-  ret = kl_pwm_setup();
-  if (ret < 0)
-    {
-      syslog(LOG_ERR, "ERROR: kl_pwm_setup() failed: %d\n", ret);
-    }
-#endif
-
-  UNUSED(ret);
-  return OK;
-}
-
-#endif /* CONFIG_BOARDCTL */
diff --git a/boards/arm/kl/freedom-kl26z/src/kl_boardinitialize.c b/boards/arm/kl/freedom-kl26z/src/kl_boardinitialize.c
index 8656ec5f2a8..0e8272de479 100644
--- a/boards/arm/kl/freedom-kl26z/src/kl_boardinitialize.c
+++ b/boards/arm/kl/freedom-kl26z/src/kl_boardinitialize.c
@@ -99,13 +99,18 @@ void kl_boardinitialize(void)
 #ifdef CONFIG_BOARD_LATE_INITIALIZE
 void board_late_initialize(void)
 {
-  /* Perform NSH initialization here instead of from the NSH.  This
-   * alternative NSH initialization is necessary when NSH is ran in
-   * user-space but the initialization function must run in kernel space.
-   */
+  int ret;
+
+#ifdef CONFIG_PWM
+  /* Initialize PWM and register the PWM device. */
 
-#if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_BOARDCTL)
-  board_app_initialize(0);
+  ret = kl_pwm_setup();
+  if (ret < 0)
+    {
+      syslog(LOG_ERR, "ERROR: kl_pwm_setup() failed: %d\n", ret);
+    }
 #endif
+
+  UNUSED(ret);
 }
 #endif
diff --git a/boards/arm/kl/teensy-lc/src/CMakeLists.txt b/boards/arm/kl/teensy-lc/src/CMakeLists.txt
index bb8e9f955f6..420d4977d23 100644
--- a/boards/arm/kl/teensy-lc/src/CMakeLists.txt
+++ b/boards/arm/kl/teensy-lc/src/CMakeLists.txt
@@ -22,10 +22,6 @@
 
 set(SRCS kl_boardinitialize.c)
 
-if(CONFIG_BOARDCTL)
-  list(APPEND SRCS kl_appinit.c)
-endif()
-
 if(CONFIG_KL_SPI0)
   list(APPEND SRCS kl_spi.c)
 else()
diff --git a/boards/arm/kl/teensy-lc/src/Makefile b/boards/arm/kl/teensy-lc/src/Makefile
index 3bb7a3cf82f..7d6db5066a8 100644
--- a/boards/arm/kl/teensy-lc/src/Makefile
+++ b/boards/arm/kl/teensy-lc/src/Makefile
@@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs
 
 CSRCS = kl_boardinitialize.c
 
-ifeq ($(CONFIG_BOARDCTL),y)
-CSRCS += kl_appinit.c
-endif
-
 ifeq ($(CONFIG_KL_SPI0),y)
 CSRCS += kl_spi.c
 else
diff --git a/boards/arm/kl/teensy-lc/src/kl_appinit.c b/boards/arm/kl/teensy-lc/src/kl_appinit.c
deleted file mode 100644
index 479e5229577..00000000000
--- a/boards/arm/kl/teensy-lc/src/kl_appinit.c
+++ /dev/null
@@ -1,86 +0,0 @@
-/****************************************************************************
- * boards/arm/kl/teensy-lc/src/kl_appinit.c
- *
- * SPDX-License-Identifier: Apache-2.0
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <sys/types.h>
-#include <stdio.h>
-#include <syslog.h>
-
-#include <nuttx/board.h>
-
-#include "teensy-lc.h"
-
-#ifdef CONFIG_BOARDCTL
-
-/****************************************************************************
- * 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)
-{
-  int ret;
-
-#ifdef CONFIG_PWM
-  /* Initialize PWM and register the PWM device. */
-
-  ret = kl_pwm_setup();
-  if (ret < 0)
-    {
-      syslog(LOG_ERR, "ERROR: kl_pwm_setup() failed: %d\n", ret);
-    }
-#endif
-
-  UNUSED(ret);
-  return OK;
-}
-
-#endif /* CONFIG_BOARDCTL */
diff --git a/boards/arm/kl/teensy-lc/src/kl_boardinitialize.c b/boards/arm/kl/teensy-lc/src/kl_boardinitialize.c
index 4f8b9810358..172a1dc9fbb 100644
--- a/boards/arm/kl/teensy-lc/src/kl_boardinitialize.c
+++ b/boards/arm/kl/teensy-lc/src/kl_boardinitialize.c
@@ -118,13 +118,18 @@ void kl_boardinitialize(void)
 #ifdef CONFIG_BOARD_LATE_INITIALIZE
 void board_late_initialize(void)
 {
-  /* Perform NSH initialization here instead of from the NSH.
-   * This alternative NSH initialization is necessary when NSH is ran in
-   * user-space but the initialization function must run in kernel space.
-   */
+  int ret;
+
+#ifdef CONFIG_PWM
+  /* Initialize PWM and register the PWM device. */
 
-#if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_BOARDCTL)
-  board_app_initialize(0);
+  ret = kl_pwm_setup();
+  if (ret < 0)
+    {
+      syslog(LOG_ERR, "ERROR: kl_pwm_setup() failed: %d\n", ret);
+    }
 #endif
+
+  UNUSED(ret);
 }
 #endif
diff --git a/boards/arm/lc823450/lc823450-xgevk/src/Makefile b/boards/arm/lc823450/lc823450-xgevk/src/Makefile
index 869a73813e9..d128bf06a5e 100644
--- a/boards/arm/lc823450/lc823450-xgevk/src/Makefile
+++ b/boards/arm/lc823450/lc823450-xgevk/src/Makefile
@@ -22,16 +22,11 @@
 
 include $(TOPDIR)/Make.defs
 
-CSRCS = lc823450_boot.c lc823450_mux.c
+CSRCS = lc823450_boot.c lc823450_mux.c lc823450_bringup.c
 
-ifeq ($(CONFIG_BOARDCTL),y)
-CSRCS += lc823450_appinit.c lc823450_bringup.c
 ifeq ($(CONFIG_BOARDCTL_RESET),y)
 CSRCS += lc823450_reset.c
 endif
-else ifeq ($(CONFIG_BOARD_LATE_INITIALIZE),y)
-CSRCS += lc823450_bringup.c
-endif
 
 ifeq ($(CONFIG_LC823450_SDIF),y)
 CSRCS += lc823450_sdif.c
diff --git a/boards/arm/lc823450/lc823450-xgevk/src/lc823450_appinit.c b/boards/arm/lc823450/lc823450-xgevk/src/lc823450_appinit.c
deleted file mode 100644
index 90836f69010..00000000000
--- a/boards/arm/lc823450/lc823450-xgevk/src/lc823450_appinit.c
+++ /dev/null
@@ -1,179 +0,0 @@
-/****************************************************************************
- * boards/arm/lc823450/lc823450-xgevk/src/lc823450_appinit.c
- *
- * SPDX-License-Identifier: Apache-2.0
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <stdio.h>
-#include <syslog.h>
-
-#include <nuttx/board.h>
-#include <nuttx/i2c/i2c_master.h>
-
-#ifdef CONFIG_MTD
-#  include "lc823450_mtd.h"
-#endif
-
-#include "lc823450_i2c.h"
-#include "lc823450-xgevk.h"
-
-#ifdef CONFIG_BOARDCTL
-
-/****************************************************************************
- * Private Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Name: lc823450_i2c_register
- *
- * Description:
- *   Register one I2C drivers for the I2C tool.
- *
- ****************************************************************************/
-
-#ifdef HAVE_I2CTOOL
-static void lc823450_i2c_register(int bus)
-{
-  struct i2c_master_s *i2c;
-  int ret;
-
-  i2c = lc823450_i2cbus_initialize(bus);
-  if (i2c == NULL)
-    {
-      syslog(LOG_ERR, "ERROR: Failed to get I2C%d interface\n", bus);
-    }
-  else
-    {
-      ret = i2c_register(i2c, bus);
-      if (ret < 0)
-        {
-          syslog(LOG_ERR, "ERROR: Failed to register I2C%d driver: %d\n",
-                 bus, ret);
-          lc823450_i2cbus_uninitialize(i2c);
-        }
-    }
-}
-#endif
-
-/****************************************************************************
- * Name: lc823450_i2ctool
- *
- * Description:
- *   Register I2C drivers for the I2C tool.
- *
- ****************************************************************************/
-
-#ifdef HAVE_I2CTOOL
-static void lc823450_i2ctool(void)
-{
-#ifdef CONFIG_LC823450_I2C0
-  lc823450_i2c_register(0);
-#endif
-#ifdef CONFIG_LC823450_I2C1
-  lc823450_i2c_register(1);
-#endif
-}
-#else
-#  define lc823450_i2ctool()
-#endif
-
-/****************************************************************************
- * 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)
-{
-  int ret;
-
-#ifdef CONFIG_ADC
-  ret = lc823450_adc_setup();
-  if (ret < 0)
-    {
-      syslog(LOG_ERR, "ERROR: lc82450_adc_setup failed: %d\n", ret);
-    }
-#endif
-
-  /* Register I2C drivers on behalf of the I2C tool */
-
-  lc823450_i2ctool();
-
-#ifdef CONFIG_LC823450_MTD
-  /* Initialize eMMC */
-
-  ret = lc823450_mtd_initialize(CONFIG_MTD_DEVNO_EMMC);
-  if (ret != OK)
-    {
-      syslog(LOG_ERR, "Failed to initialize eMMC: ret=%d\n", ret);
-    }
-
-#ifdef CONFIG_LC823450_SDIF_SDC
-  /* Initialize uSD */
-
-  ret = lc823450_mtd_initialize(CONFIG_MTD_DEVNO_SDC);
-  if (ret != OK)
-    {
-      syslog(LOG_ERR, "Failed to initialize uSD: ret=%d\n", ret);
-    }
-#endif /* CONFIG_LC823450_SDIF_SDC */
-
-#endif /* CONFIG_LC823450_MTD */
-
-  UNUSED(ret); /* May not be used */
-
-#ifndef CONFIG_BOARD_LATE_INITIALIZE
-  /* Perform board initialization */
-
-  return lc823450_bringup();
-#else
-  return OK;
-#endif
-}
-
-#endif /* CONFIG_BOARDCTL */
diff --git a/boards/arm/lc823450/lc823450-xgevk/src/lc823450_boot.c b/boards/arm/lc823450/lc823450-xgevk/src/lc823450_boot.c
index 01f39a0773b..b4e06b89e9b 100644
--- a/boards/arm/lc823450/lc823450-xgevk/src/lc823450_boot.c
+++ b/boards/arm/lc823450/lc823450-xgevk/src/lc823450_boot.c
@@ -28,10 +28,77 @@
 
 #include <nuttx/debug.h>
 
+#include <stdio.h>
+#include <syslog.h>
+
 #include <nuttx/board.h>
+#include <nuttx/i2c/i2c_master.h>
+
+#ifdef CONFIG_MTD
+#  include "lc823450_mtd.h"
+#endif
 
+#include "lc823450_i2c.h"
 #include "lc823450-xgevk.h"
 
+/****************************************************************************
+ * Private Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: lc823450_i2c_register
+ *
+ * Description:
+ *   Register one I2C drivers for the I2C tool.
+ *
+ ****************************************************************************/
+
+#ifdef HAVE_I2CTOOL
+static void lc823450_i2c_register(int bus)
+{
+  struct i2c_master_s *i2c;
+  int ret;
+
+  i2c = lc823450_i2cbus_initialize(bus);
+  if (i2c == NULL)
+    {
+      syslog(LOG_ERR, "ERROR: Failed to get I2C%d interface\n", bus);
+    }
+  else
+    {
+      ret = i2c_register(i2c, bus);
+      if (ret < 0)
+        {
+          syslog(LOG_ERR, "ERROR: Failed to register I2C%d driver: %d\n",
+                 bus, ret);
+          lc823450_i2cbus_uninitialize(i2c);
+        }
+    }
+}
+#endif
+
+/****************************************************************************
+ * Name: lc823450_i2ctool
+ *
+ * Description:
+ *   Register I2C drivers for the I2C tool.
+ *
+ ****************************************************************************/
+
+#ifdef HAVE_I2CTOOL
+static void lc823450_i2ctool(void)
+{
+#ifdef CONFIG_LC823450_I2C0
+  lc823450_i2c_register(0);
+#endif
+#ifdef CONFIG_LC823450_I2C1
+  lc823450_i2c_register(1);
+#endif
+}
+#else
+#  define lc823450_i2ctool()
+#endif
+
 /****************************************************************************
  * Public Functions
  ****************************************************************************/
@@ -52,7 +119,42 @@
 #ifdef CONFIG_BOARD_LATE_INITIALIZE
 void board_late_initialize(void)
 {
-  /* Perform board initialization */
+  int ret;
+
+#ifdef CONFIG_ADC
+  ret = lc823450_adc_setup();
+  if (ret < 0)
+    {
+      syslog(LOG_ERR, "ERROR: lc82450_adc_setup failed: %d\n", ret);
+    }
+#endif
+
+  /* Register I2C drivers on behalf of the I2C tool */
+
+  lc823450_i2ctool();
+
+#ifdef CONFIG_LC823450_MTD
+  /* Initialize eMMC */
+
+  ret = lc823450_mtd_initialize(CONFIG_MTD_DEVNO_EMMC);
+  if (ret != OK)
+    {
+      syslog(LOG_ERR, "Failed to initialize eMMC: ret=%d\n", ret);
+    }
+
+#ifdef CONFIG_LC823450_SDIF_SDC
+  /* Initialize uSD */
+
+  ret = lc823450_mtd_initialize(CONFIG_MTD_DEVNO_SDC);
+  if (ret != OK)
+    {
+      syslog(LOG_ERR, "Failed to initialize uSD: ret=%d\n", ret);
+    }
+#endif /* CONFIG_LC823450_SDIF_SDC */
+
+#endif /* CONFIG_LC823450_MTD */
+
+  UNUSED(ret); /* May not be used */
 
   lc823450_bringup();
 }
diff --git a/boards/arm/lpc17xx_40xx/lincoln60/src/CMakeLists.txt b/boards/arm/lpc17xx_40xx/lincoln60/src/CMakeLists.txt
index 1e45c095294..881c35c017a 100644
--- a/boards/arm/lpc17xx_40xx/lincoln60/src/CMakeLists.txt
+++ b/boards/arm/lpc17xx_40xx/lincoln60/src/CMakeLists.txt
@@ -22,10 +22,6 @@
 
 set(SRCS lpc17_40_boot.c lpc17_40_leds.c)
 
-if(CONFIG_BOARDCTL)
-  list(APPEND SRCS lpc17_40_appinit.c)
-endif()
-
 if(CONFIG_USBMSC)
   list(APPEND SRCS lpc17_40_usbmsc.c)
 endif()
diff --git a/boards/arm/lpc17xx_40xx/lincoln60/src/Makefile b/boards/arm/lpc17xx_40xx/lincoln60/src/Makefile
index d507f2d11c0..78cfc32a8bd 100644
--- a/boards/arm/lpc17xx_40xx/lincoln60/src/Makefile
+++ b/boards/arm/lpc17xx_40xx/lincoln60/src/Makefile
@@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs
 
 CSRCS = lpc17_40_boot.c lpc17_40_leds.c
 
-ifeq ($(CONFIG_BOARDCTL),y)
-CSRCS += lpc17_40_appinit.c
-endif
-
 ifeq ($(CONFIG_USBMSC),y)
 CSRCS += lpc17_40_usbmsc.c
 endif
diff --git a/boards/arm/lpc17xx_40xx/lincoln60/src/lpc17_40_appinit.c b/boards/arm/lpc17xx_40xx/lincoln60/src/lpc17_40_appinit.c
deleted file mode 100644
index bffc5f9bdc8..00000000000
--- a/boards/arm/lpc17xx_40xx/lincoln60/src/lpc17_40_appinit.c
+++ /dev/null
@@ -1,67 +0,0 @@
-/****************************************************************************
- * boards/arm/lpc17xx_40xx/lincoln60/src/lpc17_40_appinit.c
- *
- * SPDX-License-Identifier: Apache-2.0
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <stdio.h>
-#include <syslog.h>
-#include <errno.h>
-
-#include <nuttx/board.h>
-#include <nuttx/spi/spi.h>
-#include <nuttx/mmcsd.h>
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Name: board_app_initialize
- *
- * Description:
- *   Perform architecture specific initialization
- *
- * 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)
-{
-  return OK;
-}
diff --git a/boards/arm/lpc17xx_40xx/lincoln60/src/lpc17_40_boot.c b/boards/arm/lpc17xx_40xx/lincoln60/src/lpc17_40_boot.c
index 215dd7a10db..56ac60a0c4f 100644
--- a/boards/arm/lpc17xx_40xx/lincoln60/src/lpc17_40_boot.c
+++ b/boards/arm/lpc17xx_40xx/lincoln60/src/lpc17_40_boot.c
@@ -66,3 +66,22 @@ void lpc17_40_boardinitialize(void)
   board_autoled_initialize();
 #endif
 }
+
+/****************************************************************************
+ * Name: board_late_initialize
+ *
+ * Description:
+ *   If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional
+ *   initialization call will be performed in the boot-up sequence to a
+ *   function called board_late_initialize(). board_late_initialize() will be
+ *   called immediately after up_initialize() is called and just before the
+ *   initial application is started.  This additional initialization phase
+ *   may be used, for example, to initialize board-specific device drivers.
+ *
+ ****************************************************************************/
+
+#ifdef CONFIG_BOARD_LATE_INITIALIZE
+void board_late_initialize(void)
+{
+}
+#endif
diff --git a/boards/arm/lpc17xx_40xx/lpc4088-devkit/src/CMakeLists.txt b/boards/arm/lpc17xx_40xx/lpc4088-devkit/src/CMakeLists.txt
index 3c6f6ef316e..4ae491bf09d 100644
--- a/boards/arm/lpc17xx_40xx/lpc4088-devkit/src/CMakeLists.txt
+++ b/boards/arm/lpc17xx_40xx/lpc4088-devkit/src/CMakeLists.txt
@@ -40,10 +40,6 @@ if(CONFIG_LPC17_40_LCD)
   list(APPEND SRCS lpc17_40_lcd.c)
 endif()
 
-if(CONFIG_BOARDCTL)
-  list(APPEND SRCS lpc17_40_appinit.c)
-endif()
-
 if(CONFIG_ARCH_LEDS)
   list(APPEND SRCS lpc17_40_autoleds.c)
 else()
diff --git a/boards/arm/lpc17xx_40xx/lpc4088-devkit/src/Makefile b/boards/arm/lpc17xx_40xx/lpc4088-devkit/src/Makefile
index 015cea6a2f4..ff9b430d8c0 100644
--- a/boards/arm/lpc17xx_40xx/lpc4088-devkit/src/Makefile
+++ b/boards/arm/lpc17xx_40xx/lpc4088-devkit/src/Makefile
@@ -42,10 +42,6 @@ ifeq ($(CONFIG_LPC17_40_LCD),y)
   CSRCS += lpc17_40_lcd.c
 endif
 
-ifeq ($(CONFIG_BOARDCTL),y)
-  CSRCS += lpc17_40_appinit.c
-endif
-
 ifeq ($(CONFIG_ARCH_LEDS),y)
   CSRCS += lpc17_40_autoleds.c
 else
diff --git a/boards/arm/lpc17xx_40xx/lpc4088-devkit/src/lpc17_40_appinit.c b/boards/arm/lpc17xx_40xx/lpc4088-devkit/src/lpc17_40_appinit.c
deleted file mode 100644
index 2827df7b5b8..00000000000
--- a/boards/arm/lpc17xx_40xx/lpc4088-devkit/src/lpc17_40_appinit.c
+++ /dev/null
@@ -1,78 +0,0 @@
-/****************************************************************************
- * boards/arm/lpc17xx_40xx/lpc4088-devkit/src/lpc17_40_appinit.c
- *
- * SPDX-License-Identifier: Apache-2.0
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <sys/types.h>
-#include <nuttx/board.h>
-
-#include "lpc4088-devkit.h"
-
-/****************************************************************************
- * Pre-processor Definitions
- ****************************************************************************/
-
-/****************************************************************************
- * 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 lpc4088_devkit_bringup();
-#endif
-}
diff --git a/boards/arm/lpc17xx_40xx/lpc4088-quickstart/src/CMakeLists.txt b/boards/arm/lpc17xx_40xx/lpc4088-quickstart/src/CMakeLists.txt
index 36c31734aec..f6c6a3cceb7 100644
--- a/boards/arm/lpc17xx_40xx/lpc4088-quickstart/src/CMakeLists.txt
+++ b/boards/arm/lpc17xx_40xx/lpc4088-quickstart/src/CMakeLists.txt
@@ -37,10 +37,6 @@ if(CONFIG_LPC17_40_EXTNAND)
   list(APPEND SRCS lpc17_40_nandinitialize.c)
 endif()
 
-if(CONFIG_BOARDCTL)
-  list(APPEND SRCS lpc17_40_appinit.c)
-endif()
-
 if(CONFIG_ARCH_LEDS)
   list(APPEND SRCS lpc17_40_autoleds.c)
 else()
diff --git a/boards/arm/lpc17xx_40xx/lpc4088-quickstart/src/Makefile b/boards/arm/lpc17xx_40xx/lpc4088-quickstart/src/Makefile
index 1b04a39fc13..fefc409e4c5 100644
--- a/boards/arm/lpc17xx_40xx/lpc4088-quickstart/src/Makefile
+++ b/boards/arm/lpc17xx_40xx/lpc4088-quickstart/src/Makefile
@@ -39,10 +39,6 @@ ifeq ($(CONFIG_LPC17_40_EXTNAND),y)
   CSRCS += lpc17_40_nandinitialize.c
 endif
 
-ifeq ($(CONFIG_BOARDCTL),y)
-  CSRCS += lpc17_40_appinit.c
-endif
-
 ifeq ($(CONFIG_ARCH_LEDS),y)
   CSRCS += lpc17_40_autoleds.c
 else
diff --git a/boards/arm/lpc17xx_40xx/lpc4088-quickstart/src/lpc17_40_appinit.c b/boards/arm/lpc17xx_40xx/lpc4088-quickstart/src/lpc17_40_appinit.c
deleted file mode 100644
index 44dfdd99b8a..00000000000
--- a/boards/arm/lpc17xx_40xx/lpc4088-quickstart/src/lpc17_40_appinit.c
+++ /dev/null
@@ -1,78 +0,0 @@
-/****************************************************************************
- * boards/arm/lpc17xx_40xx/lpc4088-quickstart/src/lpc17_40_appinit.c
- *
- * SPDX-License-Identifier: Apache-2.0
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <sys/types.h>
-#include <nuttx/board.h>
-
-#include "lpc4088-quickstart.h"
-
-/****************************************************************************
- * Pre-processor Definitions
- ****************************************************************************/
-
-/****************************************************************************
- * 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 lpc4088_quickstart_bringup();
-#endif
-}
diff --git a/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/CMakeLists.txt b/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/CMakeLists.txt
index dcfd52a73b3..710e053aba4 100644
--- a/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/CMakeLists.txt
+++ b/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/CMakeLists.txt
@@ -30,10 +30,6 @@ if(CONFIG_ADC)
   list(APPEND SRCS lpc17_40_adc.c)
 endif()
 
-if(CONFIG_BOARDCTL)
-  list(APPEND SRCS lpc17_40_appinit.c)
-endif()
-
 if(CONFIG_NX_LCDDRIVER)
   list(APPEND SRCS lpc17_40_oled.c)
 endif()
diff --git a/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/Makefile b/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/Makefile
index b0f6346c6ff..8638b93c04c 100644
--- a/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/Makefile
+++ b/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/Makefile
@@ -32,10 +32,6 @@ ifeq ($(CONFIG_ADC),y)
 CSRCS += lpc17_40_adc.c
 endif
 
-ifeq ($(CONFIG_BOARDCTL),y)
-CSRCS += lpc17_40_appinit.c
-endif
-
 ifeq ($(CONFIG_NX_LCDDRIVER),y)
 CSRCS += lpc17_40_oled.c
 endif
diff --git a/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/lpc17_40_appinit.c b/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/lpc17_40_appinit.c
deleted file mode 100644
index d8b5f98836a..00000000000
--- a/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/lpc17_40_appinit.c
+++ /dev/null
@@ -1,174 +0,0 @@
-/****************************************************************************
- * boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/lpc17_40_appinit.c
- *
- * SPDX-License-Identifier: Apache-2.0
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <stdio.h>
-#include <syslog.h>
-#include <errno.h>
-
-#include <nuttx/board.h>
-#include <nuttx/spi/spi.h>
-#include <nuttx/mmcsd.h>
-
-#include "lpc17_40_ssp.h"
-
-/****************************************************************************
- * Pre-processor Definitions
- ****************************************************************************/
-
-/* Configuration ************************************************************/
-
-#ifdef CONFIG_BOARDCTL
-
-/* PORT and SLOT number probably depend on the board configuration */
-
-#define NSH_HAVEUSBDEV 1
-#ifdef CONFIG_LPC17_40_SSP1
-#  define NSH_HAVEMMCSD 1
-#else
-#  undef NSH_HAVEMMCSD
-#endif
-
-/* Do we have SPI support for MMC/SD? */
-
-#ifdef NSH_HAVEMMCSD
-#  undef  CONFIG_NSH_MMCSDSPIPORTNO
-#  define CONFIG_NSH_MMCSDSPIPORTNO 1
-#  undef  CONFIG_NSH_MMCSDSLOTNO
-#  define CONFIG_NSH_MMCSDSLOTNO 0
-#endif
-
-/* Can't support USB device features if USB device is not enabled */
-
-#ifndef CONFIG_USBDEV
-#  undef NSH_HAVEUSBDEV
-#endif
-
-/* Can't support MMC/SD features if mountpoints are disabled */
-
-#if defined(CONFIG_DISABLE_MOUNTPOINT)
-#  undef NSH_HAVEMMCSD
-#endif
-
-#ifndef CONFIG_NSH_MMCSDMINOR
-#  define CONFIG_NSH_MMCSDMINOR 0
-#endif
-
-/* Currnently MMC/SD support is available only for NSH configurations */
-
-#else
-#  undef NSH_HAVEMMCSD
-#endif /* CONFIG_BOARDCTL */
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Name: board_app_initialize
- *
- * Description:
- *   Perform architecture specific initialization
- *
- * 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 NSH_HAVEMMCSD
-  struct spi_dev_s *ssp;
-#endif
-  int ret;
-
-#ifdef NSH_HAVEMMCSD
-  /* Get the SSP port */
-
-  ssp = lpc17_40_sspbus_initialize(CONFIG_NSH_MMCSDSPIPORTNO);
-  if (!ssp)
-    {
-      syslog(LOG_ERR, "ERROR: Failed to initialize SSP port %d\n",
-             CONFIG_NSH_MMCSDSPIPORTNO);
-      return -ENODEV;
-    }
-
-  syslog(LOG_INFO, "Successfully initialized SSP port %d\n",
-         CONFIG_NSH_MMCSDSPIPORTNO);
-
-  /* Bind the SSP port to the slot */
-
-  ret = mmcsd_spislotinitialize(CONFIG_NSH_MMCSDMINOR,
-                                CONFIG_NSH_MMCSDSLOTNO, ssp);
-  if (ret < 0)
-    {
-      syslog(LOG_ERR,
-             "ERROR: Failed to bind SSP port %d to MMC/SD slot %d: %d\n",
-             CONFIG_NSH_MMCSDSPIPORTNO, CONFIG_NSH_MMCSDSLOTNO, ret);
-      return ret;
-    }
-
-  syslog(LOG_INFO,
-         "Successfully bound SSP port %d to MMC/SD slot %d\n",
-         CONFIG_NSH_MMCSDSPIPORTNO, CONFIG_NSH_MMCSDSLOTNO);
-#endif
-
-#ifdef CONFIG_PWM
-  /* Initialize PWM and register the PWM device. */
-
-  ret = lpcexpresso_pwm_setup();
-  if (ret < 0)
-    {
-      syslog(LOG_ERR, "ERROR: lpcexpresso_pwm_setup() failed: %d\n", ret);
-    }
-#endif
-
-#ifdef CONFIG_ADC
-  /* Initialize ADC and register the ADC driver. */
-
-  ret = lpcxpresso_adc_setup();
-  if (ret < 0)
-    {
-      syslog(LOG_ERR, "ERROR: lpcxpresso_adc_setup failed: %d\n", ret);
-    }
-#endif
-
-  UNUSED(ret);
-  return OK;
-}
diff --git a/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/lpc17_40_boot.c b/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/lpc17_40_boot.c
index c775bd0ed21..1f5973eedd6 100644
--- a/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/lpc17_40_boot.c
+++ b/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/lpc17_40_boot.c
@@ -28,7 +28,13 @@
 
 #include <nuttx/debug.h>
 
+#include <stdio.h>
+#include <syslog.h>
+#include <errno.h>
+
 #include <nuttx/board.h>
+#include <nuttx/spi/spi.h>
+#include <nuttx/mmcsd.h>
 #include <arch/board/board.h>
 
 #include "arm_internal.h"
@@ -39,6 +45,50 @@
  * Pre-processor Definitions
  ****************************************************************************/
 
+/* Configuration ************************************************************/
+
+#ifdef CONFIG_BOARDCTL
+
+/* PORT and SLOT number probably depend on the board configuration */
+
+#define NSH_HAVEUSBDEV 1
+#ifdef CONFIG_LPC17_40_SSP1
+#  define NSH_HAVEMMCSD 1
+#else
+#  undef NSH_HAVEMMCSD
+#endif
+
+/* Do we have SPI support for MMC/SD? */
+
+#ifdef NSH_HAVEMMCSD
+#  undef  CONFIG_NSH_MMCSDSPIPORTNO
+#  define CONFIG_NSH_MMCSDSPIPORTNO 1
+#  undef  CONFIG_NSH_MMCSDSLOTNO
+#  define CONFIG_NSH_MMCSDSLOTNO 0
+#endif
+
+/* Can't support USB device features if USB device is not enabled */
+
+#ifndef CONFIG_USBDEV
+#  undef NSH_HAVEUSBDEV
+#endif
+
+/* Can't support MMC/SD features if mountpoints are disabled */
+
+#if defined(CONFIG_DISABLE_MOUNTPOINT)
+#  undef NSH_HAVEMMCSD
+#endif
+
+#ifndef CONFIG_NSH_MMCSDMINOR
+#  define CONFIG_NSH_MMCSDMINOR 0
+#endif
+
+/* Currently MMC/SD support is available only for NSH configurations */
+
+#else
+#  undef NSH_HAVEMMCSD
+#endif /* CONFIG_BOARDCTL */
+
 /****************************************************************************
  * Private Functions
  ****************************************************************************/
@@ -79,3 +129,79 @@ void lpc17_40_boardinitialize(void)
   board_autoled_initialize();
 #endif
 }
+
+/****************************************************************************
+ * Name: board_late_initialize
+ *
+ * Description:
+ *   If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional
+ *   initialization call will be performed in the boot-up sequence to a
+ *   function called board_late_initialize(). board_late_initialize() will be
+ *   called immediately after up_initialize() is called and just before the
+ *   initial application is started.  This additional initialization phase
+ *   may be used, for example, to initialize board-specific device drivers.
+ *
+ ****************************************************************************/
+
+#ifdef CONFIG_BOARD_LATE_INITIALIZE
+void board_late_initialize(void)
+{
+#ifdef NSH_HAVEMMCSD
+  struct spi_dev_s *ssp;
+#endif
+  int ret;
+
+#ifdef NSH_HAVEMMCSD
+  /* Get the SSP port */
+
+  ssp = lpc17_40_sspbus_initialize(CONFIG_NSH_MMCSDSPIPORTNO);
+  if (!ssp)
+    {
+      syslog(LOG_ERR, "ERROR: Failed to initialize SSP port %d\n",
+             CONFIG_NSH_MMCSDSPIPORTNO);
+      return;
+    }
+
+  syslog(LOG_INFO, "Successfully initialized SSP port %d\n",
+         CONFIG_NSH_MMCSDSPIPORTNO);
+
+  /* Bind the SSP port to the slot */
+
+  ret = mmcsd_spislotinitialize(CONFIG_NSH_MMCSDMINOR,
+                                CONFIG_NSH_MMCSDSLOTNO, ssp);
+  if (ret < 0)
+    {
+      syslog(LOG_ERR,
+             "ERROR: Failed to bind SSP port %d to MMC/SD slot %d: %d\n",
+             CONFIG_NSH_MMCSDSPIPORTNO, CONFIG_NSH_MMCSDSLOTNO, ret);
+      return;
+    }
+
+  syslog(LOG_INFO,
+         "Successfully bound SSP port %d to MMC/SD slot %d\n",
+         CONFIG_NSH_MMCSDSPIPORTNO, CONFIG_NSH_MMCSDSLOTNO);
+#endif
+
+#ifdef CONFIG_PWM
+  /* Initialize PWM and register the PWM device. */
+
+  ret = lpcexpresso_pwm_setup();
+  if (ret < 0)
+    {
+      syslog(LOG_ERR, "ERROR: lpcexpresso_pwm_setup() failed: %d\n", ret);
+    }
+#endif
+
+#ifdef CONFIG_ADC
+  /* Initialize ADC and register the ADC driver. */
+
+  ret = lpcxpresso_adc_setup();
+  if (ret < 0)
+    {
+      syslog(LOG_ERR, "ERROR: lpcxpresso_adc_setup failed: %d\n", ret);
+    }
+#endif
+
+  UNUSED(ret);
+}
+#endif
diff --git a/boards/arm/lpc17xx_40xx/lx_cpu/src/Makefile b/boards/arm/lpc17xx_40xx/lx_cpu/src/Makefile
index 6f6e2a5ffc0..54b4103dc78 100644
--- a/boards/arm/lpc17xx_40xx/lx_cpu/src/Makefile
+++ b/boards/arm/lpc17xx_40xx/lx_cpu/src/Makefile
@@ -32,10 +32,6 @@ endif
   CSRCS += lpc17_40_fpgainitialize.c
 endif
 
-ifeq ($(CONFIG_BOARDCTL),y)
-  CSRCS += lpc17_40_appinit.c
-endif
-
 ifeq ($(CONFIG_USBDEV_COMPOSITE),y)
   CSRCS += lpc17_40_composite.c
 endif
diff --git a/boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_appinit.c b/boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_appinit.c
deleted file mode 100644
index c91a1a45e5a..00000000000
--- a/boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_appinit.c
+++ /dev/null
@@ -1,78 +0,0 @@
-/****************************************************************************
- * boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_appinit.c
- *
- * SPDX-License-Identifier: Apache-2.0
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <sys/types.h>
-#include <nuttx/board.h>
-
-#include "lx_cpu.h"
-
-/****************************************************************************
- * Pre-processor Definitions
- ****************************************************************************/
-
-/****************************************************************************
- * 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_initialize() */
-
-  return OK;
-#else
-  /* Perform board-specific initialization */
-
-  return lx_cpu_bringup();
-#endif
-}
diff --git a/boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_boardinitialize.c b/boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_boardinitialize.c
index dd88f96e8d9..cdc88d845b9 100644
--- a/boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_boardinitialize.c
+++ b/boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_boardinitialize.c
@@ -115,3 +115,23 @@ void board_initialize(void)
   lx_cpu_bringup();
 }
 #endif
+
+/****************************************************************************
+ * Name: board_late_initialize
+ *
+ * Description:
+ *   If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional
+ *   initialization call will be performed in the boot-up sequence to a
+ *   function called board_late_initialize(). board_late_initialize() will be
+ *   called immediately after up_initialize() is called and just before the
+ *   initial application is started.  This additional initialization phase
+ *   may be used, for example, to initialize board-specific device drivers.
+ *
+ ****************************************************************************/
+
+#ifdef CONFIG_BOARD_LATE_INITIALIZE
+void board_late_initialize(void)
+{
+  lx_cpu_bringup();
+}
+#endif
diff --git a/boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_nsh.c b/boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_nsh.c
deleted file mode 100644
index f83e9c16c15..00000000000
--- a/boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_nsh.c
+++ /dev/null
@@ -1,388 +0,0 @@
-/****************************************************************************
- * boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_nsh.c
- *
- * SPDX-License-Identifier: Apache-2.0
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <stdio.h>
-#include <unistd.h>
-#include <syslog.h>
-#include <errno.h>
-#include <assert.h>
-
-#include <nuttx/arch.h>
-#include <nuttx/board.h>
-#include <nuttx/sdio.h>
-#include <nuttx/mmcsd.h>
-#include <nuttx/usb/usbhost.h>
-
-#include "lpc17_40_gpio.h"
-#include "lpc17_40_sdcard.h"
-#include "lpc17_40_usbhost.h"
-#include "lx_cpu.h"
-
-/****************************************************************************
- * Pre-processor Definitions
- ****************************************************************************/
-
-/* Configuration ************************************************************/
-
-#define NSH_HAVE_MMCSD      1
-#define NSH_HAVE_USBHOST    1
-#define NSH_HAVE_USBHDEV    1
-
-#undef NSH_HAVE_MMCSD_CD
-#undef NSH_HAVE_MMCSD_CDINT
-
-/* MMC/SD support */
-
-#if !defined(CONFIG_LPC17_40_SDCARD) || !defined(CONFIG_MMCSD) && \
-    !defined(CONFIG_MMCD_SDIO)
-#  undef NSH_HAVE_MMCSD
-#endif
-
-/* Can't support MMC/SD features if mountpoints are disabled */
-
-#if defined(CONFIG_DISABLE_MOUNTPOINT)
-#  undef NSH_HAVE_MMCSD
-#endif
-
-/* MMC/SD support requires that an SPI support is enabled and an SPI port is
- * selected.
- */
-
-#ifdef NSH_HAVE_MMCSD
-#  if !defined(CONFIG_NSH_MMCSDSLOTNO)
-#     warning "Assuming slot MMC/SD slot 0"
-#     define CONFIG_NSH_MMCSDSLOTNO 0
-#  endif
-#endif
-
-#ifdef NSH_HAVE_MMCSD
-#  if !defined(CONFIG_NSH_MMCSDMINOR)
-#     warning "Assuming /dev/mmcsd0"
-#     define CONFIG_NSH_MMCSDMINOR 0
-#  endif
-#endif
-
-/* The SD card detect (CD) signal is on P0[13].  This signal is shared.  It
- * is also used for MOSI1 and USB_UP_LED.  The CD pin may be disconnected.
- * There is a jumper on board that enables the CD pin.
- */
-
-#ifdef NSH_HAVE_MMCSD
-#  ifdef CONFIG_MMCSD_HAVECARDDETECT
-#    define NSH_HAVE_MMCSD_CD 1
-#    ifdef CONFIG_GPIO_IRQ
-#      define NSH_HAVE_MMCSD_CDINT 1
-#    endif
-#  endif
-#endif
-
-#if defined(NSH_HAVE_MMCSD_CD) && \
-    (defined(CONFIG_LPC17_40_SSP1) || defined(CONFIG_LPC17_40_USBDEV))
-#  warning "Use of SD Card Detect pin conflicts with SSP1 and/or USB device"
-#endif
-
-/* USB Host */
-
-#ifndef CONFIG_USBHOST
-#  undef NSH_HAVE_USBHOST
-#endif
-
-#ifndef CONFIG_LPC17_40_USBHOST
-#  undef NSH_HAVE_USBHOST
-#endif
-
-#ifdef NSH_HAVE_USBHOST
-#  ifndef CONFIG_USBHOST_DEFPRIO
-#    define CONFIG_USBHOST_DEFPRIO 50
-#  endif
-#  ifndef CONFIG_USBHOST_STACKSIZE
-#    ifdef CONFIG_USBHOST_HUB
-#      define CONFIG_USBHOST_STACKSIZE 1536
-#    else
-#      define CONFIG_USBHOST_STACKSIZE 1024
-#    endif
-#  endif
-#endif
-
-/* USB Device */
-
-#ifndef CONFIG_USBDEV
-#  undef NSH_HAVE_USBDEV
-#endif
-
-#ifndef CONFIG_LPC17_40_USBDEV
-#  undef NSH_HAVE_USBDEV
-#endif
-
-/****************************************************************************
- * Private Data
- ****************************************************************************/
-
-#ifdef NSH_HAVE_USBHOST
-static struct usbhost_connection_s *g_usbconn;
-#endif
-#ifdef NSH_HAVE_MMCSD
-static struct sdio_dev_s *g_sdiodev;
-#endif
-#ifdef NSH_HAVE_MMCSD_CD
-static bool g_sd_inserted;
-#endif
-
-/****************************************************************************
- * Private Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Name: nsh_waiter
- *
- * Description:
- *   Wait for USB devices to be connected.
- *
- ****************************************************************************/
-
-#ifdef NSH_HAVE_USBHOST
-static int nsh_waiter(int argc, char *argv[])
-{
-  struct usbhost_hubport_s *hport;
-
-  syslog(LOG_INFO, "nsh_waiter: Running\n");
-  for (; ; )
-    {
-      /* Wait for the device to change state */
-
-      DEBUGVERIFY(CONN_WAIT(g_usbconn, &hport));
-      syslog(LOG_INFO, "nsh_waiter: %s\n",
-             hport->connected ? "connected" : "disconnected");
-
-      /* Did we just become connected? */
-
-      if (hport->connected)
-        {
-          /* Yes.. enumerate the newly connected device */
-
-          CONN_ENUMERATE(g_usbconn, hport);
-        }
-    }
-
-  /* Keep the compiler from complaining */
-
-  return 0;
-}
-#endif
-
-/****************************************************************************
- * Name: nsh_cdinterrupt
- *
- * Description:
- *   Card detect interrupt handler.
- *
- ****************************************************************************/
-
-#ifdef NSH_HAVE_MMCSD_CDINT
-static int nsh_cdinterrupt(int irq, void *context)
-{
-  bool present;
-
-  present = !lpc17_40_gpioread(GPIO_SD_CD);
-  if (present != g_sd_inserted)
-    {
-      sdio_mediachange(g_sdiodev, present);
-      g_sd_inserted = present;
-    }
-
-  return OK;
-}
-#endif
-
-/****************************************************************************
- * Name: nsh_sdinitialize
- *
- * Description:
- *   Initialize SPI-based microSD.
- *
- ****************************************************************************/
-
-#ifdef NSH_HAVE_MMCSD
-static int nsh_sdinitialize(void)
-{
-  int ret;
-
-#ifdef NSH_HAVE_MMCSD_CD
-  /* Configure the SD card detect GPIO */
-
-  lpc17_40_configgpio(GPIO_SD_CD);
-
-#if NSH_HAVE_MMCSD_CDINT
-  /* Attach an interrupt handler to get notifications when a card is
-   * inserted or deleted.
-   */
-
-  irq_attach(LPC17_40_IRQ_P0p13, nsh_cdinterrupt);
-  up_enable_irq(LPC17_40_IRQ_P0p13);
-#endif
-#endif
-
-  /* First, get an instance of the SDIO interface */
-
-  g_sdiodev = sdio_initialize(CONFIG_NSH_MMCSDSLOTNO);
-  if (!g_sdiodev)
-    {
-      syslog(LOG_ERR, "ERROR: Failed to initialize SDIO slot %d\n",
-             CONFIG_NSH_MMCSDSLOTNO);
-      return -ENODEV;
-    }
-
-  /* Now bind the SDIO interface to the MMC/SD driver */
-
-  ret = mmcsd_slotinitialize(CONFIG_NSH_MMCSDMINOR, g_sdiodev);
-  if (ret != OK)
-    {
-      syslog(LOG_ERR,
-             "ERROR: Failed to bind SDIO to the MMC/SD driver: %d\n",
-             ret);
-      return ret;
-    }
-
-  /* Check if there is a card in the slot and inform the SDCARD driver.  If
-   * we do not support the card  detect, then let's assume that there is
-   * one.
-   */
-
-#ifdef NSH_HAVE_MMCSD_CD
-  g_sd_inserted = !lpc17_40_gpioread(GPIO_SD_CD);
-  sdio_mediachange(g_sdiodev, g_sd_inserted);
-#else
-  sdio_mediachange(g_sdiodev, true);
-#endif
-  return OK;
-}
-#else
-#  define nsh_sdinitialize() (OK)
-#endif
-
-/****************************************************************************
- * Name: nsh_usbhostinitialize
- *
- * Description:
- *   Initialize SPI-based microSD.
- *
- ****************************************************************************/
-
-#ifdef NSH_HAVE_USBHOST
-static int nsh_usbhostinitialize(void)
-{
-  int pid;
-  int ret;
-
-  /* First, register all of the class drivers needed to support the drivers
-   * that we care about:
-   */
-
-  syslog(LOG_INFO, "Register class drivers\n");
-
-#ifdef CONFIG_USBHOST_MSC
-  /* Register the USB host Mass Storage Class */
-
-  ret = usbhost_msc_initialize();
-  if (ret != OK)
-    {
-      syslog(LOG_ERR,
-             "ERROR: Failed to register the mass storage class: %d\n",
-             ret);
-    }
-#endif
-
-#ifdef CONFIG_USBHOST_CDCACM
-  /* Register the CDC/ACM serial class */
-
-  ret = usbhost_cdcacm_initialize();
-  if (ret != OK)
-    {
-      syslog(LOG_ERR,
-             "ERROR: Failed to register the CDC/ACM serial class: %d\n",
-             ret);
-    }
-#endif
-
-  /* Then get an instance of the USB host interface */
-
-  syslog(LOG_INFO, "Initialize USB host\n");
-  g_usbconn = lpc17_40_usbhost_initialize(0);
-  if (g_usbconn)
-    {
-      /* Start a thread to handle device connection. */
-
-      syslog(LOG_INFO, "Start nsh_waiter\n");
-
-      pid = task_create("usbhost", CONFIG_USBHOST_DEFPRIO,
-                        CONFIG_USBHOST_STACKSIZE,
-                        nsh_waiter, NULL);
-      return pid < 0 ? -ENOEXEC : OK;
-    }
-
-  return -ENODEV;
-}
-#else
-#  define nsh_usbhostinitialize() (OK)
-#endif
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Name: board_app_initialize
- *
- * Description:
- *   Perform architecture specific initialization for NSH.
- *
- *   CONFIG_NSH_ARCHINIT=y :
- *     Called from the NSH library
- *
- *   CONFIG_BOARD_INITIALIZE=y, CONFIG_NSH_LIBRARY=y, &&
- *   CONFIG_NSH_ARCHINIT=n:
- *     Called from board_initialize().
- *
- ****************************************************************************/
-
-int board_app_initialize(void)
-{
-  int ret;
-
-  /* Initialize SPI-based microSD */
-
-  ret = nsh_sdinitialize();
-  if (ret == OK)
-    {
-      /* Initialize USB host */
-
-      ret = nsh_usbhostinitialize();
-    }
-
-  return ret;
-}
diff --git a/boards/arm/lpc17xx_40xx/mbed/src/CMakeLists.txt b/boards/arm/lpc17xx_40xx/mbed/src/CMakeLists.txt
index d32be9271e3..89574233433 100644
--- a/boards/arm/lpc17xx_40xx/mbed/src/CMakeLists.txt
+++ b/boards/arm/lpc17xx_40xx/mbed/src/CMakeLists.txt
@@ -26,10 +26,6 @@ if(CONFIG_ARCH_LEDS)
   list(APPEND SRCS lpc17_40_leds.c)
 endif()
 
-if(CONFIG_BOARDCTL)
-  list(APPEND SRCS lpc17_40_appinit.c)
-endif()
-
 if(CONFIG_USBMSC)
   list(APPEND SRCS lpc17_40_usbmsc.c)
 endif()
diff --git a/boards/arm/lpc17xx_40xx/mbed/src/Makefile b/boards/arm/lpc17xx_40xx/mbed/src/Makefile
index 22cb375f766..0e7ec37a34f 100644
--- a/boards/arm/lpc17xx_40xx/mbed/src/Makefile
+++ b/boards/arm/lpc17xx_40xx/mbed/src/Makefile
@@ -28,10 +28,6 @@ ifeq ($(CONFIG_ARCH_LEDS),y)
 CSRCS += lpc17_40_leds.c
 endif
 
-ifeq ($(CONFIG_BOARDCTL),y)
-CSRCS += lpc17_40_appinit.c
-endif
-
 ifeq ($(CONFIG_USBMSC),y)
 CSRCS += lpc17_40_usbmsc.c
 endif
diff --git a/boards/arm/lpc17xx_40xx/mbed/src/lpc17_40_appinit.c b/boards/arm/lpc17xx_40xx/mbed/src/lpc17_40_appinit.c
deleted file mode 100644
index 06eecc94e8c..00000000000
--- a/boards/arm/lpc17xx_40xx/mbed/src/lpc17_40_appinit.c
+++ /dev/null
@@ -1,127 +0,0 @@
-/****************************************************************************
- * boards/arm/lpc17xx_40xx/mbed/src/lpc17_40_appinit.c
- *
- * SPDX-License-Identifier: Apache-2.0
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <stdio.h>
-#include <syslog.h>
-#include <errno.h>
-
-#include <nuttx/board.h>
-#include <nuttx/spi/spi.h>
-#include <nuttx/mmcsd.h>
-
-#include "mbed.h"
-
-#ifdef CONFIG_USERLED
-#include <nuttx/leds/userled.h>
-#endif
-
-/****************************************************************************
- * Pre-processor Definitions
- ****************************************************************************/
-
-/* Configuration ************************************************************/
-
-/* PORT and SLOT number probably depend on the board configuration */
-
-#ifdef CONFIG_ARCH_BOARD_MBED
-#  define NSH_HAVEUSBDEV 1
-#else
-#  error "Unrecognized board"
-#  undef NSH_HAVEUSBDEV
-#endif
-
-/* Can't support USB features if USB is not enabled */
-
-#ifndef CONFIG_USBDEV
-#  undef NSH_HAVEUSBDEV
-#endif
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Name: board_app_initialize
- *
- * Description:
- *   Perform architecture specific initialization
- *
- * 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)
-{
-  int ret;
-
-#ifdef CONFIG_PWM
-  /* Initialize PWM and register the PWM device. */
-
-  ret = mbed_pwm_setup();
-  if (ret < 0)
-    {
-      syslog(LOG_ERR, "ERROR: mbed_pwm_setup() failed: %d\n", ret);
-    }
-#endif
-
-#ifdef CONFIG_ADC
-  /* Initialize ADC and register the ADC driver. */
-
-  ret = mbed_adc_setup();
-  if (ret < 0)
-    {
-      syslog(LOG_ERR, "ERROR: mbed_adc_setup failed: %d\n", ret);
-    }
-#endif
-
-#ifdef CONFIG_USERLED
-  /* Register the LED driver */
-
-  ret = userled_lower_initialize("/dev/userleds");
-  if (ret < 0)
-    {
-      syslog(LOG_ERR, "ERROR: userled_lower_initialize() failed: %d\n", ret);
-    }
-#endif
-
-  UNUSED(ret);
-  return OK;
-}
diff --git a/boards/arm/lpc17xx_40xx/mbed/src/lpc17_40_boot.c b/boards/arm/lpc17xx_40xx/mbed/src/lpc17_40_boot.c
index 98aa74fd9a2..b7074ab0848 100644
--- a/boards/arm/lpc17xx_40xx/mbed/src/lpc17_40_boot.c
+++ b/boards/arm/lpc17xx_40xx/mbed/src/lpc17_40_boot.c
@@ -28,16 +28,44 @@
 
 #include <nuttx/debug.h>
 
+#include <stdio.h>
+#include <syslog.h>
+#include <errno.h>
+
 #include <nuttx/board.h>
+#include <nuttx/spi/spi.h>
+#include <nuttx/mmcsd.h>
 #include <arch/board/board.h>
 
 #include "arm_internal.h"
 #include "mbed.h"
 
+#ifdef CONFIG_USERLED
+#include <nuttx/leds/userled.h>
+#endif
+
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
 
+/* Configuration ************************************************************/
+
+/* PORT and SLOT number probably depend on the board configuration */
+
+#ifdef CONFIG_ARCH_BOARD_MBED
+#  define NSH_HAVEUSBDEV 1
+#else
+#  error "Unrecognized board"
+#  undef NSH_HAVEUSBDEV
+#endif
+
+/* Can't support USB features if USB is not enabled */
+
+#ifndef CONFIG_USBDEV
+#  undef NSH_HAVEUSBDEV
+#endif
+
+
 /****************************************************************************
  * Private Functions
  ****************************************************************************/
@@ -66,3 +94,55 @@ void lpc17_40_boardinitialize(void)
   board_autoled_initialize();
 #endif
 }
+
+/****************************************************************************
+ * Name: board_late_initialize
+ *
+ * Description:
+ *   If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional
+ *   initialization call will be performed in the boot-up sequence to a
+ *   function called board_late_initialize(). board_late_initialize() will be
+ *   called immediately after up_initialize() is called and just before the
+ *   initial application is started.  This additional initialization phase
+ *   may be used, for example, to initialize board-specific device drivers.
+ *
+ ****************************************************************************/
+
+#ifdef CONFIG_BOARD_LATE_INITIALIZE
+void board_late_initialize(void)
+{
+  int ret;
+
+#ifdef CONFIG_PWM
+  /* Initialize PWM and register the PWM device. */
+
+  ret = mbed_pwm_setup();
+  if (ret < 0)
+    {
+      syslog(LOG_ERR, "ERROR: mbed_pwm_setup() failed: %d\n", ret);
+    }
+#endif
+
+#ifdef CONFIG_ADC
+  /* Initialize ADC and register the ADC driver. */
+
+  ret = mbed_adc_setup();
+  if (ret < 0)
+    {
+      syslog(LOG_ERR, "ERROR: mbed_adc_setup failed: %d\n", ret);
+    }
+#endif
+
+#ifdef CONFIG_USERLED
+  /* Register the LED driver */
+
+  ret = userled_lower_initialize("/dev/userleds");
+  if (ret < 0)
+    {
+      syslog(LOG_ERR, "ERROR: userled_lower_initialize() failed: %d\n", ret);
+    }
+#endif
+
+  UNUSED(ret);
+}
+#endif
diff --git a/boards/arm/lpc17xx_40xx/mcb1700/src/CMakeLists.txt b/boards/arm/lpc17xx_40xx/mcb1700/src/CMakeLists.txt
index ccfa428c733..d4dd844c66c 100644
--- a/boards/arm/lpc17xx_40xx/mcb1700/src/CMakeLists.txt
+++ b/boards/arm/lpc17xx_40xx/mcb1700/src/CMakeLists.txt
@@ -22,10 +22,6 @@
 
 set(SRCS lpc17_40_boot.c lpc17_40_bringup.c lpc17_40_leds.c lpc17_40_dac.c)
 
-if(CONFIG_BOARDCTL)
-  list(APPEND SRCS lpc17_40_appinit.c)
-endif()
-
 if(CONFIG_USBMSC)
   list(APPEND SRCS lpc17_40_usbmsc.c)
 endif()
diff --git a/boards/arm/lpc17xx_40xx/mcb1700/src/Makefile b/boards/arm/lpc17xx_40xx/mcb1700/src/Makefile
index 04312418a60..85583268c6a 100644
--- a/boards/arm/lpc17xx_40xx/mcb1700/src/Makefile
+++ b/boards/arm/lpc17xx_40xx/mcb1700/src/Makefile
@@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs
 
 CSRCS = lpc17_40_boot.c lpc17_40_bringup.c lpc17_40_leds.c lpc17_40_dac.c
 
-ifeq ($(CONFIG_BOARDCTL),y)
-CSRCS += lpc17_40_appinit.c
-endif
-
 ifeq ($(CONFIG_USBMSC),y)
 CSRCS += lpc17_40_usbmsc.c
 endif
diff --git a/boards/arm/lpc17xx_40xx/mcb1700/src/lpc17_40_appinit.c b/boards/arm/lpc17xx_40xx/mcb1700/src/lpc17_40_appinit.c
deleted file mode 100644
index b8c19bcc50a..00000000000
--- a/boards/arm/lpc17xx_40xx/mcb1700/src/lpc17_40_appinit.c
+++ /dev/null
@@ -1,78 +0,0 @@
-/****************************************************************************
- * boards/arm/lpc17xx_40xx/mcb1700/src/lpc17_40_appinit.c
- *
- * SPDX-License-Identifier: Apache-2.0
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <sys/types.h>
-#include <nuttx/board.h>
-
-#include "mcb1700.h"
-
-/****************************************************************************
- * Pre-processor Definitions
- ****************************************************************************/
-
-/****************************************************************************
- * 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 mcb1700_bringup();
-#endif
-}
diff --git a/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/src/CMakeLists.txt b/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/src/CMakeLists.txt
index b77dca2ee41..2423e245549 100644
--- a/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/src/CMakeLists.txt
+++ b/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/src/CMakeLists.txt
@@ -22,10 +22,6 @@
 
 set(SRCS lpc17_40_boot.c lpc17_40_bringup.c lpc17_40_leds.c lpc17_40_ssp.c)
 
-if(CONFIG_BOARDCTL)
-  list(APPEND SRCS lpc17_40_appinit.c)
-endif()
-
 if(CONFIG_USBMSC)
   list(APPEND SRCS lpc17_40_usbmsc.c)
 endif()
diff --git a/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/src/Makefile b/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/src/Makefile
index 14bf6c3d17d..ff0bc295509 100644
--- a/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/src/Makefile
+++ b/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/src/Makefile
@@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs
 
 CSRCS = lpc17_40_boot.c lpc17_40_bringup.c lpc17_40_leds.c lpc17_40_ssp.c
 
-ifeq ($(CONFIG_BOARDCTL),y)
-CSRCS += lpc17_40_appinit.c
-endif
-
 ifeq ($(CONFIG_USBMSC),y)
 CSRCS += lpc17_40_usbmsc.c
 endif
diff --git a/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/src/lpc17_40_appinit.c b/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/src/lpc17_40_appinit.c
deleted file mode 100644
index b3b178c4ac5..00000000000
--- a/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/src/lpc17_40_appinit.c
+++ /dev/null
@@ -1,85 +0,0 @@
-/****************************************************************************
- * boards/arm/lpc17xx_40xx/olimex-lpc1766stk/src/lpc17_40_appinit.c
- *
- * SPDX-License-Identifier: Apache-2.0
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <sys/types.h>
-#include <stdint.h>
-
-#include <nuttx/board.h>
-
-#include "lpc1766stk.h"
-
-#ifdef CONFIG_BOARDCTL
-
-/****************************************************************************
- * 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.
- *
- *   CONFIG_BOARDCTL=y :
- *     Called from the NSH library
- *
- *   CONFIG_BOARD_LATE_INITIALIZE=y, CONFIG_NSH_LIBRARY=y, &&
- *   CONFIG_BOARDCTL=n :
- *     Called from board_late_initialize().
- *
- * 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)
-{
-  /* Did we already initialize via board_late_initialize()? */
-
-#ifndef CONFIG_BOARD_LATE_INITIALIZE
-  return lpc17_40_bringup();
-#else
-  return OK;
-#endif
-}
-
-#endif /* CONFIG_BOARDCTL */
diff --git a/boards/arm/lpc17xx_40xx/open1788/src/CMakeLists.txt b/boards/arm/lpc17xx_40xx/open1788/src/CMakeLists.txt
index 609dfeb6cf6..ecd0d01e59c 100644
--- a/boards/arm/lpc17xx_40xx/open1788/src/CMakeLists.txt
+++ b/boards/arm/lpc17xx_40xx/open1788/src/CMakeLists.txt
@@ -40,10 +40,6 @@ if(CONFIG_LPC17_40_LCD)
   list(APPEND SRCS lpc17_40_lcd.c)
 endif()
 
-if(CONFIG_BOARDCTL)
-  list(APPEND SRCS lpc17_40_appinit.c)
-endif()
-
 if(CONFIG_ARCH_LEDS)
   list(APPEND SRCS lpc17_40_autoleds.c)
 else()
diff --git a/boards/arm/lpc17xx_40xx/open1788/src/Makefile b/boards/arm/lpc17xx_40xx/open1788/src/Makefile
index 45daf9e4d92..4c42d5b6e44 100644
--- a/boards/arm/lpc17xx_40xx/open1788/src/Makefile
+++ b/boards/arm/lpc17xx_40xx/open1788/src/Makefile
@@ -42,10 +42,6 @@ ifeq ($(CONFIG_LPC17_40_LCD),y)
   CSRCS += lpc17_40_lcd.c
 endif
 
-ifeq ($(CONFIG_BOARDCTL),y)
-  CSRCS += lpc17_40_appinit.c
-endif
-
 ifeq ($(CONFIG_ARCH_LEDS),y)
   CSRCS += lpc17_40_autoleds.c
 else
diff --git a/boards/arm/lpc17xx_40xx/open1788/src/lpc17_40_appinit.c b/boards/arm/lpc17xx_40xx/open1788/src/lpc17_40_appinit.c
deleted file mode 100644
index 50141c433a1..00000000000
--- a/boards/arm/lpc17xx_40xx/open1788/src/lpc17_40_appinit.c
+++ /dev/null
@@ -1,78 +0,0 @@
-/****************************************************************************
- * boards/arm/lpc17xx_40xx/open1788/src/lpc17_40_appinit.c
- *
- * SPDX-License-Identifier: Apache-2.0
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <sys/types.h>
-#include <nuttx/board.h>
-
-#include "open1788.h"
-
-/****************************************************************************
- * Pre-processor Definitions
- ****************************************************************************/
-
-/****************************************************************************
- * 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 open1788_bringup();
-#endif
-}
diff --git a/boards/arm/lpc17xx_40xx/pnev5180b/src/CMakeLists.txt b/boards/arm/lpc17xx_40xx/pnev5180b/src/CMakeLists.txt
index 70090743111..a0bd10d993b 100644
--- a/boards/arm/lpc17xx_40xx/pnev5180b/src/CMakeLists.txt
+++ b/boards/arm/lpc17xx_40xx/pnev5180b/src/CMakeLists.txt
@@ -26,10 +26,6 @@ if(CONFIG_ARCH_LEDS)
   list(APPEND SRCS lpc17_40_leds.c)
 endif()
 
-if(CONFIG_BOARDCTL)
-  list(APPEND SRCS lpc17_40_appinit.c)
-endif()
-
 if(CONFIG_USBDEV_COMPOSITE)
   list(APPEND SRCS lpc17_40_composite.c)
 endif()
diff --git a/boards/arm/lpc17xx_40xx/pnev5180b/src/Makefile b/boards/arm/lpc17xx_40xx/pnev5180b/src/Makefile
index 35d429e1ecc..5895ab82843 100644
--- a/boards/arm/lpc17xx_40xx/pnev5180b/src/Makefile
+++ b/boards/arm/lpc17xx_40xx/pnev5180b/src/Makefile
@@ -28,10 +28,6 @@ ifeq ($(CONFIG_ARCH_LEDS),y)
 CSRCS += lpc17_40_leds.c
 endif
 
-ifeq ($(CONFIG_BOARDCTL),y)
-CSRCS += lpc17_40_appinit.c
-endif
-
 ifeq ($(CONFIG_USBDEV_COMPOSITE),y)
 CSRCS += lpc17_40_composite.c
 endif
diff --git a/boards/arm/lpc17xx_40xx/pnev5180b/src/lpc17_40_appinit.c b/boards/arm/lpc17xx_40xx/pnev5180b/src/lpc17_40_appinit.c
deleted file mode 100644
index 474cd4fc628..00000000000
--- a/boards/arm/lpc17xx_40xx/pnev5180b/src/lpc17_40_appinit.c
+++ /dev/null
@@ -1,78 +0,0 @@
-/****************************************************************************
- * boards/arm/lpc17xx_40xx/pnev5180b/src/lpc17_40_appinit.c
- *
- * SPDX-License-Identifier: Apache-2.0
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <sys/types.h>
-#include <nuttx/board.h>
-
-#include "pnev5180b.h"
-
-/****************************************************************************
- * Pre-processor Definitions
- ****************************************************************************/
-
-/****************************************************************************
- * 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 pnev5180b_bringup();
-#endif
-}
diff --git a/boards/arm/lpc17xx_40xx/u-blox-c027/src/CMakeLists.txt b/boards/arm/lpc17xx_40xx/u-blox-c027/src/CMakeLists.txt
index f9c98b843e9..5aa5c7476d2 100644
--- a/boards/arm/lpc17xx_40xx/u-blox-c027/src/CMakeLists.txt
+++ b/boards/arm/lpc17xx_40xx/u-blox-c027/src/CMakeLists.txt
@@ -22,10 +22,6 @@
 
 set(SRCS lpc17_40_boot.c lpc17_40_leds.c lpc17_40_ssp.c lpc17_40_dac.c)
 
-if(CONFIG_BOARDCTL)
-  list(APPEND SRCS lpc17_40_appinit.c)
-endif()
-
 if(CONFIG_PWM)
   list(APPEND SRCS lpc17_40_pwm.c)
 endif()
diff --git a/boards/arm/lpc17xx_40xx/u-blox-c027/src/Makefile b/boards/arm/lpc17xx_40xx/u-blox-c027/src/Makefile
index 7c5f80d84cf..09296c1af4e 100644
--- a/boards/arm/lpc17xx_40xx/u-blox-c027/src/Makefile
+++ b/boards/arm/lpc17xx_40xx/u-blox-c027/src/Makefile
@@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs
 
 CSRCS = lpc17_40_boot.c lpc17_40_leds.c lpc17_40_ssp.c lpc17_40_dac.c
 
-ifeq ($(CONFIG_BOARDCTL),y)
-CSRCS += lpc17_40_appinit.c
-endif
-
 ifeq ($(CONFIG_PWM),y)
 CSRCS += lpc17_40_pwm.c
 endif
diff --git a/boards/arm/lpc17xx_40xx/u-blox-c027/src/lpc17_40_appinit.c b/boards/arm/lpc17xx_40xx/u-blox-c027/src/lpc17_40_appinit.c
deleted file mode 100644
index 473b44f5fd9..00000000000
--- a/boards/arm/lpc17xx_40xx/u-blox-c027/src/lpc17_40_appinit.c
+++ /dev/null
@@ -1,196 +0,0 @@
-/****************************************************************************
- * boards/arm/lpc17xx_40xx/u-blox-c027/src/lpc17_40_appinit.c
- *
- * SPDX-License-Identifier: Apache-2.0
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <stdio.h>
-#include <syslog.h>
-#include <errno.h>
-
-#include <nuttx/board.h>
-#include <nuttx/fs/fs.h>
-#include <nuttx/spi/spi.h>
-#include <nuttx/mmcsd.h>
-
-#include "lpc17_40_ssp.h"
-
-/****************************************************************************
- * Pre-processor Definitions
- ****************************************************************************/
-
-/* Configuration ************************************************************/
-
-#ifdef CONFIG_BOARDCTL
-
-/* PORT and SLOT number probably depend on the board configuration */
-
-#ifdef CONFIG_ARCH_BOARD_U_BLOX_C027
-#  define NSH_HAVEUSBDEV 1
-#  ifdef CONFIG_LPC17_40_SSP0
-#    define NSH_HAVEMMCSD 1
-#  else
-#    undef NSH_HAVEMMCSD
-#  endif
-#else
-#  error "Unrecognized board"
-#  undef NSH_HAVEUSBDEV
-#  undef NSH_HAVEMMCSD
-#endif
-
-/* Do we have SPI support for MMC/SD? */
-
-#ifdef NSH_HAVEMMCSD
-#    undef  CONFIG_NSH_MMCSDSPIPORTNO
-#    define CONFIG_NSH_MMCSDSPIPORTNO 0
-#    undef  CONFIG_NSH_MMCSDSLOTNO
-#    define CONFIG_NSH_MMCSDSLOTNO 0
-#endif
-
-/* Can't support USB device features if USB device is not enabled */
-
-#ifndef CONFIG_USBDEV
-#  undef NSH_HAVEUSBDEV
-#endif
-
-/* Can't support MMC/SD features if mountpoints are disabled */
-
-#if defined(CONFIG_DISABLE_MOUNTPOINT)
-#  undef NSH_HAVEMMCSD
-#endif
-
-#ifndef CONFIG_NSH_MMCSDMINOR
-#  define CONFIG_NSH_MMCSDMINOR 0
-#endif
-
-/* Currnently MMC/SD support is available only for NSH configurations */
-
-#else
-#  undef NSH_HAVEMMCSD
-#endif /* CONFIG_BOARDCTL */
-
-/****************************************************************************
- * 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)
-{
-  int ret;
-
-#ifdef CONFIG_FS_PROCFS
-  /* mount the proc filesystem */
-
-  syslog(LOG_INFO, "Mounting procfs to /proc\n");
-
-  ret = nx_mount(NULL, "/proc", "procfs", 0, NULL);
-  if (ret < 0)
-    {
-      syslog(LOG_ERR,
-             "ERROR: Failed to mount the PROC filesystem: %d\n", ret);
-      return ret;
-    }
-#endif
-
-#ifdef NSH_HAVEMMCSD
-  struct spi_dev_s *ssp;
-
-  /* Get the SSP port */
-
-  ssp = lpc17_40_sspbus_initialize(CONFIG_NSH_MMCSDSPIPORTNO);
-  if (!ssp)
-    {
-      syslog(LOG_ERR, "ERROR: Failed to initialize SSP port %d\n",
-             CONFIG_NSH_MMCSDSPIPORTNO);
-      return -ENODEV;
-    }
-
-  syslog(LOG_INFO, "Successfully initialized SSP port %d\n",
-         CONFIG_NSH_MMCSDSPIPORTNO);
-
-  /* Bind the SSP port to the slot */
-
-  ret = mmcsd_spislotinitialize(CONFIG_NSH_MMCSDMINOR,
-                                CONFIG_NSH_MMCSDSLOTNO, ssp);
-  if (ret < 0)
-    {
-      syslog(LOG_ERR,
-             "ERROR: Failed to bind SSP port %d to MMC/SD slot %d: %d\n",
-             CONFIG_NSH_MMCSDSPIPORTNO, CONFIG_NSH_MMCSDSLOTNO, ret);
-      return ret;
-    }
-
-  syslog(LOG_INFO, "Successfully bound SSP port %d to MMC/SD slot %d\n",
-         CONFIG_NSH_MMCSDSPIPORTNO, CONFIG_NSH_MMCSDSLOTNO);
-#endif
-
-#ifdef CONFIG_PWM
-  /* Initialize PWM and register the PWM device. */
-
-  ret = lpc17_40_pwm_setup();
-  if (ret < 0)
-    {
-      syslog(LOG_ERR, "ERROR: lpc17_40_pwm_setup() failed: %d\n", ret);
-      return ret;
-    }
-#endif
-
-#ifdef CONFIG_ADC
-  /* Initialize ADC and register the ADC driver. */
-
-  ret = lpc17_40_adc_setup();
-  if (ret < 0)
-    {
-      syslog(LOG_ERR, "ERROR: lpc17_40_adc_setup failed: %d\n", ret);
-    }
-#endif
-
-  UNUSED(ret);
-  return OK;
-}
diff --git a/boards/arm/lpc17xx_40xx/u-blox-c027/src/lpc17_40_boot.c b/boards/arm/lpc17xx_40xx/u-blox-c027/src/lpc17_40_boot.c
index e038c380bea..885aeb94c92 100644
--- a/boards/arm/lpc17xx_40xx/u-blox-c027/src/lpc17_40_boot.c
+++ b/boards/arm/lpc17xx_40xx/u-blox-c027/src/lpc17_40_boot.c
@@ -28,7 +28,14 @@
 
 #include <nuttx/debug.h>
 
+#include <stdio.h>
+#include <syslog.h>
+#include <errno.h>
+
 #include <nuttx/board.h>
+#include <nuttx/fs/fs.h>
+#include <nuttx/spi/spi.h>
+#include <nuttx/mmcsd.h>
 #include <arch/board/board.h>
 
 #include "arm_internal.h"
@@ -36,6 +43,60 @@
 #include "lpc17_40_ssp.h"
 #include "u-blox-c027.h"
 
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+/* Configuration ************************************************************/
+
+#ifdef CONFIG_BOARDCTL
+
+/* PORT and SLOT number probably depend on the board configuration */
+
+#ifdef CONFIG_ARCH_BOARD_U_BLOX_C027
+#  define NSH_HAVEUSBDEV 1
+#  ifdef CONFIG_LPC17_40_SSP0
+#    define NSH_HAVEMMCSD 1
+#  else
+#    undef NSH_HAVEMMCSD
+#  endif
+#else
+#  error "Unrecognized board"
+#  undef NSH_HAVEUSBDEV
+#  undef NSH_HAVEMMCSD
+#endif
+
+/* Do we have SPI support for MMC/SD? */
+
+#ifdef NSH_HAVEMMCSD
+#    undef  CONFIG_NSH_MMCSDSPIPORTNO
+#    define CONFIG_NSH_MMCSDSPIPORTNO 0
+#    undef  CONFIG_NSH_MMCSDSLOTNO
+#    define CONFIG_NSH_MMCSDSLOTNO 0
+#endif
+
+/* Can't support USB device features if USB device is not enabled */
+
+#ifndef CONFIG_USBDEV
+#  undef NSH_HAVEUSBDEV
+#endif
+
+/* Can't support MMC/SD features if mountpoints are disabled */
+
+#if defined(CONFIG_DISABLE_MOUNTPOINT)
+#  undef NSH_HAVEMMCSD
+#endif
+
+#ifndef CONFIG_NSH_MMCSDMINOR
+#  define CONFIG_NSH_MMCSDMINOR 0
+#endif
+
+/* Currnently MMC/SD support is available only for NSH configurations */
+
+#else
+#  undef NSH_HAVEMMCSD
+#endif /* CONFIG_BOARDCTL */
+
 /****************************************************************************
  * Public Functions
  ****************************************************************************/
@@ -89,19 +150,79 @@ void lpc17_40_boardinitialize(void)
 #ifdef CONFIG_BOARD_LATE_INITIALIZE
 void board_late_initialize(void)
 {
+  int ret;
+
 #ifdef CONFIG_MODEM_U_BLOX
   lpc17_40_ubxmdm_init(false);
 #endif
 
-#if 0
-  lpc17_40_configgpio(C027_MDMEN     | GPIO_VALUE_ZERO); /* Modem disabled */
-  lpc17_40_configgpio(C027_MDMRST    | GPIO_VALUE_ONE);  /* Modem reset on */
-  lpc17_40_configgpio(C027_MDMPWR    | GPIO_VALUE_ONE);  /* Modem power off */
-  lpc17_40_configgpio(C027_GPSEN     | GPIO_VALUE_ZERO); /* GPS disabled */
-  lpc17_40_configgpio(C027_GPSRST    | GPIO_VALUE_ONE);  /* GPS reset on */
-  lpc17_40_configgpio(C027_MDMLVLOE  | GPIO_VALUE_ONE);  /* UART shifter disabled */
-  lpc17_40_configgpio(C027_MDMILVLOE | GPIO_VALUE_ZERO); /* I2C shifter disabled */
-  lpc17_40_configgpio(C027_MDMUSBDET | GPIO_VALUE_ZERO); /* USB sense off */
+#ifdef CONFIG_FS_PROCFS
+  /* mount the proc filesystem */
+
+  syslog(LOG_INFO, "Mounting procfs to /proc\n");
+
+  ret = nx_mount(NULL, "/proc", "procfs", 0, NULL);
+  if (ret < 0)
+    {
+      syslog(LOG_ERR,
+             "ERROR: Failed to mount the PROC filesystem: %d\n", ret);
+      return;
+    }
+#endif
+
+#ifdef NSH_HAVEMMCSD
+  struct spi_dev_s *ssp;
+
+  /* Get the SSP port */
+
+  ssp = lpc17_40_sspbus_initialize(CONFIG_NSH_MMCSDSPIPORTNO);
+  if (!ssp)
+    {
+      syslog(LOG_ERR, "ERROR: Failed to initialize SSP port %d\n",
+             CONFIG_NSH_MMCSDSPIPORTNO);
+      return;
+    }
+
+  syslog(LOG_INFO, "Successfully initialized SSP port %d\n",
+         CONFIG_NSH_MMCSDSPIPORTNO);
+
+  /* Bind the SSP port to the slot */
+
+  ret = mmcsd_spislotinitialize(CONFIG_NSH_MMCSDMINOR,
+                                CONFIG_NSH_MMCSDSLOTNO, ssp);
+  if (ret < 0)
+    {
+      syslog(LOG_ERR,
+             "ERROR: Failed to bind SSP port %d to MMC/SD slot %d: %d\n",
+             CONFIG_NSH_MMCSDSPIPORTNO, CONFIG_NSH_MMCSDSLOTNO, ret);
+      return;
+    }
+
+  syslog(LOG_INFO, "Successfully bound SSP port %d to MMC/SD slot %d\n",
+         CONFIG_NSH_MMCSDSPIPORTNO, CONFIG_NSH_MMCSDSLOTNO);
+#endif
+
+#ifdef CONFIG_PWM
+  /* Initialize PWM and register the PWM device. */
+
+  ret = lpc17_40_pwm_setup();
+  if (ret < 0)
+    {
+      syslog(LOG_ERR, "ERROR: lpc17_40_pwm_setup() failed: %d\n", ret);
+      return;
+    }
 #endif
+
+#ifdef CONFIG_ADC
+  /* Initialize ADC and register the ADC driver. */
+
+  ret = lpc17_40_adc_setup();
+  if (ret < 0)
+    {
+      syslog(LOG_ERR, "ERROR: lpc17_40_adc_setup failed: %d\n", ret);
+    }
+#endif
+
+  UNUSED(ret);
 }
 #endif /* CONFIG_BOARD_LATE_INITIALIZE */
diff --git a/boards/arm/lpc17xx_40xx/zkit-arm-1769/src/CMakeLists.txt b/boards/arm/lpc17xx_40xx/zkit-arm-1769/src/CMakeLists.txt
index 1872d841cfa..61cf9aab35f 100644
--- a/boards/arm/lpc17xx_40xx/zkit-arm-1769/src/CMakeLists.txt
+++ b/boards/arm/lpc17xx_40xx/zkit-arm-1769/src/CMakeLists.txt
@@ -23,10 +23,6 @@
 set(SRCS lpc17_40_boot.c lpc17_40_leds.c lpc17_40_ssp.c lpc17_40_buttons.c
          lpc17_40_lcd.c)
 
-if(CONFIG_BOARDCTL)
-  list(APPEND SRCS lpc17_40_appinit.c)
-endif()
-
 if(CONFIG_USBMSC)
   list(APPEND SRCS lpc17_40_usbmsc.c)
 endif()
diff --git a/boards/arm/lpc17xx_40xx/zkit-arm-1769/src/Makefile b/boards/arm/lpc17xx_40xx/zkit-arm-1769/src/Makefile
index 005bf37eef8..aea6afcba12 100644
--- a/boards/arm/lpc17xx_40xx/zkit-arm-1769/src/Makefile
+++ b/boards/arm/lpc17xx_40xx/zkit-arm-1769/src/Makefile
@@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs
 
 CSRCS = lpc17_40_boot.c lpc17_40_leds.c lpc17_40_ssp.c lpc17_40_buttons.c lpc17_40_lcd.c
 
-ifeq ($(CONFIG_BOARDCTL),y)
-CSRCS += lpc17_40_appinit.c
-endif
-
 ifeq ($(CONFIG_USBMSC),y)
 CSRCS += lpc17_40_usbmsc.c
 endif
diff --git a/boards/arm/lpc17xx_40xx/zkit-arm-1769/src/lpc17_40_appinit.c b/boards/arm/lpc17xx_40xx/zkit-arm-1769/src/lpc17_40_appinit.c
deleted file mode 100644
index d70a5e53184..00000000000
--- a/boards/arm/lpc17xx_40xx/zkit-arm-1769/src/lpc17_40_appinit.c
+++ /dev/null
@@ -1,181 +0,0 @@
-/****************************************************************************
- * boards/arm/lpc17xx_40xx/zkit-arm-1769/src/lpc17_40_appinit.c
- *
- * SPDX-License-Identifier: Apache-2.0
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.  The
- * ASF licenses this file to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the
- * License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
- * License for the specific language governing permissions and limitations
- * under the License.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <syslog.h>
-#include <errno.h>
-#include <nuttx/debug.h>
-
-#include <nuttx/board.h>
-#include <nuttx/spi/spi.h>
-#include <nuttx/mmcsd.h>
-
-#include "lpc17_40_spi.h"
-#include "zkit-arm-1769.h"
-
-/****************************************************************************
- * Pre-processor Definitions
- ****************************************************************************/
-
-/* Configuration ************************************************************/
-
-/* PORT and SLOT number probably depend on the board configuration */
-
-#ifdef CONFIG_ARCH_BOARD_ZKITARM
-#  define CONFIG_NSH_HAVEUSBDEV 1
-#  ifdef CONFIG_LPC17_40_SPI
-#    define CONFIG_NSH_HAVEMMCSD 1
-#  else
-#    undef CONFIG_NSH_HAVEMMCSD
-#  endif
-#else
-#  error "Unrecognized board"
-#  undef CONFIG_NSH_HAVEUSBDEV
-#  undef CONFIG_NSH_HAVEMMCSD
-#endif
-
-/* Do we have SPI support for MMC/SD? */
-
-#ifdef CONFIG_NSH_HAVEMMCSD
-#    undef CONFIG_NSH_MMCSDSPIPORTNO
-#    define CONFIG_NSH_MMCSDSPIPORTNO 0
-#    undef CONFIG_NSH_MMCSDSLOTNO
-#    define CONFIG_NSH_MMCSDSLOTNO 0
-#endif
-
-/* Can't support USB device features if USB device is not enabled */
-
-#ifndef CONFIG_USBDEV
-#  undef CONFIG_NSH_HAVEUSBDEV
-#endif
-
-/* Can't support MMC/SD features if mountpoints are disabled */
-
-#if defined(CONFIG_DISABLE_MOUNTPOINT)
-#  undef CONFIG_NSH_HAVEMMCSD
-#endif
-
-#ifndef CONFIG_NSH_MMCSDMINOR
-#  define CONFIG_NSH_MMCSDMINOR 0
-#endif
-
-/* Debug ********************************************************************/
-
-#ifdef CONFIG_DEBUG_INFO
-#  define message _info
-#else
-#  define message _err
-#endif
-
-/****************************************************************************
- * 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_NSH_HAVEMMCSD
-  struct spi_dev_s *spi;
-#endif
-  int ret;
-
-#ifdef CONFIG_NSH_HAVEMMCSD
-  /* Get the SPI port */
-
-  spi = lpc17_40_spibus_initialize(CONFIG_NSH_MMCSDSPIPORTNO);
-  if (!spi)
-    {
-      message("board_app_initialize: Failed to initialize SPI port %d\n",
-              CONFIG_NSH_MMCSDSPIPORTNO);
-      return -ENODEV;
-    }
-
-  message("Successfully initialized SPI port %d\n",
-          CONFIG_NSH_MMCSDSPIPORTNO);
-
-  /* Bind the SPI port to the slot */
-
-  ret = mmcsd_spislotinitialize(CONFIG_NSH_MMCSDMINOR,
-                                CONFIG_NSH_MMCSDSLOTNO, spi);
-  if (ret < 0)
-    {
-      message("Failed to bind SPI port %d to MMC/SD slot %d: %d\n",
-              CONFIG_NSH_MMCSDSPIPORTNO, CONFIG_NSH_MMCSDSLOTNO, ret);
-      return ret;
-    }
-
-  message("Successfully bound SPI port %d to MMC/SD slot %d\n",
-          CONFIG_NSH_MMCSDSPIPORTNO, CONFIG_NSH_MMCSDSLOTNO);
-#endif
-
-#ifdef CONFIG_ADC
-  /* Initialize ADC and register the ADC driver. */
-
-  ret = zkit_adc_setup();
-  if (ret < 0)
-    {
-      syslog(LOG_ERR, "ERROR: zkit_adc_setup failed: %d\n", ret);
-    }
-#endif
-
-#ifdef CONFIG_CAN
-  /* Initialize CAN and register the CAN driver. */
-
-  ret = zkit_can_setup();
-  if (ret < 0)
-    {
-      syslog(LOG_ERR, "ERROR: zkit_can_setup failed: %d\n", ret);
-    }
-#endif
-
-  UNUSED(ret);
-  return OK;
-}
diff --git a/boards/arm/lpc17xx_40xx/zkit-arm-1769/src/lpc17_40_boot.c b/boards/arm/lpc17xx_40xx/zkit-arm-1769/src/lpc17_40_boot.c
index 2a2b444d801..65ed8535942 100644
--- a/boards/arm/lpc17xx_40xx/zkit-arm-1769/src/lpc17_40_boot.c
+++ b/boards/arm/lpc17xx_40xx/zkit-arm-1769/src/lpc17_40_boot.c
@@ -28,16 +28,72 @@
 
 #include <nuttx/debug.h>
 
+#include <syslog.h>
+#include <errno.h>
+
 #include <nuttx/board.h>
+#include <nuttx/spi/spi.h>
+#include <nuttx/mmcsd.h>
 #include <arch/board/board.h>
 
 #include "arm_internal.h"
+#include "lpc17_40_spi.h"
 #include "zkit-arm-1769.h"
 
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
 
+/* Configuration ************************************************************/
+
+/* PORT and SLOT number probably depend on the board configuration */
+
+#ifdef CONFIG_ARCH_BOARD_ZKITARM
+#  define CONFIG_NSH_HAVEUSBDEV 1
+#  ifdef CONFIG_LPC17_40_SPI
+#    define CONFIG_NSH_HAVEMMCSD 1
+#  else
+#    undef CONFIG_NSH_HAVEMMCSD
+#  endif
+#else
+#  error "Unrecognized board"
+#  undef CONFIG_NSH_HAVEUSBDEV
+#  undef CONFIG_NSH_HAVEMMCSD
+#endif
+
+/* Do we have SPI support for MMC/SD? */
+
+#ifdef CONFIG_NSH_HAVEMMCSD
+#    undef CONFIG_NSH_MMCSDSPIPORTNO
+#    define CONFIG_NSH_MMCSDSPIPORTNO 0
+#    undef CONFIG_NSH_MMCSDSLOTNO
+#    define CONFIG_NSH_MMCSDSLOTNO 0
+#endif
+
+/* Can't support USB device features if USB device is not enabled */
+
+#ifndef CONFIG_USBDEV
+#  undef CONFIG_NSH_HAVEUSBDEV
+#endif
+
+/* Can't support MMC/SD features if mountpoints are disabled */
+
+#if defined(CONFIG_DISABLE_MOUNTPOINT)
+#  undef CONFIG_NSH_HAVEMMCSD
+#endif
+
+#ifndef CONFIG_NSH_MMCSDMINOR
+#  define CONFIG_NSH_MMCSDMINOR 0
+#endif
+
+/* Debug ********************************************************************/
+
+#ifdef CONFIG_DEBUG_INFO
+#  define message _info
+#else
+#  define message _err
+#endif
+
 /****************************************************************************
  * Private Functions
  ****************************************************************************/
@@ -78,3 +134,77 @@ void lpc17_40_boardinitialize(void)
   board_autoled_initialize();
 #endif
 }
+
+/****************************************************************************
+ * Name: board_late_initialize
+ *
+ * Description:
+ *   If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional
+ *   initialization call will be performed in the boot-up sequence to a
+ *   function called board_late_initialize(). board_late_initialize() will be
+ *   called immediately after up_initialize() is called and just before the
+ *   initial application is started.  This additional initialization phase
+ *   may be used, for example, to initialize board-specific device drivers.
+ *
+ ****************************************************************************/
+
+#ifdef CONFIG_BOARD_LATE_INITIALIZE
+void board_late_initialize(void)
+{
+#ifdef CONFIG_NSH_HAVEMMCSD
+  struct spi_dev_s *spi;
+#endif
+  int ret;
+
+#ifdef CONFIG_NSH_HAVEMMCSD
+  /* Get the SPI port */
+
+  spi = lpc17_40_spibus_initialize(CONFIG_NSH_MMCSDSPIPORTNO);
+  if (!spi)
+    {
+      message("Failed to initialize SPI port %d\n",
+              CONFIG_NSH_MMCSDSPIPORTNO);
+      return;
+    }
+
+  message("Successfully initialized SPI port %d\n",
+          CONFIG_NSH_MMCSDSPIPORTNO);
+
+  /* Bind the SPI port to the slot */
+
+  ret = mmcsd_spislotinitialize(CONFIG_NSH_MMCSDMINOR,
+                                CONFIG_NSH_MMCSDSLOTNO, spi);
+  if (ret < 0)
+    {
+      message("Failed to bind SPI port %d to MMC/SD slot %d: %d\n",
+              CONFIG_NSH_MMCSDSPIPORTNO, CONFIG_NSH_MMCSDSLOTNO, ret);
+      return;
+    }
+
+  message("Successfully bound SPI port %d to MMC/SD slot %d\n",
+          CONFIG_NSH_MMCSDSPIPORTNO, CONFIG_NSH_MMCSDSLOTNO);
+#endif
+
+#ifdef CONFIG_ADC
+  /* Initialize ADC and register the ADC driver. */
+
+  ret = zkit_adc_setup();
+  if (ret < 0)
+    {
+      syslog(LOG_ERR, "ERROR: zkit_adc_setup failed: %d\n", ret);
+    }
+#endif
+
+#ifdef CONFIG_CAN
+  /* Initialize CAN and register the CAN driver. */
+
+  ret = zkit_can_setup();
+  if (ret < 0)
+    {
+      syslog(LOG_ERR, "ERROR: zkit_can_setup failed: %d\n", ret);
+    }
+#endif
+
+  UNUSED(ret);
+}
+#endif
diff --git a/boards/arm/lpc214x/mcu123-lpc214x/src/Makefile b/boards/arm/lpc214x/mcu123-lpc214x/src/Makefile
index 6ed825db26c..f6e9dc20d51 100644
--- a/boards/arm/lpc214x/mcu123-lpc214x/src/Makefile
+++ b/boards/arm/lpc214x/mcu123-lpc214x/src/Makefile
@@ -22,11 +22,7 @@
 
 include $(TOPDIR)/Make.defs
 
-CSRCS = lpc2148_spi1.c lpc2148_leds.c
-
-ifeq ($(CONFIG_BOARDCTL),y)
-CSRCS += lpc2148_appinit.c
-endif
+CSRCS = lpc2148_spi1.c lpc2148_leds.c lpc2148_boardinit.c
 
 ifeq ($(CONFIG_USBMSC),y)
 CSRCS += lpc2148_usbmsc.c
diff --git a/boards/arm/lpc214x/mcu123-lpc214x/src/lpc2148_appinit.c b/boards/arm/lpc214x/mcu123-lpc214x/src/lpc2148_boardinit.c
similarity index 77%
rename from boards/arm/lpc214x/mcu123-lpc214x/src/lpc2148_appinit.c
rename to boards/arm/lpc214x/mcu123-lpc214x/src/lpc2148_boardinit.c
index 4d326d69491..655f2ca2ef9 100644
--- a/boards/arm/lpc214x/mcu123-lpc214x/src/lpc2148_appinit.c
+++ b/boards/arm/lpc214x/mcu123-lpc214x/src/lpc2148_boardinit.c
@@ -1,5 +1,5 @@
 /****************************************************************************
- * boards/arm/lpc214x/mcu123-lpc214x/src/lpc2148_appinit.c
+ * boards/arm/lpc214x/mcu123-lpc214x/src/lpc2148_boardinit.c
  *
  * SPDX-License-Identifier: Apache-2.0
  *
@@ -71,29 +71,20 @@
  ****************************************************************************/
 
 /****************************************************************************
- * Name: board_app_initialize
+ * Name: board_late_initialize
  *
  * Description:
- *   Perform architecture specific initialization
- *
- * 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.
+ *   If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional
+ *   initialization call will be performed in the boot-up sequence to a
+ *   function called board_late_initialize(). board_late_initialize() will be
+ *   called immediately after up_initialize() is called and just before the
+ *   initial application is started.  This additional initialization phase
+ *   may be used, for example, to initialize board-specific device drivers.
  *
  ****************************************************************************/
 
-int board_app_initialize(uintptr_t arg)
+#ifdef CONFIG_BOARD_LATE_INITIALIZE
+void board_late_initialize(void)
 {
 #ifdef HAVE_MMCSD
   struct spi_dev_s *spi;
@@ -109,7 +100,7 @@ int board_app_initialize(uintptr_t arg)
     {
       syslog(LOG_ERR, "ERROR: Failed to initialize SPI port %d\n",
              CONFIG_NSH_MMCSDSPIPORTNO);
-      return -ENODEV;
+      return;
     }
 
   syslog(LOG_INFO, "Successfully initialized SPI port %d\n",
@@ -127,12 +118,11 @@ int board_app_initialize(uintptr_t arg)
       syslog(LOG_ERR,
              "ERROR: Failed to bind SPI port %d to MMC/SD slot %d: %d\n",
              CONFIG_NSH_MMCSDSPIPORTNO, CONFIG_NSH_MMCSDSLOTNO, ret);
-      return ret;
+      return;
     }
 
   syslog(LOG_INFO, "Successfully bound SPI port %d to MMC/SD slot %d\n",
          CONFIG_NSH_MMCSDSPIPORTNO, CONFIG_NSH_MMCSDSLOTNO);
 #endif
-
-  return OK;
 }
+#endif
diff --git a/boards/arm/lpc214x/mcu123-lpc214x/src/lpc2148_composite.c b/boards/arm/lpc214x/mcu123-lpc214x/src/lpc2148_composite.c
index b92ed6b3eba..953f17565d2 100644
--- a/boards/arm/lpc214x/mcu123-lpc214x/src/lpc2148_composite.c
+++ b/boards/arm/lpc214x/mcu123-lpc214x/src/lpc2148_composite.c
@@ -337,8 +337,7 @@ static void *board_composite1_connect(int port)
 int board_composite_initialize(int port)
 {
   /* If system/composite is built as an NSH command, then SD slot should
-   * already have been initialized in board_app_initialize()
-   * (see lpc2148_appinit.c).
+   * already have been initialized.
    * In this case, there is nothing further to be done here.
    *
    * NOTE: CONFIG_NSH_BUILTIN_APPS is not a fool-proof indication that NSH
diff --git a/boards/arm/lpc214x/zp214xpa/src/Makefile b/boards/arm/lpc214x/zp214xpa/src/Makefile
index 32ef274cbc8..ed9c1ce2d60 100644
--- a/boards/arm/lpc214x/zp214xpa/src/Makefile
+++ b/boards/arm/lpc214x/zp214xpa/src/Makefile
@@ -22,12 +22,10 @@
 
 include $(TOPDIR)/Make.defs
 
+CSRCS += lpc2148_boardinit.c
+
 ifeq ($(CONFIG_LCD_UG2864AMBAG01),y)
 CSRCS += lpc2148_ug2864ambag01.c lpc2148_spi1.c
 endif
 
-ifeq ($(CONFIG_BOARDCTL),y)
-CSRCS += lpc2148_appinit.c
-endif
-
 include $(TOPDIR)/boards/Board.mk
diff --git a/boards/arm/lpc214x/zp214xpa/src/lpc2148_appinit.c b/boards/arm/lpc214x/zp214xpa/src/lpc2148_boardinit.c
similarity index 63%
rename from boards/arm/lpc214x/zp214xpa/src/lpc2148_appinit.c
rename to boards/arm/lpc214x/zp214xpa/src/lpc2148_boardinit.c
index 1411f4d83dc..06020ea8e74 100644
--- a/boards/arm/lpc214x/zp214xpa/src/lpc2148_appinit.c
+++ b/boards/arm/lpc214x/zp214xpa/src/lpc2148_boardinit.c
@@ -1,5 +1,5 @@
 /****************************************************************************
- * boards/arm/lpc214x/zp214xpa/src/lpc2148_appinit.c
+ * boards/arm/lpc214x/zp214xpa/src/lpc2148_boardinit.c
  *
  * SPDX-License-Identifier: Apache-2.0
  *
@@ -26,6 +26,10 @@
 
 #include <nuttx/config.h>
 
+#include <nuttx/debug.h>
+
+#include <stdio.h>
+#include <errno.h>
 #include <sys/types.h>
 #include <syslog.h>
 
@@ -33,38 +37,25 @@
 #  include <nuttx/video/fb.h>
 #endif
 
-#ifdef CONFIG_BOARDCTL
-
 /****************************************************************************
  * Public Functions
  ****************************************************************************/
 
 /****************************************************************************
- * Name: board_app_initialize
+ * Name: board_late_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.
+ *   If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional
+ *   initialization call will be performed in the boot-up sequence to a
+ *   function called board_late_initialize(). board_late_initialize() will be
+ *   called immediately after up_initialize() is called and just before the
+ *   initial application is started.  This additional initialization phase
+ *   may be used, for example, to initialize board-specific device drivers.
  *
  ****************************************************************************/
 
-int board_app_initialize(uintptr_t arg)
+#ifdef CONFIG_BOARD_LATE_INITIALIZE
+void board_late_initialize(void)
 {
   int ret;
 
@@ -89,7 +80,5 @@ int board_app_initialize(uintptr_t arg)
 #endif
 
   UNUSED(ret);
-  return OK;
 }
-
-#endif /* CONFIG_BOARDCTL */
+#endif
diff --git a/boards/arm/lpc2378/olimex-lpc2378/src/Makefile b/boards/arm/lpc2378/olimex-lpc2378/src/Makefile
index 30070b0d144..8cddb1ec4ea 100644
--- a/boards/arm/lpc2378/olimex-lpc2378/src/Makefile
+++ b/boards/arm/lpc2378/olimex-lpc2378/src/Makefile
@@ -24,8 +24,4 @@ include $(TOPDIR)/Make.defs
 
 CSRCS = lpc2378_leds.c
 
-ifeq ($(CONFIG_BOARDCTL),y)
-CSRCS += lpc2378_appinit.c
-endif
... 35481 lines suppressed ...