git: 6e66bb9fc3d0 - main - clk_fixed: call clkdom_dump() for verbose boot

From: Mitchell Horne <mhorne_at_FreeBSD.org>
Date: Fri, 08 Mar 2024 14:10:03 UTC
The branch main has been updated by mhorne:

URL: https://cgit.FreeBSD.org/src/commit/?id=6e66bb9fc3d026765113fa1258cd12292da9309a

commit 6e66bb9fc3d026765113fa1258cd12292da9309a
Author:     Mitchell Horne <mhorne@FreeBSD.org>
AuthorDate: 2024-03-08 14:08:22 +0000
Commit:     Mitchell Horne <mhorne@FreeBSD.org>
CommitDate: 2024-03-08 14:09:36 +0000

    clk_fixed: call clkdom_dump() for verbose boot
    
    This is standard practice for clock drivers that register clocks
    dynamically. Nothing else uses the CLK_DEBUG macro.
    
    The result is that the name and frequency of the fixed clock is printed
    for a verbose boot, which may aid in debugging.
    
    Reviewed by:    manu
    MFC after:      1 week
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D44265
---
 sys/dev/clk/clk_fixed.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/sys/dev/clk/clk_fixed.c b/sys/dev/clk/clk_fixed.c
index 647ca6a05568..3f828b24c2b2 100644
--- a/sys/dev/clk/clk_fixed.c
+++ b/sys/dev/clk/clk_fixed.c
@@ -258,9 +258,10 @@ clk_fixed_attach(device_t dev)
 		rv = ENXIO;
 		goto fail;
 	}
-#ifdef CLK_DEBUG
-	clkdom_dump(sc->clkdom);
-#endif
+
+	if (bootverbose)
+		clkdom_dump(sc->clkdom);
+
 	OF_prop_free(__DECONST(char *, def.clkdef.name));
 	OF_prop_free(def.clkdef.parent_names);
 	return (bus_generic_attach(dev));