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

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


The following commit(s) were added to refs/heads/master by this push:
     new a2c806027f fix led panic feature
a2c806027f is described below

commit a2c806027ff6b42906164799aa551b7a115d9a45
Author: ThomasNS <[email protected]>
AuthorDate: Fri Sep 8 18:16:42 2023 +0200

    fix led panic feature
---
 arch/arm/src/a1x/a1x_config.h                      |   3 +-
 arch/arm/src/a1x/a1x_serial.c                      |   1 +
 arch/arm/src/a1x/a1x_serial.h                      |   6 -
 arch/arm/src/a1x/a1x_timerisr.c                    |   1 -
 arch/arm/src/a1x/hardware/a10_piocfg.h             | 132 ++++++++++-----------
 arch/arm/src/lpc31xx/lpc31_i2c.c                   |   1 +
 arch/arm/src/lpc31xx/lpc31_spi.c                   |   1 +
 arch/arm/src/lpc31xx/lpc31_timerisr.c              |   1 +
 arch/arm/src/lpc31xx/lpc31_usbdev.c                |   1 +
 arch/risc-v/src/mpfs/mpfs_cache.c                  |   1 +
 arch/risc-v/src/mpfs/mpfs_corespi.c                |   1 +
 arch/risc-v/src/mpfs/mpfs_i2c.c                    |   1 +
 arch/risc-v/src/mpfs/mpfs_spi.c                    |   1 +
 arch/risc-v/src/mpfs/mpfs_usb.c                    |   1 +
 boards/arm/a1x/pcduino-a10/include/board.h         |   2 -
 boards/arm/am335x/beaglebone-black/include/board.h |   2 -
 boards/arm/efm32/efm32-g8xx-stk/include/board.h    |   5 -
 boards/arm/efm32/efm32gg-stk3700/include/board.h   |   5 -
 .../efm32/olimex-efm32g880f128-stk/include/board.h |   5 -
 boards/arm/eoss3/quickfeather/include/board.h      |   2 -
 boards/arm/eoss3/quickfeather/src/eoss3_autoleds.c |   1 +
 boards/arm/lpc31xx/ea3131/include/board.h          |   1 -
 boards/arm/lpc31xx/ea3152/include/board.h          |   1 -
 .../arm/lpc31xx/olimex-lpc-h3131/include/board.h   |   1 -
 boards/arm/nrf53/nrf5340-dk/include/board.h        |   2 -
 boards/arm/nrf53/thingy53/include/board.h          |   2 -
 boards/arm/sama5/giant-board/include/board_sdram.h |   1 -
 .../arm/sama5/jupiter-nano/include/board_sdram.h   |   1 -
 .../arm/sama5/sama5d2-xult/include/board_sdram.h   |   1 -
 .../sama5/sama5d3-xplained/include/board_sdram.h   |   1 -
 boards/arm/sama5/sama5d3x-ek/include/board_sdram.h |   1 -
 boards/arm/sama5/sama5d4-ek/include/board_sdram.h  |   1 -
 boards/arm/stm32/clicker2-stm32/include/board.h    |   6 -
 boards/arm/stm32/cloudctrl/include/board.h         |   3 -
 boards/arm/stm32/emw3162/include/board.h           |   3 -
 boards/arm/stm32/emw3162/src/stm32_wlan.c          |   1 +
 boards/arm/stm32/et-stm32-stamp/include/board.h    |   3 -
 boards/arm/stm32/fire-stm32v2/include/board.h      |   3 -
 boards/arm/stm32/maple/include/board.h             |   3 -
 boards/arm/stm32/mikroe-stm32f4/include/board.h    |   4 -
 .../arm/stm32/mikroe-stm32f4/src/mikroe-stm32f4.h  |   2 +
 .../stm32/mikroe-stm32f4/src/stm32_clockconfig.c   |   2 +
 boards/arm/stm32/nucleo-f103rb/include/board.h     |   4 -
 boards/arm/stm32/nucleo-f207zg/include/board.h     |   4 -
 boards/arm/stm32/nucleo-f302r8/include/board.h     |   4 -
 boards/arm/stm32/nucleo-f303re/include/board.h     |   4 -
 boards/arm/stm32/nucleo-f303re/src/nucleo-f303re.h |   2 +
 boards/arm/stm32/nucleo-f303ze/include/board.h     |   4 -
 boards/arm/stm32/nucleo-f334r8/include/board.h     |   4 -
 boards/arm/stm32/nucleo-f410rb/include/board.h     |   4 -
 boards/arm/stm32/nucleo-f410rb/src/nucleo-f410rb.h |   2 +
 boards/arm/stm32/nucleo-f412zg/include/board.h     |   2 -
 boards/arm/stm32/nucleo-f446re/include/board.h     |   2 -
 boards/arm/stm32/nucleo-f446re/src/nucleo-f446re.h |   2 +
 boards/arm/stm32/nucleo-l152re/include/board.h     |   4 -
 boards/arm/stm32/nucleo-l152re/src/nucleo-l152re.h |   2 +
 boards/arm/stm32/olimex-stm32-e407/include/board.h |   6 -
 .../olimex-stm32-e407/src/olimex-stm32-e407.h      |   2 +
 boards/arm/stm32/olimex-stm32-h405/include/board.h |   2 -
 .../olimex-stm32-h405/src/olimex-stm32-h405.h      |   2 +
 boards/arm/stm32/olimex-stm32-h407/include/board.h |   6 -
 .../olimex-stm32-h407/src/olimex-stm32-h407.h      |   2 +
 boards/arm/stm32/olimex-stm32-p107/include/board.h |   3 -
 boards/arm/stm32/olimex-stm32-p207/include/board.h |   2 -
 .../olimex-stm32-p207/src/olimex-stm32-p207.h      |   2 +
 boards/arm/stm32/olimexino-stm32/include/board.h   |   3 -
 .../stm32/olimexino-stm32/src/olimexino-stm32.h    |   2 +
 boards/arm/stm32/photon/include/board.h            |   3 -
 boards/arm/stm32/shenzhou/include/board.h          |   3 -
 boards/arm/stm32/stm3220g-eval/include/board.h     |   4 -
 boards/arm/stm32/stm32_tiny/include/board.h        |   3 -
 boards/arm/stm32/stm32butterfly2/include/board.h   |   2 -
 boards/arm/stm32/stm32f334-disco/include/board.h   |   4 -
 boards/arm/stm32/stm32f3discovery/include/board.h  |   3 -
 .../stm32/stm32f3discovery/src/stm32f3discovery.h  |   2 +
 boards/arm/stm32/stm32f411-minimum/include/board.h |   2 -
 boards/arm/stm32/stm32f411e-disco/include/board.h  |   2 -
 .../stm32/stm32f411e-disco/src/stm32f411e-disco.h  |   1 +
 boards/arm/stm32/stm32vldiscovery/include/board.h  |   2 -
 .../include/board-stm32f103vct6.h                  |   2 -
 .../include/board-stm32f107vct6.h                  |   2 -
 .../arm/stm32/viewtool-stm32f107/include/board.h   |   4 -
 .../viewtool-stm32f107/src/viewtool_stm32f107.h    |   2 +
 boards/arm/stm32u5/b-u585i-iot02a/include/board.h  |   1 -
 boards/arm/stm32u5/nucleo-u5a5zj-q/include/board.h |   1 -
 boards/arm/str71x/olimex-strp711/include/board.h   |   1 -
 .../imx8/imx8qm-mek}/include/board.h               |  27 +----
 .../qemu/qemu-armv8a}/include/board.h              |  27 +----
 .../arm64/rk3399/nanopi_m4/configs/nsh/defconfig   |   1 +
 .../rk3399/pinephonepro/configs/nsh/defconfig      |   1 +
 boards/risc-v/c906/smartl-c906/include/board.h     |   2 -
 boards/risc-v/k210/maix-bit/include/board.h        |   4 -
 boards/risc-v/mpfs/icicle/include/board.h          |   2 -
 boards/risc-v/mpfs/m100pfsevp/include/board.h      |   2 -
 sched/misc/assert.c                                |  11 ++
 95 files changed, 131 insertions(+), 283 deletions(-)

diff --git a/arch/arm/src/a1x/a1x_config.h b/arch/arm/src/a1x/a1x_config.h
index 2aecdd5be3..3826f130b9 100644
--- a/arch/arm/src/a1x/a1x_config.h
+++ b/arch/arm/src/a1x/a1x_config.h
@@ -26,9 +26,8 @@
  ****************************************************************************/
 
 #include <nuttx/config.h>
-#include <arch/board/board.h>
 
-#include "chip.h"
+#include "hardware/a1x_piocfg.h"
 
 /****************************************************************************
  * Pre-processor Definitions
diff --git a/arch/arm/src/a1x/a1x_serial.c b/arch/arm/src/a1x/a1x_serial.c
index 083d0912ab..b211c23911 100644
--- a/arch/arm/src/a1x/a1x_serial.c
+++ b/arch/arm/src/a1x/a1x_serial.c
@@ -47,6 +47,7 @@
 #include "arm_internal.h"
 #include "chip.h"
 #include "hardware/a1x_uart.h"
+#include "a1x_config.h"
 #include "a1x_pio.h"
 #include "a1x_serial.h"
 
diff --git a/arch/arm/src/a1x/a1x_serial.h b/arch/arm/src/a1x/a1x_serial.h
index 5135ea6083..c013162149 100644
--- a/arch/arm/src/a1x/a1x_serial.h
+++ b/arch/arm/src/a1x/a1x_serial.h
@@ -26,12 +26,6 @@
  ****************************************************************************/
 
 #include <nuttx/config.h>
-#include <arch/board/board.h>
-
-#include "hardware/a1x_uart.h"
-
-#include "a1x_config.h"
-#include "a1x_pio.h"
 
 /****************************************************************************
  * Pre-processor Definitions
diff --git a/arch/arm/src/a1x/a1x_timerisr.c b/arch/arm/src/a1x/a1x_timerisr.c
index 4d70093c81..f408bbf087 100644
--- a/arch/arm/src/a1x/a1x_timerisr.c
+++ b/arch/arm/src/a1x/a1x_timerisr.c
@@ -31,7 +31,6 @@
 #include <nuttx/arch.h>
 
 #include <arch/irq.h>
-#include <arch/board/board.h>
 
 #include "arm_internal.h"
 #include "hardware/a1x_timer.h"
diff --git a/arch/arm/src/a1x/hardware/a10_piocfg.h 
b/arch/arm/src/a1x/hardware/a10_piocfg.h
index b23ee3c518..693969fa4a 100644
--- a/arch/arm/src/a1x/hardware/a10_piocfg.h
+++ b/arch/arm/src/a1x/hardware/a10_piocfg.h
@@ -97,68 +97,68 @@
 
 /* Camera Sensor Interface (CSI) */
 
