mirror of
https://github.com/apache/nuttx.git
synced 2026-10-03 20:27:53 +00:00
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 <justin@dynam.ac>
This commit is contained in:
parent
830eab5f81
commit
f35dd7813e
3 changed files with 27 additions and 0 deletions
|
|
@ -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 */
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue