Page MenuHomeFreeBSD

clk/broadcom: Add stub clock node for unimplemented clock sources
Needs ReviewPublic

Authored by 3293789706_qq.com on Wed, Mar 18, 7:42 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Mar 29, 3:22 AM
Unknown Object (File)
Sat, Mar 28, 3:58 PM
Unknown Object (File)
Wed, Mar 25, 7:41 AM
Unknown Object (File)
Tue, Mar 24, 6:07 AM
Unknown Object (File)
Mon, Mar 23, 8:03 PM
Unknown Object (File)
Mon, Mar 23, 8:05 AM
Unknown Object (File)
Thu, Mar 19, 12:29 PM
Subscribers

Details

Reviewers
emaste
mhorne
Summary

Add bcm_clk_stub, a minimal fixed-frequency clknode used as a
placeholder for clock sources that are not yet fully modelled (e.g.
gnd, testdebug0/1, pllh_aux on BCM2835).

The stub node reports a fixed frequency supplied at registration time
and rejects any set_freq request that would change it. This allows
the peripheral clock mux to resolve all parent names at clkdom_finit()
time without requiring every source to have a real implementation.

bcm_cprman_clk_data gains a stub_clks array; bcm_cprman_attach
registers stub clocks first so they are available as parents when PLLs
and peripheral clocks are registered.

Signed-off-by: perdixky <3293789706@qq.com>

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 71700
Build 68583: arc lint + arc unit

Event Timeline

Can you use the existing clk_fixed class for these clocks? It seems like it. See sys/dev/clk/clk_fixed.h.

Can you use the existing clk_fixed class for these clocks? It seems like it. See sys/dev/clk/clk_fixed.h.

No, these two nodes serve different purposes. clk_fixed calls clknode_init_parent_idx(clk, 0) to initialize the parent clock, while clk_stub uses freq = 0 to indicate that it is a dummy clock.

Updating D55909: clk/broadcom: Add stub clock node for unimplemented clock sources

Updating D55909: clk/broadcom: Add stub clock node for unimplemented clock sources