-#define PIO_CSI0_CK     (PIO_PERIPH3 | PIO_PORT_PIOE | PIO_PIN1)
-#define PIO_CSI0_D0     (PIO_PERIPH3 | PIO_PORT_PIOE | PIO_PIN4)
-#define PIO_CSI0_D1     (PIO_PERIPH3 | PIO_PORT_PIOE | PIO_PIN5)
-#define PIO_CSI0_D2     (PIO_PERIPH3 | PIO_PORT_PIOE | PIO_PIN6)
-#define PIO_CSI0_D3     (PIO_PERIPH3 | PIO_PORT_PIOE | PIO_PIN7)
-#define PIO_CSI0_D4     (PIO_PERIPH3 | PIO_PORT_PIOE | PIO_PIN8)
-#define PIO_CSI0_D5     (PIO_PERIPH3 | PIO_PORT_PIOE | PIO_PIN9)
-#define PIO_CSI0_D6     (PIO_PERIPH3 | PIO_PORT_PIOE | PIO_PIN10)
-#define PIO_CSI0_D7     (PIO_PERIPH3 | PIO_PORT_PIOE | PIO_PIN11)
-#define PIO_CSI0_D8     (PIO_PERIPH5 | PIO_PORT_PIOG | PIO_PIN4)
-#define PIO_CSI0_D9     (PIO_PERIPH5 | PIO_PORT_PIOG | PIO_PIN5)
-#define PIO_CSI0_D10    (PIO_PERIPH5 | PIO_PORT_PIOG | PIO_PIN6)
-#define PIO_CSI0_D11    (PIO_PERIPH5 | PIO_PORT_PIOG | PIO_PIN7)
-#define PIO_CSI0_D12    (PIO_PERIPH5 | PIO_PORT_PIOG | PIO_PIN8)
-#define PIO_CSI0_D13    (PIO_PERIPH5 | PIO_PORT_PIOG | PIO_PIN9)
-#define PIO_CSI0_D14    (PIO_PERIPH5 | PIO_PORT_PIOG | PIO_PIN10)
-#define PIO_CSI0_D15    (PIO_PERIPH5 | PIO_PORT_PIOG | PIO_PIN11)
-#define PIO_CSI0_HSYNC  (PIO_PERIPH3 | PIO_PORT_PIOE | PIO_PIN2)
-#define PIO_CSI0_PCK    (PIO_PERIPH3 | PIO_PORT_PIOE | PIO_PIN0)
-#define PIO_CSI0_VSYNC  (PIO_PERIPH3 | PIO_PORT_PIOE | PIO_PIN3)
-
-#define PIO_CSI1_CK     (PIO_PERIPH3 | PIO_PORT_PIOG | PIO_PIN1)
-#define PIO_CSI1_D0_1   (PIO_PERIPH3 | PIO_PORT_PIOG | PIO_PIN4)
-#define PIO_CSI1_D0_2   (PIO_PERIPH7 | PIO_PORT_PIOH | PIO_PIN0)
-#define PIO_CSI1_D1_1   (PIO_PERIPH3 | PIO_PORT_PIOG | PIO_PIN5)
-#define PIO_CSI1_D1_2   (PIO_PERIPH7 | PIO_PORT_PIOH | PIO_PIN1)
-#define PIO_CSI1_D2_1   (PIO_PERIPH3 | PIO_PORT_PIOG | PIO_PIN6)
-#define PIO_CSI1_D2_2   (PIO_PERIPH7 | PIO_PORT_PIOH | PIO_PIN2)
-#define PIO_CSI1_D3_1   (PIO_PERIPH3 | PIO_PORT_PIOG | PIO_PIN7)
-#define PIO_CSI1_D3_2   (PIO_PERIPH7 | PIO_PORT_PIOH | PIO_PIN3)
-#define PIO_CSI1_D4_1   (PIO_PERIPH3 | PIO_PORT_PIOG | PIO_PIN8)
-#define PIO_CSI1_D4_2   (PIO_PERIPH7 | PIO_PORT_PIOH | PIO_PIN4)
-#define PIO_CSI1_D5_1   (PIO_PERIPH3 | PIO_PORT_PIOG | PIO_PIN9)
-#define PIO_CSI1_D5_2   (PIO_PERIPH7 | PIO_PORT_PIOH | PIO_PIN5)
-#define PIO_CSI1_D6_1   (PIO_PERIPH7 | PIO_PORT_PIOH | PIO_PIN6)
-#define PIO_CSI1_D6_2   (PIO_PERIPH3 | PIO_PORT_PIOG | PIO_PIN10)
-#define PIO_CSI1_D7_1   (PIO_PERIPH7 | PIO_PORT_PIOH | PIO_PIN7)
-#define PIO_CSI1_D7_2   (PIO_PERIPH3 | PIO_PORT_PIOG | PIO_PIN11)
-#define PIO_CSI1_D8     (PIO_PERIPH7 | PIO_PORT_PIOH | PIO_PIN8)
-#define PIO_CSI1_D9     (PIO_PERIPH7 | PIO_PORT_PIOH | PIO_PIN9)
-#define PIO_CSI1_D10    (PIO_PERIPH7 | PIO_PORT_PIOH | PIO_PIN10)
-#define PIO_CSI1_D11    (PIO_PERIPH7 | PIO_PORT_PIOH | PIO_PIN11)
-#define PIO_CSI1_D12    (PIO_PERIPH7 | PIO_PORT_PIOH | PIO_PIN12)
-#define PIO_CSI1_D13    (PIO_PERIPH7 | PIO_PORT_PIOH | PIO_PIN13)
-#define PIO_CSI1_D14    (PIO_PERIPH7 | PIO_PORT_PIOH | PIO_PIN14)
-#define PIO_CSI1_D15    (PIO_PERIPH7 | PIO_PORT_PIOH | PIO_PIN15)
-#define PIO_CSI1_D16    (PIO_PERIPH7 | PIO_PORT_PIOH | PIO_PIN16)
-#define PIO_CSI1_D17    (PIO_PERIPH7 | PIO_PORT_PIOH | PIO_PIN17)
-#define PIO_CSI1_D18    (PIO_PERIPH7 | PIO_PORT_PIOH | PIO_PIN18)
-#define PIO_CSI1_D19    (PIO_PERIPH7 | PIO_PORT_PIOH | PIO_PIN19)
-#define PIO_CSI1_D20    (PIO_PERIPH7 | PIO_PORT_PIOH | PIO_PIN20)
-#define PIO_CSI1_D21    (PIO_PERIPH7 | PIO_PORT_PIOH | PIO_PIN21)
-#define PIO_CSI1_D22    (PIO_PERIPH7 | PIO_PORT_PIOH | PIO_PIN22)
-#define PIO_CSI1_D23    (PIO_PERIPH7 | PIO_PORT_PIOH | PIO_PIN23)
-#define PIO_CSI1_FIELD  (PIO_PERIPH7 | PIO_PORT_PIOH | PIO_PIN25)
-#define PIO_CSI1_HSYNC  (PIO_PERIPH3 | PIO_PORT_PIOG | PIO_PIN2)
-#define PIO_CSI1_HSYNC  (PIO_PERIPH7 | PIO_PORT_PIOH | PIO_PIN26)
-#define PIO_CSI1_MCLK   (PIO_PERIPH3 | PIO_PORT_PIOD | PIO_PIN20)
-#define PIO_CSI1_PCK    (PIO_PERIPH3 | PIO_PORT_PIOG | PIO_PIN0)
-#define PIO_CSI1_PCLK   (PIO_PERIPH7 | PIO_PORT_PIOH | PIO_PIN24)
-#define PIO_CSI1_VSYNC  (PIO_PERIPH3 | PIO_PORT_PIOG | PIO_PIN3)
-#define PIO_CSI1_VSYNC  (PIO_PERIPH7 | PIO_PORT_PIOH | PIO_PIN27)
+#define PIO_CSI0_CK       (PIO_PERIPH3 | PIO_PORT_PIOE | PIO_PIN1)
+#define PIO_CSI0_D0       (PIO_PERIPH3 | PIO_PORT_PIOE | PIO_PIN4)
+#define PIO_CSI0_D1       (PIO_PERIPH3 | PIO_PORT_PIOE | PIO_PIN5)
+#define PIO_CSI0_D2       (PIO_PERIPH3 | PIO_PORT_PIOE | PIO_PIN6)
+#define PIO_CSI0_D3       (PIO_PERIPH3 | PIO_PORT_PIOE | PIO_PIN7)
+#define PIO_CSI0_D4       (PIO_PERIPH3 | PIO_PORT_PIOE | PIO_PIN8)
+#define PIO_CSI0_D5       (PIO_PERIPH3 | PIO_PORT_PIOE | PIO_PIN9)
+#define PIO_CSI0_D6       (PIO_PERIPH3 | PIO_PORT_PIOE | PIO_PIN10)
+#define PIO_CSI0_D7       (PIO_PERIPH3 | PIO_PORT_PIOE | PIO_PIN11)
+#define PIO_CSI0_D8       (PIO_PERIPH5 | PIO_PORT_PIOG | PIO_PIN4)
+#define PIO_CSI0_D9       (PIO_PERIPH5 | PIO_PORT_PIOG | PIO_PIN5)
+#define PIO_CSI0_D10      (PIO_PERIPH5 | PIO_PORT_PIOG | PIO_PIN6)
+#define PIO_CSI0_D11      (PIO_PERIPH5 | PIO_PORT_PIOG | PIO_PIN7)
+#define PIO_CSI0_D12      (PIO_PERIPH5 | PIO_PORT_PIOG | PIO_PIN8)
+#define PIO_CSI0_D13      (PIO_PERIPH5 | PIO_PORT_PIOG | PIO_PIN9)
+#define PIO_CSI0_D14      (PIO_PERIPH5 | PIO_PORT_PIOG | PIO_PIN10)
+#define PIO_CSI0_D15      (PIO_PERIPH5 | PIO_PORT_PIOG | PIO_PIN11)
+#define PIO_CSI0_HSYNC    (PIO_PERIPH3 | PIO_PORT_PIOE | PIO_PIN2)
+#define PIO_CSI0_PCK      (PIO_PERIPH3 | PIO_PORT_PIOE | PIO_PIN0)
+#define PIO_CSI0_VSYNC    (PIO_PERIPH3 | PIO_PORT_PIOE | PIO_PIN3)
+
+#define PIO_CSI1_CK       (PIO_PERIPH3 | PIO_PORT_PIOG | PIO_PIN1)
+#define PIO_CSI1_D0_1     (PIO_PERIPH3 | PIO_PORT_PIOG | PIO_PIN4)
+#define PIO_CSI1_D0_2     (PIO_PERIPH7 | PIO_PORT_PIOH | PIO_PIN0)
+#define PIO_CSI1_D1_1     (PIO_PERIPH3 | PIO_PORT_PIOG | PIO_PIN5)
+#define PIO_CSI1_D1_2     (PIO_PERIPH7 | PIO_PORT_PIOH | PIO_PIN1)
+#define PIO_CSI1_D2_1     (PIO_PERIPH3 | PIO_PORT_PIOG | PIO_PIN6)
+#define PIO_CSI1_D2_2     (PIO_PERIPH7 | PIO_PORT_PIOH | PIO_PIN2)
+#define PIO_CSI1_D3_1     (PIO_PERIPH3 | PIO_PORT_PIOG | PIO_PIN7)
+#define PIO_CSI1_D3_2     (PIO_PERIPH7 | PIO_PORT_PIOH | PIO_PIN3)
+#define PIO_CSI1_D4_1     (PIO_PERIPH3 | PIO_PORT_PIOG | PIO_PIN8)
+#define PIO_CSI1_D4_2     (PIO_PERIPH7 | PIO_PORT_PIOH | PIO_PIN4)
+#define PIO_CSI1_D5_1     (PIO_PERIPH3 | PIO_PORT_PIOG | PIO_PIN9)
+#define PIO_CSI1_D5_2     (PIO_PERIPH7 | PIO_PORT_PIOH | PIO_PIN5)
+#define PIO_CSI1_D6_1     (PIO_PERIPH7 | PIO_PORT_PIOH | PIO_PIN6)
+#define PIO_CSI1_D6_2     (PIO_PERIPH3 | PIO_PORT_PIOG | PIO_PIN10)
+#define PIO_CSI1_D7_1     (PIO_PERIPH7 | PIO_PORT_PIOH | PIO_PIN7)
+#define PIO_CSI1_D7_2     (PIO_PERIPH3 | PIO_PORT_PIOG | PIO_PIN11)
+#define PIO_CSI1_D8       (PIO_PERIPH7 | PIO_PORT_PIOH | PIO_PIN8)
+#define PIO_CSI1_D9       (PIO_PERIPH7 | PIO_PORT_PIOH | PIO_PIN9)
+#define PIO_CSI1_D10      (PIO_PERIPH7 | PIO_PORT_PIOH | PIO_PIN10)
+#define PIO_CSI1_D11      (PIO_PERIPH7 | PIO_PORT_PIOH | PIO_PIN11)
+#define PIO_CSI1_D12      (PIO_PERIPH7 | PIO_PORT_PIOH | PIO_PIN12)
+#define PIO_CSI1_D13      (PIO_PERIPH7 | PIO_PORT_PIOH | PIO_PIN13)
+#define PIO_CSI1_D14      (PIO_PERIPH7 | PIO_PORT_PIOH | PIO_PIN14)
+#define PIO_CSI1_D15      (PIO_PERIPH7 | PIO_PORT_PIOH | PIO_PIN15)
+#define PIO_CSI1_D16      (PIO_PERIPH7 | PIO_PORT_PIOH | PIO_PIN16)
+#define PIO_CSI1_D17      (PIO_PERIPH7 | PIO_PORT_PIOH | PIO_PIN17)
+#define PIO_CSI1_D18      (PIO_PERIPH7 | PIO_PORT_PIOH | PIO_PIN18)
+#define PIO_CSI1_D19      (PIO_PERIPH7 | PIO_PORT_PIOH | PIO_PIN19)
+#define PIO_CSI1_D20      (PIO_PERIPH7 | PIO_PORT_PIOH | PIO_PIN20)
+#define PIO_CSI1_D21      (PIO_PERIPH7 | PIO_PORT_PIOH | PIO_PIN21)
+#define PIO_CSI1_D22      (PIO_PERIPH7 | PIO_PORT_PIOH | PIO_PIN22)
+#define PIO_CSI1_D23      (PIO_PERIPH7 | PIO_PORT_PIOH | PIO_PIN23)
+#define PIO_CSI1_FIELD    (PIO_PERIPH7 | PIO_PORT_PIOH | PIO_PIN25)
+#define PIO_CSI1_HSYNC_1  (PIO_PERIPH3 | PIO_PORT_PIOG | PIO_PIN2)
+#define PIO_CSI1_HSYNC_2  (PIO_PERIPH7 | PIO_PORT_PIOH | PIO_PIN26)
+#define PIO_CSI1_MCLK     (PIO_PERIPH3 | PIO_PORT_PIOD | PIO_PIN20)
+#define PIO_CSI1_PCK      (PIO_PERIPH3 | PIO_PORT_PIOG | PIO_PIN0)
+#define PIO_CSI1_PCLK     (PIO_PERIPH7 | PIO_PORT_PIOH | PIO_PIN24)
+#define PIO_CSI1_VSYNC_1  (PIO_PERIPH3 | PIO_PORT_PIOG | PIO_PIN3)
+#define PIO_CSI1_VSYNC_2  (PIO_PERIPH7 | PIO_PORT_PIOH | PIO_PIN27)
 
 /* Ethernet MAC */
 
