Skip to content

Commit 1cbdfcf

Browse files
tlebbebarino
authored andcommitted
clk: eyeq: add EyeQ6H west fixed factor clocks
Previous setup was: - pll-west clock registered from driver at of_clk_init(); - Both OCC and UART clocks registered from DT using fixed-factor-clock compatible. Now that drivers/clk/clk-eyeq.c supports registering fixed factors, use that capability to register west-per-occ and west-per-uart (giving them proper names at the same time). Also switch from hard-coded index 0 for pll-west to using the EQ6HC_WEST_PLL_PER constant by exposed dt-bindings headers. All get exposed at of_clk_init() because they get used by the AMBA PL011 serial ports. Those are instantiated before platform bus infrastructure. Signed-off-by: Théo Lebrun <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Stephen Boyd <[email protected]>
1 parent 0b28f9e commit 1cbdfcf

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

drivers/clk/clk-eyeq.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -712,12 +712,20 @@ static const struct eqc_early_match_data eqc_eyeq6h_central_early_match_data __i
712712

713713
/* Required early for UART. */
714714
static const struct eqc_pll eqc_eyeq6h_west_early_plls[] = {
715-
{ .index = 0, .name = "pll-west", .reg64 = 0x074 },
715+
{ .index = EQ6HC_WEST_PLL_PER, .name = "pll-west", .reg64 = 0x074 },
716+
};
717+
718+
static const struct eqc_fixed_factor eqc_eyeq6h_west_early_fixed_factors[] = {
719+
{ EQ6HC_WEST_PER_OCC, "west-per-occ", 1, 10, EQ6HC_WEST_PLL_PER },
720+
{ EQ6HC_WEST_PER_UART, "west-per-uart", 1, 1, EQ6HC_WEST_PER_OCC },
716721
};
717722

718723
static const struct eqc_early_match_data eqc_eyeq6h_west_early_match_data __initconst = {
719724
.early_pll_count = ARRAY_SIZE(eqc_eyeq6h_west_early_plls),
720725
.early_plls = eqc_eyeq6h_west_early_plls,
726+
727+
.early_fixed_factor_count = ARRAY_SIZE(eqc_eyeq6h_west_early_fixed_factors),
728+
.early_fixed_factors = eqc_eyeq6h_west_early_fixed_factors,
721729
};
722730

723731
static void __init eqc_early_init(struct device_node *np,

0 commit comments

Comments
 (0)