mbox series

[RFC,v2,0/3] clk: qcom: provide alternative 'parked' RCG

Message ID 20231004012308.2305273-1-dmitry.baryshkov@linaro.org
Headers show
Series clk: qcom: provide alternative 'parked' RCG | expand

Message

Dmitry Baryshkov Oct. 4, 2023, 1:23 a.m. UTC
Implement an alternative for the clk_rcg2_shared_ops, which also
implements a proper is_enabled callback. Note, to use
clk_rcg2_parked_ops one must remove XO (safe source) from the
parent_data, parent_map and freq_table.

Changes since v1:
- Replaced a call to clk_rcg2_is_enabled() with check of the CFG_ROOT_EN
  field (Stephen Boyd).
- Added the init function, reading the default clock configuration and
  then defaulting to the lowest supported freq / parent if the clock was
  not configured at all (Stephen Boyd).
- Dropped P_BI_TCXO from freq_tables too.

Dmitry Baryshkov (3):
  clk: qcom: add helper to map parent source to cfg value
  clk: qcom: implement RCG2 'parked' clock support
  clk: qcom: dispcc-sm8250: switch to clk_rcg2_parked_ops

 drivers/clk/qcom/clk-rcg.h       |  1 +
 drivers/clk/qcom/clk-rcg2.c      | 56 ++++++++++++++++++++++++++++++++
 drivers/clk/qcom/common.c        | 12 +++++++
 drivers/clk/qcom/common.h        |  2 ++
 drivers/clk/qcom/dispcc-sm8250.c | 13 ++------
 5 files changed, 74 insertions(+), 10 deletions(-)