@@ -414,10 +414,10 @@
 #define PIO_SDC0_D2     (PIO_PERIPH2 | PIO_PORT_PIOF | PIO_PIN5)
 #define PIO_SDC0_D3     (PIO_PERIPH2 | PIO_PORT_PIOF | PIO_PIN4)
 
-#define PIO_SDC1_CLK    (PIO_PERIPH4 | PIO_PORT_PIOG | PIO_PIN1)
-#define PIO_SDC1_CLK    (PIO_PERIPH5 | PIO_PORT_PIOH | PIO_PIN23)
-#define PIO_SDC1_CMD    (PIO_PERIPH4 | PIO_PORT_PIOG | PIO_PIN0)
-#define PIO_SDC1_CMD    (PIO_PERIPH5 | PIO_PORT_PIOH | PIO_PIN22)
+#define PIO_SDC1_CLK_1  (PIO_PERIPH4 | PIO_PORT_PIOG | PIO_PIN1)
+#define PIO_SDC1_CLK_2  (PIO_PERIPH5 | PIO_PORT_PIOH | PIO_PIN23)
+#define PIO_SDC1_CMD_1  (PIO_PERIPH4 | PIO_PORT_PIOG | PIO_PIN0)
+#define PIO_SDC1_CMD_2  (PIO_PERIPH5 | PIO_PORT_PIOH | PIO_PIN22)
 #define PIO_SDC1_D0_1   (PIO_PERIPH4 | PIO_PORT_PIOG | PIO_PIN2)
 #define PIO_SDC1_D0_2   (PIO_PERIPH5 | PIO_PORT_PIOH | PIO_PIN24)
 #define PIO_SDC1_D1_1   (PIO_PERIPH4 | PIO_PORT_PIOG | PIO_PIN3)
diff --git a/arch/arm/src/lpc31xx/lpc31_i2c.c b/arch/arm/src/lpc31xx/lpc31_i2c.c
index 880a002108..f57852bc6f 100644
--- a/arch/arm/src/lpc31xx/lpc31_i2c.c
+++ b/arch/arm/src/lpc31xx/lpc31_i2c.c
@@ -47,6 +47,7 @@
 #include "lpc31_i2c.h"
 #include "lpc31_evntrtr.h"
 #include "lpc31_syscreg.h"
