Skip to content

clk: socfpga: convert clock managers to CLK_OF_DECLARE()

[email protected] linux-clk lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 8 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3clk: socfpga: agilex: convert to CLK_OF_DECLARE()drivers/clk/socfpga/clk-agilex.c+28 -557 replies
2/3clk: socfpga: agilex5: convert to CLK_OF_DECLARE()drivers/clk/socfpga/clk-agilex5.c+15 -410 replies
3/3clk: socfpga: stratix10: convert to CLK_OF_DECLARE()drivers/clk/socfpga/clk-s10.c+13 -370 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] clk: socfpga: convert clock managers to CLK_OF_DECLARE()

From: Adrian Ng Ho Yin <[email protected]>

The SoCFPGA Stratix10, Agilex, and Agilex5 clock managers are currently registered as platform drivers via core_initcall(). That is too late for early OF clock consumers: TIMER_OF_DECLARE callbacks run from time_init() before those drivers probe, and the DW APB timer cannot defer, so clk_get() fails and the timer is never brought up.

As discussed on the list [1], convert these drivers to CLK_OF_DECLARE() so the providers are registered from of_clk_init() and clocks are available before platform devices probe.

This series applies the same conversion to Agilex (including eASIC N5X), Agilex5, and Stratix10.

Boot-tested on Agilex7 (agilex7dksiagf014eb): dw_apb_timer registers as clocksource early, with no clk_get() failures.

[1] https://lore.kernel.org/all/[email protected]/

Adrian Ng Ho Yin (3):
clk: socfpga: agilex: convert to CLK_OF_DECLARE()
clk: socfpga: agilex5: convert to CLK_OF_DECLARE()
clk: socfpga: stratix10: convert to CLK_OF_DECLARE()

 drivers/clk/socfpga/clk-agilex.c  | 83 +++++++++++--------------------
 drivers/clk/socfpga/clk-agilex5.c | 56 +++++---------------
 drivers/clk/socfpga/clk-s10.c     | 50 +++++--------------
 3 files changed, 56 insertions(+), 133 deletions(-)
Signature · 1 line
2.49.GIT