boards/risc-v/eic7700x: Report the reset lines at startup.

A peripheral held in reset reads like one that is absent, and the boot
loader does not leave the same lines released on every board or every
boot.  One line at startup says how much is held:

  reset: 324 lines, 117 held

Beside the clock tree's line and for the same reason: the summary is
worth seeing on every boot, and the detail belongs in /proc where it can
be read when it is wanted.

The driver's error output is enabled, matching the clock driver.  Info
level is not, since nothing at that level prints on a healthy boot.

Assisted-by: Claude:claude-opus-5
Signed-off-by: Justin Hammond <justin@dynam.ac>
This commit is contained in:
Justin Hammond 2026-08-16 02:23:39 +08:00 • committed by Xiang Xiao
parent 74ac90f692
commit 7fe77bf1d7
3 changed files with 24 additions and 0 deletions

View file

@ -41,6 +41,7 @@
#ifdef CONFIG_EIC7700X_CPUCLK
# include "eic7700x_cpuclk.h"
#endif
#include "eic7700x_reset.h"
#include "board_config.h"
@ -117,6 +118,24 @@ static void report_clocks(void)
syslog(LOG_INFO, "clk: registered %u clocks, %u failed\n", nclk, nfail);
}
/****************************************************************************
* Name: report_resets
*
* Description:
* Report the reset lines the architecture registered before this board
* ran, and how many the boot loader left held. Its own function for the
* same reason as report_clocks().
*
****************************************************************************/
static void report_resets(void)
{
unsigned int held;
unsigned int nline = eic7700x_reset_count(&held);
syslog(LOG_INFO, "reset: %u lines, %u held\n", nline, held);
}
/****************************************************************************
* Name: board_late_initialize
*
@ -156,6 +175,7 @@ void board_late_initialize(void)
mount(NULL, "/proc", "procfs", 0, NULL);
report_clocks();
report_resets();
/* Devices whose presence or order is this board's business */

View file

@ -63,6 +63,8 @@ CONFIG_DEBUG_FS_ERROR=y
CONFIG_DEBUG_FULLOPT=y
CONFIG_DEBUG_MM=y
CONFIG_DEBUG_MM_ERROR=y
CONFIG_DEBUG_RESET=y
CONFIG_DEBUG_RESET_ERROR=y
CONFIG_DEBUG_SCHED=y
CONFIG_DEBUG_SYMBOLS=y
CONFIG_DEFAULT_TASK_STACKSIZE=8192

View file

@ -59,6 +59,8 @@ CONFIG_DEBUG_FS_ERROR=y
CONFIG_DEBUG_FULLOPT=y
CONFIG_DEBUG_MM=y
CONFIG_DEBUG_MM_ERROR=y
CONFIG_DEBUG_RESET=y
CONFIG_DEBUG_RESET_ERROR=y
CONFIG_DEBUG_SCHED=y
CONFIG_DEBUG_SYMBOLS=y
CONFIG_DEFAULT_TASK_STACKSIZE=8192