+#include "lpc31_cgudrvr.h"
 
 /****************************************************************************
  * Pre-processor Definitions
diff --git a/arch/arm/src/lpc31xx/lpc31_spi.c b/arch/arm/src/lpc31xx/lpc31_spi.c
index 7d897029a9..f017a496b1 100644
--- a/arch/arm/src/lpc31xx/lpc31_spi.c
+++ b/arch/arm/src/lpc31xx/lpc31_spi.c
@@ -39,6 +39,7 @@
 
 #include "lpc31_spi.h"
 #include "lpc31_ioconfig.h"
+#include "lpc31_cgudrvr.h"
 
 /****************************************************************************
  * Pre-processor Definitions
diff --git a/arch/arm/src/lpc31xx/lpc31_timerisr.c 
b/arch/arm/src/lpc31xx/lpc31_timerisr.c
index 22144f863f..2d87483a14 100644
--- a/arch/arm/src/lpc31xx/lpc31_timerisr.c
+++ b/arch/arm/src/lpc31xx/lpc31_timerisr.c
@@ -35,6 +35,7 @@
 #include "arm_internal.h"
 #include "lpc31_timer.h"
 #include "lpc31.h"
+#include "lpc31_cgudrvr.h"
 
 /****************************************************************************
  * Private Functions
diff --git a/arch/arm/src/lpc31xx/lpc31_usbdev.c 
b/arch/arm/src/lpc31xx/lpc31_usbdev.c
index 33a92af00a..9bb1176972 100644
--- a/arch/arm/src/lpc31xx/lpc31_usbdev.c
+++ b/arch/arm/src/lpc31xx/lpc31_usbdev.c
@@ -47,6 +47,7 @@
 #include "lpc31_usbotg.h"
 #include "lpc31_evntrtr.h"
 #include "lpc31_syscreg.h"
+#include "lpc31_cgudrvr.h"
 
 /****************************************************************************
  * Pre-processor Definitions
diff --git a/arch/risc-v/src/mpfs/mpfs_cache.c 
b/arch/risc-v/src/mpfs/mpfs_cache.c
index b149a2416d..c73cb565a2 100644
--- a/arch/risc-v/src/mpfs/mpfs_cache.c
+++ b/arch/risc-v/src/mpfs/mpfs_cache.c
@@ -31,6 +31,7 @@
 #include <arch/board/board.h>
 #include <arch/board/board_liberodefs.h>
 
+#include "mpfs_gpio.h"
 #include "riscv_internal.h"
 #include "hardware/mpfs_cache.h"
 
diff --git a/arch/risc-v/src/mpfs/mpfs_corespi.c 
b/arch/risc-v/src/mpfs/mpfs_corespi.c
index 43b1cacf3a..a14b5cb634 100644
--- a/arch/risc-v/src/mpfs/mpfs_corespi.c
+++ b/arch/risc-v/src/mpfs/mpfs_corespi.c
@@ -40,6 +40,7 @@
 
 #include <arch/board/board.h>
 
+#include "mpfs_gpio.h"
 #include "mpfs_corespi.h"
 #include "hardware/mpfs_corespi.h"
 #include "hardware/mpfs_sysreg.h"
diff --git a/arch/risc-v/src/mpfs/mpfs_i2c.c b/arch/risc-v/src/mpfs/mpfs_i2c.c
index 23843a0981..26fa4408eb 100644
--- a/arch/risc-v/src/mpfs/mpfs_i2c.c
+++ b/arch/risc-v/src/mpfs/mpfs_i2c.c
@@ -43,6 +43,7 @@
 
 #include <arch/board/board.h>
 
+#include "mpfs_gpio.h"
 #include "mpfs_i2c.h"
 #include "riscv_internal.h"
 #include "hardware/mpfs_i2c.h"
diff --git a/arch/risc-v/src/mpfs/mpfs_spi.c b/arch/risc-v/src/mpfs/mpfs_spi.c
index 5179b0e59d..4b8d78c502 100644
--- a/arch/risc-v/src/mpfs/mpfs_spi.c
+++ b/arch/risc-v/src/mpfs/mpfs_spi.c
@@ -40,6 +40,7 @@
 
 #include <arch/board/board.h>
 
+#include "mpfs_gpio.h"
 #include "mpfs_spi.h"
 #include "hardware/mpfs_spi.h"
 #include "hardware/mpfs_sysreg.h"
diff --git a/arch/risc-v/src/mpfs/mpfs_usb.c b/arch/risc-v/src/mpfs/mpfs_usb.c
index 6df832a605..36d1d3deab 100644
--- a/arch/risc-v/src/mpfs/mpfs_usb.c
+++ b/arch/risc-v/src/mpfs/mpfs_usb.c
@@ -50,6 +50,7 @@
 #include <arch/board/board.h>
 
 #include "hardware/mpfs_usb.h"
+#include "mpfs_gpio.h"
 #include "riscv_internal.h"
 #include "chip.h"
 
diff --git a/boards/arm/a1x/pcduino-a10/include/board.h 
b/boards/arm/a1x/pcduino-a10/include/board.h
index f3fc3bdafd..62e839a05f 100644
--- a/boards/arm/a1x/pcduino-a10/include/board.h
+++ b/boards/arm/a1x/pcduino-a10/include/board.h
@@ -27,8 +27,6 @@
 
 #include <nuttx/config.h>
 
-#include "hardware/a1x_piocfg.h"
-
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
diff --git a/boards/arm/am335x/beaglebone-black/include/board.h 
b/boards/arm/am335x/beaglebone-black/include/board.h
index 9e61704fab..45478f8dba 100644
--- a/boards/arm/am335x/beaglebone-black/include/board.h
+++ b/boards/arm/am335x/beaglebone-black/include/board.h
@@ -27,8 +27,6 @@
 
 #include <nuttx/config.h>
 
-#include "hardware/am335x_pinmux.h"
-
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
diff --git a/boards/arm/efm32/efm32-g8xx-stk/include/board.h 
b/boards/arm/efm32/efm32-g8xx-stk/include/board.h
index dd8b3fa3c6..4eaee3c32e 100644
--- a/boards/arm/efm32/efm32-g8xx-stk/include/board.h
+++ b/boards/arm/efm32/efm32-g8xx-stk/include/board.h
@@ -27,11 +27,6 @@
 
 #include <nuttx/config.h>
 
-#include <stdbool.h>
-
-#include "hardware/efm32_cmu.h"
-#include "hardware/efm32_usart.h"
-
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
diff --git a/boards/arm/efm32/efm32gg-stk3700/include/board.h 
b/boards/arm/efm32/efm32gg-stk3700/include/board.h
index 45780fb3db..2a2204c09f 100644
--- a/boards/arm/efm32/efm32gg-stk3700/include/board.h
+++ b/boards/arm/efm32/efm32gg-stk3700/include/board.h
@@ -27,11 +27,6 @@
 
 #include <nuttx/config.h>
 
-#include <stdbool.h>
-
-#include "hardware/efm32_cmu.h"
-#include "hardware/efm32_usart.h"
-
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
diff --git a/boards/arm/efm32/olimex-efm32g880f128-stk/include/board.h 
b/boards/arm/efm32/olimex-efm32g880f128-stk/include/board.h
index b43c14f0af..757b08d197 100644
--- a/boards/arm/efm32/olimex-efm32g880f128-stk/include/board.h
+++ b/boards/arm/efm32/olimex-efm32g880f128-stk/include/board.h
@@ -27,11 +27,6 @@
 
 #include <nuttx/config.h>
 
-#include <stdbool.h>
-
-#include "hardware/efm32_cmu.h"
-#include "hardware/efm32_usart.h"
-
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
diff --git a/boards/arm/eoss3/quickfeather/include/board.h 
b/boards/arm/eoss3/quickfeather/include/board.h
index ef0b0f5ab3..5bff748dc5 100644
--- a/boards/arm/eoss3/quickfeather/include/board.h
+++ b/boards/arm/eoss3/quickfeather/include/board.h
@@ -26,8 +26,6 @@
 
 #include <nuttx/config.h>
 
-#include "eoss3_gpio.h"
-
 #define BOARD_HCLK_FREQUENCY 79790000
 #define BOARD_CPU_FREQUENCY  79790000
 
diff --git a/boards/arm/eoss3/quickfeather/src/eoss3_autoleds.c 
b/boards/arm/eoss3/quickfeather/src/eoss3_autoleds.c
index 47a00f2773..55f4fb09a5 100644
--- a/boards/arm/eoss3/quickfeather/src/eoss3_autoleds.c
+++ b/boards/arm/eoss3/quickfeather/src/eoss3_autoleds.c
@@ -32,6 +32,7 @@
 
 #include "chip.h"
 #include "arm_internal.h"
+#include "eoss3_gpio.h"
 
 #ifdef CONFIG_ARCH_LEDS
 
diff --git a/boards/arm/lpc31xx/ea3131/include/board.h 
b/boards/arm/lpc31xx/ea3131/include/board.h
index 4ad559d886..a08233d3e5 100644
--- a/boards/arm/lpc31xx/ea3131/include/board.h
+++ b/boards/arm/lpc31xx/ea3131/include/board.h
@@ -28,7 +28,6 @@
 #include <nuttx/config.h>
 #ifndef __ASSEMBLY__
 #  include <stdint.h>
-#  include "lpc31_cgudrvr.h"
 #endif
 
 /****************************************************************************
diff --git a/boards/arm/lpc31xx/ea3152/include/board.h 
b/boards/arm/lpc31xx/ea3152/include/board.h
index 396962753d..1b00d927e7 100644
--- a/boards/arm/lpc31xx/ea3152/include/board.h
+++ b/boards/arm/lpc31xx/ea3152/include/board.h
@@ -28,7 +28,6 @@
 #include <nuttx/config.h>
 #ifndef __ASSEMBLY__
 #  include <stdint.h>
-#  include "lpc31_cgudrvr.h"
 #endif
 
 /****************************************************************************
diff --git a/boards/arm/lpc31xx/olimex-lpc-h3131/include/board.h 
b/boards/arm/lpc31xx/olimex-lpc-h3131/include/board.h
index 9d54ec1d4d..b95a1ebfd8 100644
--- a/boards/arm/lpc31xx/olimex-lpc-h3131/include/board.h
+++ b/boards/arm/lpc31xx/olimex-lpc-h3131/include/board.h
@@ -28,7 +28,6 @@
 #include <nuttx/config.h>
 #ifndef __ASSEMBLY__
 #  include <stdint.h>
-#  include "lpc31_cgudrvr.h"
 #endif
 
 /****************************************************************************
diff --git a/boards/arm/nrf53/nrf5340-dk/include/board.h 
b/boards/arm/nrf53/nrf5340-dk/include/board.h
index e535d03f0a..a36181494f 100644
--- a/boards/arm/nrf53/nrf5340-dk/include/board.h
+++ b/boards/arm/nrf53/nrf5340-dk/include/board.h
@@ -32,8 +32,6 @@
 #  include <nuttx/irq.h>
 #endif
 
-#include "hardware/nrf53_osc.h"
-
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
diff --git a/boards/arm/nrf53/thingy53/include/board.h 
b/boards/arm/nrf53/thingy53/include/board.h
index 3e86a7b0ed..f99d4046e8 100644
--- a/boards/arm/nrf53/thingy53/include/board.h
+++ b/boards/arm/nrf53/thingy53/include/board.h
@@ -32,8 +32,6 @@
 #  include <nuttx/irq.h>
 #endif
 
-#include "hardware/nrf53_osc.h"
-
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
diff --git a/boards/arm/sama5/giant-board/include/board_sdram.h 
b/boards/arm/sama5/giant-board/include/board_sdram.h
index c61bb5f9ca..40239999ce 100644
--- a/boards/arm/sama5/giant-board/include/board_sdram.h
+++ b/boards/arm/sama5/giant-board/include/board_sdram.h
@@ -26,7 +26,6 @@
  ****************************************************************************/
 
 #include <nuttx/config.h>
-#include "sam_pmc.h"
 
 /****************************************************************************
  * Pre-processor Definitions
diff --git a/boards/arm/sama5/jupiter-nano/include/board_sdram.h 
b/boards/arm/sama5/jupiter-nano/include/board_sdram.h
index dc75541158..ab7e9216a6 100644
--- a/boards/arm/sama5/jupiter-nano/include/board_sdram.h
+++ b/boards/arm/sama5/jupiter-nano/include/board_sdram.h
@@ -26,7 +26,6 @@
  ****************************************************************************/
 
 #include <nuttx/config.h>
-#include "sam_pmc.h"
 
 /****************************************************************************
  * Pre-processor Definitions
diff --git a/boards/arm/sama5/sama5d2-xult/include/board_sdram.h 
b/boards/arm/sama5/sama5d2-xult/include/board_sdram.h
index d1920d243b..1b63566dc9 100644
--- a/boards/arm/sama5/sama5d2-xult/include/board_sdram.h
+++ b/boards/arm/sama5/sama5d2-xult/include/board_sdram.h
@@ -26,7 +26,6 @@
  ****************************************************************************/
 
 #include <nuttx/config.h>
