Re: [PATCH v4 2/4] clk: toshiba: introduce a TC9564 clock driver
From: Alex Elder
Date: Thu Dec 03 2026 - 12:59:42 EST
On 12/3/26 7:52 AM, Jerome Brunet wrote:
+static const struct fixed_init fixed_init[] = {I've already commented on way to make a onecell here
+ [TC9564_CLK_312_5M] = {
+ .name = "312.5MHz",
+ .div = 4,
+ },
+ [TC9564_CLK_250M] = {
+ .name = "250MHz",
+ .div = 5,
+ },
+ [TC9564_CLK_125M] = {
+ .name = "125MHz",
+ .div = 10,
+ },
+ [TC9564_CLK_62_5M] = {
+ .name = "62.5MHz",
+ .div = 20,
If you need to iterate per type, keep those table
just add
.id = <TC9564_WHATEVER_IT_IS_DT_BINDINGS>
and fill the right index of the provider table with it
Each fixed clock has a unique rate.
The gate clocks, each of which has a fixed clock as parent,
looks up its parent's clk_hw pointer by scanning the
registered fixed clocks and finding the one that has the
rate they want.
I therefore no longer define special IDs for the fixed clocks
(like TC9564_CLK_250M). The fixed clock initialization array
is not indexed, and entries do not need to specify an ID.
If we someday get a clock tree that indicates the clocks
are derived another way, this can be change.
-Alex