git: 4fdded885b8d - releng/14.0 - clk_fixed: reduce and clarify messages due to missing clk-frequency

From: Mike Karels <>
Date: Sat, 23 Sep 2023 02:26:03 UTC
The branch releng/14.0 has been updated by karels:


commit 4fdded885b8d587a5e0a7377361c0eaaa96af30e
Author:     Mike Karels <>
AuthorDate: 2023-08-25 20:11:46 +0000
Commit:     Mike Karels <>
CommitDate: 2023-09-23 02:24:22 +0000

    clk_fixed: reduce and clarify messages due to missing clk-frequency
    The current dts for Raspberry 3B+ and 4B have 2 disabled fixed-clock
    nodes which have no clock-frequency value.  Such nodes are non-standard.
    This results in about 150 messages during autoconfiguration:
        clk_fixed2: <Fixed clock> disabled on ofwbus0
        clk_fixed2: Cannot FDT parameters.
        device_attach: clk_fixed2 attach returned 6
    Defensively check for clock-frequency in the probe routine, and if
    none, return an error with a more direct error message (1 line per
    occurrence, 50 lines total):
        clk_fixed2: clock-fixed has no clock-frequency
    Based on a patch by manu.
    Approved by:    re(gjb)
    Reviewed by:    manu
    Differential Revision:
    (cherry picked from commit b4ef09b9eb117d622bb274448e5cffcae0ba3488)
    (cherry picked from commit 2476a76031908016dd2513862d46ad8dd2bab462)
 sys/dev/extres/clk/clk_fixed.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/sys/dev/extres/clk/clk_fixed.c b/sys/dev/extres/clk/clk_fixed.c
index f4f1d462233a..e5ca6b31d000 100644
--- a/sys/dev/extres/clk/clk_fixed.c
+++ b/sys/dev/extres/clk/clk_fixed.c
@@ -157,6 +157,11 @@ clk_fixed_probe(device_t dev)
 	clk_type = ofw_bus_search_compatible(dev, compat_data)->ocd_data;
 	switch (clk_type) {
+		if (OF_hasprop(ofw_bus_get_node(dev), "clock-frequency") == 0) {
+			device_printf(dev,
+			    "clock-fixed has no clock-frequency\n");
+			return (ENXIO);
+		}
 		device_set_desc(dev, "Fixed clock");
 		return (BUS_PROBE_DEFAULT);