-#include "sam_pmc.h"
 
 /****************************************************************************
  * Pre-processor Definitions
diff --git a/boards/arm/sama5/sama5d3-xplained/include/board_sdram.h 
b/boards/arm/sama5/sama5d3-xplained/include/board_sdram.h
index 697534325f..7bd2f6d401 100644
--- a/boards/arm/sama5/sama5d3-xplained/include/board_sdram.h
+++ b/boards/arm/sama5/sama5d3-xplained/include/board_sdram.h
@@ -26,7 +26,6 @@
  ****************************************************************************/
 
 #include <nuttx/config.h>
-#include "sam_pmc.h"
 
 /****************************************************************************
  * Pre-processor Definitions
diff --git a/boards/arm/sama5/sama5d3x-ek/include/board_sdram.h 
b/boards/arm/sama5/sama5d3x-ek/include/board_sdram.h
index 966b4bcc89..461fb34aca 100644
--- a/boards/arm/sama5/sama5d3x-ek/include/board_sdram.h
+++ b/boards/arm/sama5/sama5d3x-ek/include/board_sdram.h
@@ -26,7 +26,6 @@
  ****************************************************************************/
 
 #include <nuttx/config.h>
-#include "sam_pmc.h"
 
 /****************************************************************************
  * Pre-processor Definitions
diff --git a/boards/arm/sama5/sama5d4-ek/include/board_sdram.h 
b/boards/arm/sama5/sama5d4-ek/include/board_sdram.h
index bc8ea43f7a..279c91316a 100644
--- a/boards/arm/sama5/sama5d4-ek/include/board_sdram.h
+++ b/boards/arm/sama5/sama5d4-ek/include/board_sdram.h
@@ -26,7 +26,6 @@
  ****************************************************************************/
 
 #include <nuttx/config.h>
