HomeFreeBSD

clk_fixed: reduce and clarify messages due to missing clk-frequency

Description

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: https://reviews.freebsd.org/D41594

(cherry picked from commit b4ef09b9eb117d622bb274448e5cffcae0ba3488)
(cherry picked from commit 2476a76031908016dd2513862d46ad8dd2bab462)

Details

Provenance
karelsAuthored on Aug 25 2023, 8:11 PM
Reviewer
manu
Differential Revision
D41594: clk_fixed: reduce and clarify messages due to missing clk-frequency
Parents
rGd9b8e5a74805: powerpc pmap: initialize kernel pmap radix trie
Branches
Unknown
Tags
Unknown