Skip to content

Commit 0b28f9e

Browse files
tlebbebarino
authored andcommitted
clk: eyeq: add EyeQ6H central fixed factor clocks
Previous setup was: - pll-cpu clock registered from driver at of_clk_init(); - occ-cpu clock registered from DT using fixed-factor-clock compatible. Now that drivers/clk/clk-eyeq.c supports registering fixed factors, use that capability to register occ-cpu. Also switch from hard-coded index 0 for pll-cpu to using the EQ6HC_CENTRAL_PLL_CPU constant by exposed dt-bindings headers. occ-cpu is exposed at of_clk_init() because it gets used by both the DT CPU nodes and the GIC timer. 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 5e01124 commit 0b28f9e

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

drivers/clk/clk-eyeq.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -695,12 +695,19 @@ builtin_platform_driver(eqc_driver);
695695

696696
/* Required early for GIC timer. */
697697
static const struct eqc_pll eqc_eyeq6h_central_early_plls[] = {
698-
{ .index = 0, .name = "pll-cpu", .reg64 = 0x02C },
698+
{ .index = EQ6HC_CENTRAL_PLL_CPU, .name = "pll-cpu", .reg64 = 0x02C },
699+
};
700+
701+
static const struct eqc_fixed_factor eqc_eyeq6h_central_early_fixed_factors[] = {
702+
{ EQ6HC_CENTRAL_CPU_OCC, "occ-cpu", 1, 1, EQ6HC_CENTRAL_PLL_CPU },
699703
};
700704

701705
static const struct eqc_early_match_data eqc_eyeq6h_central_early_match_data __initconst = {
702706
.early_pll_count = ARRAY_SIZE(eqc_eyeq6h_central_early_plls),
703707
.early_plls = eqc_eyeq6h_central_early_plls,
708+
709+
.early_fixed_factor_count = ARRAY_SIZE(eqc_eyeq6h_central_early_fixed_factors),
710+
.early_fixed_factors = eqc_eyeq6h_central_early_fixed_factors,
704711
};
705712

706713
/* Required early for UART. */

0 commit comments

Comments
 (0)