-#include "sam_pmc.h"
 
 /****************************************************************************
  * Pre-processor Definitions
diff --git a/boards/arm/stm32/clicker2-stm32/include/board.h 
b/boards/arm/stm32/clicker2-stm32/include/board.h
index f13ffc0884..a72941fa20 100644
--- a/boards/arm/stm32/clicker2-stm32/include/board.h
+++ b/boards/arm/stm32/clicker2-stm32/include/board.h
@@ -32,12 +32,6 @@
 #  include <stdbool.h>
 #endif
 
-#ifdef __KERNEL__
-#  include "stm32_rcc.h"
-#  include "stm32_sdio.h"
-#  include "stm32.h"
-#endif
-
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
diff --git a/boards/arm/stm32/cloudctrl/include/board.h 
b/boards/arm/stm32/cloudctrl/include/board.h
index f19fd6920e..45ca2feb71 100644
--- a/boards/arm/stm32/cloudctrl/include/board.h
+++ b/boards/arm/stm32/cloudctrl/include/board.h
@@ -30,9 +30,6 @@
 #ifndef __ASSEMBLY__
 #  include <stdint.h>
 #endif
-#include "stm32_rcc.h"
-#include "stm32_sdio.h"
-#include "stm32.h"
 
 #include <nuttx/arch.h>
 
diff --git a/boards/arm/stm32/emw3162/include/board.h 
b/boards/arm/stm32/emw3162/include/board.h
index cfddfd9a32..219653b776 100644
--- a/boards/arm/stm32/emw3162/include/board.h
+++ b/boards/arm/stm32/emw3162/include/board.h
@@ -31,9 +31,6 @@
 #  include <stdbool.h>
 #endif
 
-#include "stm32_rcc.h"
-#include "stm32.h"
-
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
diff --git a/boards/arm/stm32/emw3162/src/stm32_wlan.c 
b/boards/arm/stm32/emw3162/src/stm32_wlan.c
index b02afebf5b..ade3872b74 100644
--- a/boards/arm/stm32/emw3162/src/stm32_wlan.c
+++ b/boards/arm/stm32/emw3162/src/stm32_wlan.c
@@ -31,6 +31,7 @@
 
 #include <arch/board/board.h>
 
+#include "stm32.h"
 #include "stm32_gpio.h"
 #include "stm32_sdio.h"
 
diff --git a/boards/arm/stm32/et-stm32-stamp/include/board.h 
b/boards/arm/stm32/et-stm32-stamp/include/board.h
index 9f320938fb..c84cdd480e 100644
--- a/boards/arm/stm32/et-stm32-stamp/include/board.h
+++ b/boards/arm/stm32/et-stm32-stamp/include/board.h
@@ -29,9 +29,6 @@
 #ifndef __ASSEMBLY__
 #  include <stdint.h>
 #endif
-#include "stm32_rcc.h"
-#include "stm32_sdio.h"
-#include "stm32.h"
 
 /****************************************************************************
  * Pre-processor Definitions
diff --git a/boards/arm/stm32/fire-stm32v2/include/board.h 
b/boards/arm/stm32/fire-stm32v2/include/board.h
index ec66055d85..4ad2425f71 100644
--- a/boards/arm/stm32/fire-stm32v2/include/board.h
+++ b/boards/arm/stm32/fire-stm32v2/include/board.h
@@ -29,9 +29,6 @@
 #ifndef __ASSEMBLY__
 #  include <stdint.h>
 #endif
-#include "stm32_rcc.h"
-#include "stm32_sdio.h"
-#include "stm32.h"
 
 /****************************************************************************
  * Pre-processor Definitions
diff --git a/boards/arm/stm32/maple/include/board.h 
b/boards/arm/stm32/maple/include/board.h
index be1dc4162b..e57a32d67b 100644
--- a/boards/arm/stm32/maple/include/board.h
+++ b/boards/arm/stm32/maple/include/board.h
@@ -29,9 +29,6 @@
 #ifndef __ASSEMBLY__
 #  include <stdint.h>
 #endif
-#include "stm32_rcc.h"
-#include "stm32_sdio.h"
-#include "stm32.h"
 
 /****************************************************************************
  * Pre-processor Definitions
diff --git a/boards/arm/stm32/mikroe-stm32f4/include/board.h 
b/boards/arm/stm32/mikroe-stm32f4/include/board.h
index 1c4334b961..d648fd21c3 100644
--- a/boards/arm/stm32/mikroe-stm32f4/include/board.h
+++ b/boards/arm/stm32/mikroe-stm32f4/include/board.h
@@ -31,10 +31,6 @@
 #  include <stdint.h>
 #endif
 
-#include "stm32_rcc.h"
-#include "stm32_sdio.h"
-#include "stm32.h"
-
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
diff --git a/boards/arm/stm32/mikroe-stm32f4/src/mikroe-stm32f4.h 
b/boards/arm/stm32/mikroe-stm32f4/src/mikroe-stm32f4.h
index 8dae92c49e..905ff26c57 100644
--- a/boards/arm/stm32/mikroe-stm32f4/src/mikroe-stm32f4.h
+++ b/boards/arm/stm32/mikroe-stm32f4/src/mikroe-stm32f4.h
@@ -29,6 +29,8 @@
 #include <nuttx/compiler.h>
 #include <stdint.h>
 
+#include "stm32.h"
+
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
diff --git a/boards/arm/stm32/mikroe-stm32f4/src/stm32_clockconfig.c 
b/boards/arm/stm32/mikroe-stm32f4/src/stm32_clockconfig.c
index 20693bb07f..efe0da6320 100644
--- a/boards/arm/stm32/mikroe-stm32f4/src/stm32_clockconfig.c
+++ b/boards/arm/stm32/mikroe-stm32f4/src/stm32_clockconfig.c
@@ -28,6 +28,8 @@
 
 #include <arch/board/board.h>
 
+#include "stm32.h"
+
 #include "arm_internal.h"
 #include "mikroe-stm32f4.h"
 
diff --git a/boards/arm/stm32/nucleo-f103rb/include/board.h 
b/boards/arm/stm32/nucleo-f103rb/include/board.h
index 829f49be62..fb790f619a 100644
--- a/boards/arm/stm32/nucleo-f103rb/include/board.h
+++ b/boards/arm/stm32/nucleo-f103rb/include/board.h
@@ -32,10 +32,6 @@
 #  include <stdbool.h>
 #endif
 
-#ifdef __KERNEL__
-#  include "stm32.h"
-#endif
-
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
diff --git a/boards/arm/stm32/nucleo-f207zg/include/board.h 
b/boards/arm/stm32/nucleo-f207zg/include/board.h
index 6f0bd850cb..5128290f99 100644
--- a/boards/arm/stm32/nucleo-f207zg/include/board.h
+++ b/boards/arm/stm32/nucleo-f207zg/include/board.h
@@ -32,10 +32,6 @@
 #  include <stdbool.h>
 #endif
 
-#ifdef __KERNEL__
-#  include "stm32.h"
-#endif
-
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
diff --git a/boards/arm/stm32/nucleo-f302r8/include/board.h 
b/boards/arm/stm32/nucleo-f302r8/include/board.h
index e28ead35be..0864882a4d 100644
--- a/boards/arm/stm32/nucleo-f302r8/include/board.h
+++ b/boards/arm/stm32/nucleo-f302r8/include/board.h
@@ -32,10 +32,6 @@
 #  include <stdbool.h>
 #endif
 
-#ifdef __KERNEL__
-#  include "stm32.h"
-#endif
-
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
diff --git a/boards/arm/stm32/nucleo-f303re/include/board.h 
b/boards/arm/stm32/nucleo-f303re/include/board.h
index af6d2fdf2f..2ff97dd7c0 100644
--- a/boards/arm/stm32/nucleo-f303re/include/board.h
+++ b/boards/arm/stm32/nucleo-f303re/include/board.h
@@ -32,10 +32,6 @@
 #  include <stdbool.h>
 #endif
 
-#ifdef __KERNEL__
-#  include "stm32.h"
-#endif
-
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
diff --git a/boards/arm/stm32/nucleo-f303re/src/nucleo-f303re.h 
b/boards/arm/stm32/nucleo-f303re/src/nucleo-f303re.h
index 77a63905fb..0d738552b9 100644
--- a/boards/arm/stm32/nucleo-f303re/src/nucleo-f303re.h
+++ b/boards/arm/stm32/nucleo-f303re/src/nucleo-f303re.h
@@ -27,6 +27,8 @@
 
 #include <nuttx/config.h>
 
+#include "stm32.h"
+
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
diff --git a/boards/arm/stm32/nucleo-f303ze/include/board.h 
b/boards/arm/stm32/nucleo-f303ze/include/board.h
index a3b5f0cdc5..10eb78a232 100644
--- a/boards/arm/stm32/nucleo-f303ze/include/board.h
+++ b/boards/arm/stm32/nucleo-f303ze/include/board.h
@@ -32,10 +32,6 @@
 #  include <stdbool.h>
 #endif
 
-#ifdef __KERNEL__
-#  include "stm32.h"
-#endif
-
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
diff --git a/boards/arm/stm32/nucleo-f334r8/include/board.h 
b/boards/arm/stm32/nucleo-f334r8/include/board.h
index d6a1098e04..8f066bdec2 100644
--- a/boards/arm/stm32/nucleo-f334r8/include/board.h
+++ b/boards/arm/stm32/nucleo-f334r8/include/board.h
@@ -32,10 +32,6 @@
 #  include <stdbool.h>
 #endif
 
-#ifdef __KERNEL__
-#  include "stm32.h"
-#endif
-
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
diff --git a/boards/arm/stm32/nucleo-f410rb/include/board.h 
b/boards/arm/stm32/nucleo-f410rb/include/board.h
index 9af176003a..cab633f753 100644
--- a/boards/arm/stm32/nucleo-f410rb/include/board.h
+++ b/boards/arm/stm32/nucleo-f410rb/include/board.h
@@ -30,10 +30,6 @@
 #  include <stdint.h>
 #endif
 
-#ifdef __KERNEL__
-#  include "stm32.h"
-#endif
-
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
diff --git a/boards/arm/stm32/nucleo-f410rb/src/nucleo-f410rb.h 
b/boards/arm/stm32/nucleo-f410rb/src/nucleo-f410rb.h
index a2c8477004..91f927993a 100644
--- a/boards/arm/stm32/nucleo-f410rb/src/nucleo-f410rb.h
+++ b/boards/arm/stm32/nucleo-f410rb/src/nucleo-f410rb.h
@@ -30,6 +30,8 @@
 
 #include <stdint.h>
 
+#include "stm32.h"
+
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
diff --git a/boards/arm/stm32/nucleo-f412zg/include/board.h 
b/boards/arm/stm32/nucleo-f412zg/include/board.h
index 15e9918690..20f07e88c9 100644
--- a/boards/arm/stm32/nucleo-f412zg/include/board.h
+++ b/boards/arm/stm32/nucleo-f412zg/include/board.h
@@ -30,8 +30,6 @@
 #  include <stdint.h>
 #endif
 
-#include <stm32.h>
-
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
diff --git a/boards/arm/stm32/nucleo-f446re/include/board.h 
b/boards/arm/stm32/nucleo-f446re/include/board.h
index fdbec261b6..5a091d1ff4 100644
--- a/boards/arm/stm32/nucleo-f446re/include/board.h
+++ b/boards/arm/stm32/nucleo-f446re/include/board.h
@@ -30,8 +30,6 @@
 #  include <stdint.h>
 #endif
 
-#include <stm32.h>
-
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
diff --git a/boards/arm/stm32/nucleo-f446re/src/nucleo-f446re.h 
b/boards/arm/stm32/nucleo-f446re/src/nucleo-f446re.h
index 5141989ecf..15c398f140 100644
--- a/boards/arm/stm32/nucleo-f446re/src/nucleo-f446re.h
+++ b/boards/arm/stm32/nucleo-f446re/src/nucleo-f446re.h
@@ -30,6 +30,8 @@
 
 #include <stdint.h>
 
+#include <stm32.h>
+
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
diff --git a/boards/arm/stm32/nucleo-l152re/include/board.h 
b/boards/arm/stm32/nucleo-l152re/include/board.h
index e553ebd142..9ada0180d3 100644
--- a/boards/arm/stm32/nucleo-l152re/include/board.h
+++ b/boards/arm/stm32/nucleo-l152re/include/board.h
@@ -32,10 +32,6 @@
 #  include <stdbool.h>
 #endif
 
-#ifdef __KERNEL__
-#  include "stm32.h"
-#endif
-
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
diff --git a/boards/arm/stm32/nucleo-l152re/src/nucleo-l152re.h 
b/boards/arm/stm32/nucleo-l152re/src/nucleo-l152re.h
index e8b3b9ea7c..924aabd953 100644
--- a/boards/arm/stm32/nucleo-l152re/src/nucleo-l152re.h
+++ b/boards/arm/stm32/nucleo-l152re/src/nucleo-l152re.h
@@ -27,6 +27,8 @@
 
 #include <nuttx/config.h>
 
+#include "stm32.h"
+
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
diff --git a/boards/arm/stm32/olimex-stm32-e407/include/board.h 
b/boards/arm/stm32/olimex-stm32-e407/include/board.h
index 9bf3f76c50..31ab12112e 100644
--- a/boards/arm/stm32/olimex-stm32-e407/include/board.h
+++ b/boards/arm/stm32/olimex-stm32-e407/include/board.h
@@ -32,12 +32,6 @@
 #  include <stdbool.h>
 #endif
 
-#ifdef __KERNEL__
-#  include "stm32_rcc.h"
-#  include "stm32_sdio.h"
-#  include "stm32.h"
-#endif
-
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
diff --git a/boards/arm/stm32/olimex-stm32-e407/src/olimex-stm32-e407.h 
b/boards/arm/stm32/olimex-stm32-e407/src/olimex-stm32-e407.h
index 3d648bc1aa..be9372946e 100644
--- a/boards/arm/stm32/olimex-stm32-e407/src/olimex-stm32-e407.h
+++ b/boards/arm/stm32/olimex-stm32-e407/src/olimex-stm32-e407.h
@@ -30,6 +30,8 @@
 #include <stdint.h>
 #include <arch/stm32/chip.h>
 
+#include "stm32.h"
+
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
diff --git a/boards/arm/stm32/olimex-stm32-h405/include/board.h 
b/boards/arm/stm32/olimex-stm32-h405/include/board.h
index 7b08b24128..fe975e8e00 100644
--- a/boards/arm/stm32/olimex-stm32-h405/include/board.h
+++ b/boards/arm/stm32/olimex-stm32-h405/include/board.h
@@ -30,8 +30,6 @@
 #ifndef __ASSEMBLY__
 #  include <stdint.h>
 #endif
-#include "stm32_rcc.h"
-#include "stm32.h"
 
 /****************************************************************************
  * Pre-processor Definitions
diff --git a/boards/arm/stm32/olimex-stm32-h405/src/olimex-stm32-h405.h 
b/boards/arm/stm32/olimex-stm32-h405/src/olimex-stm32-h405.h
index 9e1e9daebe..cd967d9acd 100644
--- a/boards/arm/stm32/olimex-stm32-h405/src/olimex-stm32-h405.h
+++ b/boards/arm/stm32/olimex-stm32-h405/src/olimex-stm32-h405.h
@@ -29,6 +29,8 @@
 #include <nuttx/compiler.h>
 #include <stdint.h>
 
+#include "stm32.h"
+
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
diff --git a/boards/arm/stm32/olimex-stm32-h407/include/board.h 
b/boards/arm/stm32/olimex-stm32-h407/include/board.h
index dd963cf550..4846e805d4 100644
--- a/boards/arm/stm32/olimex-stm32-h407/include/board.h
+++ b/boards/arm/stm32/olimex-stm32-h407/include/board.h
@@ -32,12 +32,6 @@
 #  include <stdbool.h>
 #endif
 
-#ifdef __KERNEL__
-#  include "stm32_rcc.h"
-#  include "stm32_sdio.h"
-#  include "stm32.h"
-#endif
-
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
diff --git a/boards/arm/stm32/olimex-stm32-h407/src/olimex-stm32-h407.h 
b/boards/arm/stm32/olimex-stm32-h407/src/olimex-stm32-h407.h
index 714272573d..3d9bd09aa7 100644
--- a/boards/arm/stm32/olimex-stm32-h407/src/olimex-stm32-h407.h
+++ b/boards/arm/stm32/olimex-stm32-h407/src/olimex-stm32-h407.h
@@ -29,6 +29,8 @@
 #include <nuttx/compiler.h>
 #include <stdint.h>
 
+#include "stm32.h"
+
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
diff --git a/boards/arm/stm32/olimex-stm32-p107/include/board.h 
b/boards/arm/stm32/olimex-stm32-p107/include/board.h
index 70011140ed..02d7db4f7c 100644
--- a/boards/arm/stm32/olimex-stm32-p107/include/board.h
+++ b/boards/arm/stm32/olimex-stm32-p107/include/board.h
@@ -30,9 +30,6 @@
 #ifndef __ASSEMBLY__
 #  include <stdint.h>
 #endif
-#include "stm32_rcc.h"
-#include "stm32_sdio.h"
-#include "stm32.h"
 
 /****************************************************************************
  * Pre-processor Definitions
diff --git a/boards/arm/stm32/olimex-stm32-p207/include/board.h 
b/boards/arm/stm32/olimex-stm32-p207/include/board.h
index 7529b45ffe..3a2eb8f6fd 100644
--- a/boards/arm/stm32/olimex-stm32-p207/include/board.h
+++ b/boards/arm/stm32/olimex-stm32-p207/include/board.h
@@ -30,8 +30,6 @@
 #ifndef __ASSEMBLY__
 #  include <stdint.h>
 #endif
-#include "stm32_rcc.h"
-#include "stm32.h"
 
 /****************************************************************************
  * Pre-processor Definitions
diff --git a/boards/arm/stm32/olimex-stm32-p207/src/olimex-stm32-p207.h 
b/boards/arm/stm32/olimex-stm32-p207/src/olimex-stm32-p207.h
index 8334d0548e..b46f1b7c67 100644
--- a/boards/arm/stm32/olimex-stm32-p207/src/olimex-stm32-p207.h
+++ b/boards/arm/stm32/olimex-stm32-p207/src/olimex-stm32-p207.h
@@ -29,6 +29,8 @@
 #include <nuttx/compiler.h>
 #include <stdint.h>
 
+#include "stm32.h"
+
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
diff --git a/boards/arm/stm32/olimexino-stm32/include/board.h 
b/boards/arm/stm32/olimexino-stm32/include/board.h
index 28fcc560f1..d5e05494f6 100644
--- a/boards/arm/stm32/olimexino-stm32/include/board.h
+++ b/boards/arm/stm32/olimexino-stm32/include/board.h
@@ -30,9 +30,6 @@
 #ifndef __ASSEMBLY__
 #  include <stdint.h>
 #endif
-#include "stm32_rcc.h"
-#include "stm32_sdio.h"
-#include "stm32.h"
 
 /****************************************************************************
  * Pre-processor Definitions
diff --git a/boards/arm/stm32/olimexino-stm32/src/olimexino-stm32.h 
b/boards/arm/stm32/olimexino-stm32/src/olimexino-stm32.h
index 8d8700bd06..a37d842a60 100644
--- a/boards/arm/stm32/olimexino-stm32/src/olimexino-stm32.h
+++ b/boards/arm/stm32/olimexino-stm32/src/olimexino-stm32.h
@@ -29,6 +29,8 @@
 #include <nuttx/compiler.h>
 #include <stdint.h>
 
+#include "stm32.h"
+
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
diff --git a/boards/arm/stm32/photon/include/board.h 
b/boards/arm/stm32/photon/include/board.h
index 3b22428ce2..f6ab716aa8 100644
--- a/boards/arm/stm32/photon/include/board.h
+++ b/boards/arm/stm32/photon/include/board.h
@@ -31,9 +31,6 @@
 #  include <stdbool.h>
 #endif
 
-#include "stm32_rcc.h"
-#include "stm32.h"
-
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
diff --git a/boards/arm/stm32/shenzhou/include/board.h 
b/boards/arm/stm32/shenzhou/include/board.h
index 2def16658d..56bee159c5 100644
--- a/boards/arm/stm32/shenzhou/include/board.h
+++ b/boards/arm/stm32/shenzhou/include/board.h
@@ -30,9 +30,6 @@
 #ifndef __ASSEMBLY__
 #  include <stdint.h>
 #endif
-#include "stm32_rcc.h"
-#include "stm32_sdio.h"
-#include "stm32.h"
 
 #include <nuttx/arch.h>
 
diff --git a/boards/arm/stm32/stm3220g-eval/include/board.h 
b/boards/arm/stm32/stm3220g-eval/include/board.h
index a6ad0f2bba..35210863d4 100644
--- a/boards/arm/stm32/stm3220g-eval/include/board.h
+++ b/boards/arm/stm32/stm3220g-eval/include/board.h
@@ -31,10 +31,6 @@
 #  include <stdint.h>
 #endif
 
-#include "stm32_rcc.h"
-#include "stm32_sdio.h"
-#include "stm32.h"
-
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
diff --git a/boards/arm/stm32/stm32_tiny/include/board.h 
b/boards/arm/stm32/stm32_tiny/include/board.h
index 144824627a..0b0b5c5217 100644
--- a/boards/arm/stm32/stm32_tiny/include/board.h
+++ b/boards/arm/stm32/stm32_tiny/include/board.h
@@ -29,9 +29,6 @@
 #ifndef __ASSEMBLY__
 #  include <stdint.h>
 #endif
-#include "stm32_rcc.h"
-#include "stm32_sdio.h"
-#include "stm32.h"
 
 /****************************************************************************
  * Pre-processor Definitions
diff --git a/boards/arm/stm32/stm32butterfly2/include/board.h 
b/boards/arm/stm32/stm32butterfly2/include/board.h
index 2f8c2533a1..d211b8d69b 100644
--- a/boards/arm/stm32/stm32butterfly2/include/board.h
+++ b/boards/arm/stm32/stm32butterfly2/include/board.h
@@ -31,8 +31,6 @@
 #  include <stdint.h>
 #endif
 
-#include "stm32_rcc.h"
-
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
diff --git a/boards/arm/stm32/stm32f334-disco/include/board.h 
b/boards/arm/stm32/stm32f334-disco/include/board.h
index f2fc020954..accf348d65 100644
--- a/boards/arm/stm32/stm32f334-disco/include/board.h
+++ b/boards/arm/stm32/stm32f334-disco/include/board.h
@@ -32,10 +32,6 @@
 #  include <stdbool.h>
 #endif
 
-#ifdef __KERNEL__
-#  include "stm32.h"
-#endif
-
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
diff --git a/boards/arm/stm32/stm32f3discovery/include/board.h 
b/boards/arm/stm32/stm32f3discovery/include/board.h
index 2fce70f079..d80ff61175 100644
--- a/boards/arm/stm32/stm32f3discovery/include/board.h
+++ b/boards/arm/stm32/stm32f3discovery/include/board.h
@@ -31,9 +31,6 @@
 #  include <stdint.h>
 #endif
 
-#include "stm32_rcc.h"
-#include "stm32.h"
-
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
diff --git a/boards/arm/stm32/stm32f3discovery/src/stm32f3discovery.h 
b/boards/arm/stm32/stm32f3discovery/src/stm32f3discovery.h
index 63cf065fee..54683a38c4 100644
--- a/boards/arm/stm32/stm32f3discovery/src/stm32f3discovery.h
+++ b/boards/arm/stm32/stm32f3discovery/src/stm32f3discovery.h
@@ -33,6 +33,8 @@
 
 #include <arch/stm32/chip.h>
 
+#include "stm32.h"
+
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
diff --git a/boards/arm/stm32/stm32f411-minimum/include/board.h 
b/boards/arm/stm32/stm32f411-minimum/include/board.h
index 492ad5ed0f..667c4541c1 100644
--- a/boards/arm/stm32/stm32f411-minimum/include/board.h
+++ b/boards/arm/stm32/stm32f411-minimum/include/board.h
@@ -30,8 +30,6 @@
 #  include <stdint.h>
 #endif
 
-#include <stm32.h>
-
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
diff --git a/boards/arm/stm32/stm32f411e-disco/include/board.h 
b/boards/arm/stm32/stm32f411e-disco/include/board.h
index 0e24099526..eff7ca44ef 100644
--- a/boards/arm/stm32/stm32f411e-disco/include/board.h
+++ b/boards/arm/stm32/stm32f411e-disco/include/board.h
@@ -30,8 +30,6 @@
 #  include <stdint.h>
 #endif
 
-#include <stm32.h>
-
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
diff --git a/boards/arm/stm32/stm32f411e-disco/src/stm32f411e-disco.h 
b/boards/arm/stm32/stm32f411e-disco/src/stm32f411e-disco.h
index d96708376d..6fde23331d 100644
--- a/boards/arm/stm32/stm32f411e-disco/src/stm32f411e-disco.h
+++ b/boards/arm/stm32/stm32f411e-disco/src/stm32f411e-disco.h
@@ -29,6 +29,7 @@
 #include <nuttx/compiler.h>
 
 #include <stdint.h>
+#include <stm32.h>
 
 /****************************************************************************
  * Pre-processor Definitions
diff --git a/boards/arm/stm32/stm32vldiscovery/include/board.h 
b/boards/arm/stm32/stm32vldiscovery/include/board.h
index 3a1de139b8..888714d99a 100644
--- a/boards/arm/stm32/stm32vldiscovery/include/board.h
+++ b/boards/arm/stm32/stm32vldiscovery/include/board.h
@@ -29,8 +29,6 @@
 #ifndef __ASSEMBLY__
 #  include <stdint.h>
 #endif
-#include "stm32_rcc.h"
-#include "stm32.h"
 
 /****************************************************************************
  * Pre-processor Definitions
diff --git a/boards/arm/stm32/viewtool-stm32f107/include/board-stm32f103vct6.h 
b/boards/arm/stm32/viewtool-stm32f107/include/board-stm32f103vct6.h
index ea70717d48..eb93cc0598 100644
--- a/boards/arm/stm32/viewtool-stm32f107/include/board-stm32f103vct6.h
+++ b/boards/arm/stm32/viewtool-stm32f107/include/board-stm32f103vct6.h
@@ -31,8 +31,6 @@
 #  include <stdint.h>
 #endif
 
-#include "stm32_rcc.h"
-
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
diff --git a/boards/arm/stm32/viewtool-stm32f107/include/board-stm32f107vct6.h 
b/boards/arm/stm32/viewtool-stm32f107/include/board-stm32f107vct6.h
index 5c1432bd62..6ca804ef99 100644
--- a/boards/arm/stm32/viewtool-stm32f107/include/board-stm32f107vct6.h
+++ b/boards/arm/stm32/viewtool-stm32f107/include/board-stm32f107vct6.h
@@ -31,8 +31,6 @@
 #  include <stdint.h>
 #endif
 
-#include "stm32_rcc.h"
-
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
diff --git a/boards/arm/stm32/viewtool-stm32f107/include/board.h 
b/boards/arm/stm32/viewtool-stm32f107/include/board.h
index 15ca0718dc..7503505def 100644
--- a/boards/arm/stm32/viewtool-stm32f107/include/board.h
+++ b/boards/arm/stm32/viewtool-stm32f107/include/board.h
@@ -31,10 +31,6 @@
 #  include <stdint.h>
 #endif
 
-#include "stm32_rcc.h"
-#include "stm32_sdio.h"
-#include "stm32.h"
-
 /* Clocking *****************************************************************/
 
 #if defined(CONFIG_ARCH_CHIP_STM32F107VC)
