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 f35dd7813ed1219aad37eac57fa66595deeb5a28
Author: Justin Hammond <[email protected]>
AuthorDate: Mon Aug 17 00:03:54 2026 +0800

    boards/risc-v/eic7700x: Report the pads at startup.
    
    Log one line from board start up with the pad count and how many differ
    from their reset defaults, through eic7700x_pinctrl_count().  A helper
    holds its locals so nothing stays on the stack for the bring up that
    follows.
    
    Turn the pinctrl driver's error output on for both boards, so a refused
    pad write says why rather than merely failing.
    
    Assisted-by: Claude:claude-opus-5
    Signed-off-by: Justin Hammond <[email protected]>
---
 boards/risc-v/eic7700x/common/src/eic7700x_boot.c  | 23 ++++++++++++++++++++++
 .../eic7700x/eic7700-evb/configs/nsh/defconfig     |  2 ++
 .../eic7700x/starpro64/configs/nsh/defconfig       |  2 ++
 3 files changed, 27 insertions(+)

diff --git a/boards/risc-v/eic7700x/common/src/eic7700x_boot.c 
b/boards/risc-v/eic7700x/common/src/eic7700x_boot.c
index ac09f04ddb5..03f77a225c3 100644
--- a/boards/risc-v/eic7700x/common/src/eic7700x_boot.c
+++ b/boards/risc-v/eic7700x/common/src/eic7700x_boot.c
@@ -41,6 +41,7 @@
 #ifdef CONFIG_EIC7700X_CPUCLK
 #  include "eic7700x_cpuclk.h"
 #endif
+#include "eic7700x_pinctrl.h"
 #include "eic7700x_reset.h"
 
 #include "board_config.h"
@@ -59,6 +60,25 @@
  * Private Functions
  ****************************************************************************/
 
+#ifdef CONFIG_EIC7700X_PINCTRL
+/****************************************************************************
+ * Name: report_pads
+ *
+ * Description:
+ *   Report the pad census.  Its own function so that nothing it needs
+ *   stays on the stack for the bring up that follows.
+ *
+ ****************************************************************************/
+
+static void report_pads(void)
+{
+  unsigned int nchanged;
+  unsigned int npads = eic7700x_pinctrl_count(&nchanged);
+
+  syslog(LOG_INFO, "pinctrl: %u pads, %u configured\n", npads, nchanged);
+}
+#endif /* CONFIG_EIC7700X_PINCTRL */
+
 /****************************************************************************
  * Name: mount_ramdisk
  *
@@ -176,6 +196,9 @@ void board_late_initialize(void)
 
   report_clocks();
   report_resets();
+#ifdef CONFIG_EIC7700X_PINCTRL
+  report_pads();
+#endif /* CONFIG_EIC7700X_PINCTRL */
 
   /* Devices whose presence or order is this board's business */
 
diff --git a/boards/risc-v/eic7700x/eic7700-evb/configs/nsh/defconfig 
b/boards/risc-v/eic7700x/eic7700-evb/configs/nsh/defconfig
index 5055e1808ea..649b462b056 100644
--- a/boards/risc-v/eic7700x/eic7700-evb/configs/nsh/defconfig
+++ b/boards/risc-v/eic7700x/eic7700-evb/configs/nsh/defconfig
@@ -63,6 +63,8 @@ CONFIG_DEBUG_FS_ERROR=y
 CONFIG_DEBUG_FULLOPT=y
 CONFIG_DEBUG_MM=y
 CONFIG_DEBUG_MM_ERROR=y
+CONFIG_DEBUG_PINCTRL=y
+CONFIG_DEBUG_PINCTRL_ERROR=y
 CONFIG_DEBUG_RESET=y
 CONFIG_DEBUG_RESET_ERROR=y
 CONFIG_DEBUG_SCHED=y
diff --git a/boards/risc-v/eic7700x/starpro64/configs/nsh/defconfig 
b/boards/risc-v/eic7700x/starpro64/configs/nsh/defconfig
index db0fceabd78..7e0b27ad46f 100644
--- a/boards/risc-v/eic7700x/starpro64/configs/nsh/defconfig
+++ b/boards/risc-v/eic7700x/starpro64/configs/nsh/defconfig
@@ -59,6 +59,8 @@ CONFIG_DEBUG_FS_ERROR=y
 CONFIG_DEBUG_FULLOPT=y
 CONFIG_DEBUG_MM=y
 CONFIG_DEBUG_MM_ERROR=y
+CONFIG_DEBUG_PINCTRL=y
+CONFIG_DEBUG_PINCTRL_ERROR=y
 CONFIG_DEBUG_RESET=y
 CONFIG_DEBUG_RESET_ERROR=y
 CONFIG_DEBUG_SCHED=y

Reply via email to