diff --git a/boards/arm/stm32/viewtool-stm32f107/src/viewtool_stm32f107.h 
b/boards/arm/stm32/viewtool-stm32f107/src/viewtool_stm32f107.h
index 294dd6cfed..1964fc0c57 100644
--- a/boards/arm/stm32/viewtool-stm32f107/src/viewtool_stm32f107.h
+++ b/boards/arm/stm32/viewtool-stm32f107/src/viewtool_stm32f107.h
@@ -29,6 +29,8 @@
 #include <nuttx/compiler.h>
 #include <stdint.h>
 
+#include "stm32_rcc.h"
+
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
diff --git a/boards/arm/stm32u5/b-u585i-iot02a/include/board.h 
b/boards/arm/stm32u5/b-u585i-iot02a/include/board.h
index 8e815d7811..2e68200f34 100644
--- a/boards/arm/stm32u5/b-u585i-iot02a/include/board.h
+++ b/boards/arm/stm32u5/b-u585i-iot02a/include/board.h
@@ -26,7 +26,6 @@
  ****************************************************************************/
 
 #include <nuttx/config.h>
-#include <stm32_gpio.h>
 #ifndef __ASSEMBLY__
 #  include <stdint.h>
 #endif
diff --git a/boards/arm/stm32u5/nucleo-u5a5zj-q/include/board.h 
b/boards/arm/stm32u5/nucleo-u5a5zj-q/include/board.h
index 4ed3b213dc..488806ea96 100644
--- a/boards/arm/stm32u5/nucleo-u5a5zj-q/include/board.h
+++ b/boards/arm/stm32u5/nucleo-u5a5zj-q/include/board.h
@@ -26,7 +26,6 @@
  ****************************************************************************/
 
 #include <nuttx/config.h>
-#include <stm32_gpio.h>
 #ifndef __ASSEMBLY__
 #  include <stdint.h>
 #endif
diff --git a/boards/arm/str71x/olimex-strp711/include/board.h 
b/boards/arm/str71x/olimex-strp711/include/board.h
index f62e34f552..1b95164883 100644
--- a/boards/arm/str71x/olimex-strp711/include/board.h
+++ b/boards/arm/str71x/olimex-strp711/include/board.h
@@ -58,7 +58,6 @@
 #ifndef __ASSEMBLY__
 #  include <stdint.h>
 #endif
-#include "chip.h"
 
 /****************************************************************************
  * Pre-processor Definitions
diff --git a/boards/risc-v/c906/smartl-c906/include/board.h 
b/boards/arm64/imx8/imx8qm-mek/include/board.h
similarity index 73%
copy from boards/risc-v/c906/smartl-c906/include/board.h
copy to boards/arm64/imx8/imx8qm-mek/include/board.h
index bd8298b8f4..1febff4812 100644
--- a/boards/risc-v/c906/smartl-c906/include/board.h
+++ b/boards/arm64/imx8/imx8qm-mek/include/board.h
@@ -1,5 +1,5 @@
 /****************************************************************************
- * boards/risc-v/c906/smartl-c906/include/board.h
+ * boards/arm64/imx8/imx8qm-mek/include/board.h
  *
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -18,8 +18,8 @@
  *
  ****************************************************************************/
 
-#ifndef __BOARDS_RISCV_C906_SMARTL_C906_INCLUDE_BOARD_H
-#define __BOARDS_RISCV_C906_SMARTL_C906_INCLUDE_BOARD_H
+#ifndef __BOARDS_ARM64_IMX8_IMX8QM-MEK_INCLUDE_BOARD_H
+#define __BOARDS_ARM64_IMX8_IMX8QM-MEK_INCLUDE_BOARD_H
 
 /****************************************************************************
  * Included Files
@@ -27,26 +27,16 @@
 
 #include <nuttx/config.h>
 
-#ifndef __ASSEMBLY__
-#  include <stdint.h>
-#endif
-
-#include "c906.h"
-
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
 
 /****************************************************************************
- * Public Types
+ * Public Data
  ****************************************************************************/
 
 #ifndef __ASSEMBLY__
 
-/****************************************************************************
- * Public Data
- ****************************************************************************/
-
 #undef EXTERN
 #if defined(__cplusplus)
 #define EXTERN extern "C"
@@ -60,15 +50,10 @@ extern "C"
  * Public Function Prototypes
  ****************************************************************************/
 
-/****************************************************************************
- * Name: c906_boardinitialize
- ****************************************************************************/
-
-void c906_boardinitialize(void);
-
 #undef EXTERN
 #if defined(__cplusplus)
 }
 #endif
+
 #endif /* __ASSEMBLY__ */
-#endif /* __BOARDS_RISCV_C906_SMARTL_C906_INCLUDE_BOARD_H */
+#endif /* __BOARDS_ARM64_IMX8_IMX8QM-MEK_INCLUDE_BOARD_H */
diff --git a/boards/risc-v/c906/smartl-c906/include/board.h 
b/boards/arm64/qemu/qemu-armv8a/include/board.h
similarity index 73%
copy from boards/risc-v/c906/smartl-c906/include/board.h
copy to boards/arm64/qemu/qemu-armv8a/include/board.h
index bd8298b8f4..0e20db0487 100644
--- a/boards/risc-v/c906/smartl-c906/include/board.h
+++ b/boards/arm64/qemu/qemu-armv8a/include/board.h
@@ -1,5 +1,5 @@
 /****************************************************************************
- * boards/risc-v/c906/smartl-c906/include/board.h
+ * boards/arm64/qemu/qemu-armv8a/include/board.h
  *
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -18,8 +18,8 @@
  *
  ****************************************************************************/
 
-#ifndef __BOARDS_RISCV_C906_SMARTL_C906_INCLUDE_BOARD_H
-#define __BOARDS_RISCV_C906_SMARTL_C906_INCLUDE_BOARD_H
+#ifndef __BOARDS_ARM64_QEMU_QEMU_ARMV8A_INCLUDE_BOARD_H
+#define __BOARDS_ARM64_QEMU_QEMU_ARMV8A_INCLUDE_BOARD_H
 
 /****************************************************************************
  * Included Files
@@ -27,26 +27,16 @@
 
 #include <nuttx/config.h>
 
-#ifndef __ASSEMBLY__
-#  include <stdint.h>
-#endif
-
-#include "c906.h"
-
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
 
 /****************************************************************************
- * Public Types
+ * Public Data
  ****************************************************************************/
 
 #ifndef __ASSEMBLY__
 
-/****************************************************************************
- * Public Data
- ****************************************************************************/
-
 #undef EXTERN
 #if defined(__cplusplus)
 #define EXTERN extern "C"
@@ -60,15 +50,10 @@ extern "C"
  * Public Function Prototypes
  ****************************************************************************/
 
-/****************************************************************************
- * Name: c906_boardinitialize
- ****************************************************************************/
-
-void c906_boardinitialize(void);
-
 #undef EXTERN
 #if defined(__cplusplus)
 }
 #endif
+
 #endif /* __ASSEMBLY__ */
-#endif /* __BOARDS_RISCV_C906_SMARTL_C906_INCLUDE_BOARD_H */
+#endif /* __BOARDS_ARM64_QEMU_QEMU_ARMV8A_INCLUDE_BOARD_H */
diff --git a/boards/arm64/rk3399/nanopi_m4/configs/nsh/defconfig 
b/boards/arm64/rk3399/nanopi_m4/configs/nsh/defconfig
index 777951dfc4..1cb85eb456 100644
--- a/boards/arm64/rk3399/nanopi_m4/configs/nsh/defconfig
+++ b/boards/arm64/rk3399/nanopi_m4/configs/nsh/defconfig
@@ -5,6 +5,7 @@
 # You can then do "make savedefconfig" to generate a new defconfig file that 
includes your
 # modifications.
 #
+# CONFIG_ARCH_LEDS is not set
 CONFIG_ARCH="arm64"
 CONFIG_ARCH_ARM64=y
 CONFIG_ARCH_BOARD="nanopi_m4"
diff --git a/boards/arm64/rk3399/pinephonepro/configs/nsh/defconfig 
b/boards/arm64/rk3399/pinephonepro/configs/nsh/defconfig
index c8ec356fea..6b747e755b 100644
--- a/boards/arm64/rk3399/pinephonepro/configs/nsh/defconfig
+++ b/boards/arm64/rk3399/pinephonepro/configs/nsh/defconfig
@@ -5,6 +5,7 @@
 # You can then do "make savedefconfig" to generate a new defconfig file that 
includes your
 # modifications.
 #
+# CONFIG_ARCH_LEDS is not set
 CONFIG_ARCH="arm64"
 CONFIG_ARCH_ARM64=y
 CONFIG_ARCH_BOARD="pinephonepro"
diff --git a/boards/risc-v/c906/smartl-c906/include/board.h 
b/boards/risc-v/c906/smartl-c906/include/board.h
index bd8298b8f4..8c6c0522b6 100644
--- a/boards/risc-v/c906/smartl-c906/include/board.h
+++ b/boards/risc-v/c906/smartl-c906/include/board.h
@@ -31,8 +31,6 @@
 #  include <stdint.h>
 #endif
 
-#include "c906.h"
-
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
diff --git a/boards/risc-v/k210/maix-bit/include/board.h 
b/boards/risc-v/k210/maix-bit/include/board.h
index 2ece07afcd..03954859f4 100644
--- a/boards/risc-v/k210/maix-bit/include/board.h
+++ b/boards/risc-v/k210/maix-bit/include/board.h
@@ -31,10 +31,6 @@
 #  include <stdint.h>
 #endif
 
-#include "k210.h"
-
-#include "k210_fpioa.h"
-
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
diff --git a/boards/risc-v/mpfs/icicle/include/board.h 
b/boards/risc-v/mpfs/icicle/include/board.h
index ad8da65db8..85834a553b 100644
--- a/boards/risc-v/mpfs/icicle/include/board.h
+++ b/boards/risc-v/mpfs/icicle/include/board.h
@@ -31,8 +31,6 @@
 #  include <stdint.h>
 #endif
 
-#include "mpfs_gpio.h"
-
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
diff --git a/boards/risc-v/mpfs/m100pfsevp/include/board.h 
b/boards/risc-v/mpfs/m100pfsevp/include/board.h
index 8b628bde9a..1ac83bd7aa 100644
--- a/boards/risc-v/mpfs/m100pfsevp/include/board.h
+++ b/boards/risc-v/mpfs/m100pfsevp/include/board.h
@@ -31,8 +31,6 @@
 #  include <stdint.h>
 #endif
 
-#include "mpfs_gpio.h"
-
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
diff --git a/sched/misc/assert.c b/sched/misc/assert.c
index 752b7707ab..675527aa61 100644
--- a/sched/misc/assert.c
+++ b/sched/misc/assert.c
@@ -30,6 +30,7 @@
 #include <nuttx/irq.h>
 #include <nuttx/tls.h>
 #include <nuttx/signal.h>
+#include <arch/board/board.h>
 
 #include <nuttx/panic_notifier.h>
 #include <nuttx/reboot_notifier.h>
@@ -585,6 +586,9 @@ void _assert(FAR const char *filename, int linenum,
   notifier_data.msg = msg;
   panic_notifier_call_chain(fatal ? PANIC_KERNEL : PANIC_TASK,
                             &notifier_data);
+#ifdef CONFIG_ARCH_LEDS
+  board_autoled_on(LED_ASSERTION);
+#endif
 
   /* Flush any buffered SYSLOG data (from prior to the assertion) */
 
@@ -674,6 +678,13 @@ void _assert(FAR const char *filename, int linenum,
 #else
       for (; ; )
         {
+#ifdef CONFIG_ARCH_LEDS
+          /* FLASH LEDs a 2Hz */
+
+          board_autoled_on(LED_PANIC);
+          up_mdelay(250);
+          board_autoled_off(LED_PANIC);
+#endif
           up_mdelay(250);
         }
 #endif

Reply via email to