mbox series

[0/8] msm8998 clock-controller cleanup

Message ID 20210911121340.261920-1-marijn.suijten@somainline.org
Headers show
Series msm8998 clock-controller cleanup | expand

Message

Marijn Suijten Sept. 11, 2021, 12:13 p.m. UTC
Clean up the clock-controllers for msm8998 similar to sdm660 by:
- Using parent_data/hws for internal relations;
- Removing the "xo" fixed-factor clock that only existed for drivers
  that rely on this global name (the DT only provides "xo_board");
- Using ARRAY_SIZE for num_parents instead of hardcoding array length;
- Removing unnecessary fallbacks to global names of parent clocks, these
  are already specified in the DT;
- Updating DT-bindings to reflect the clocks used by gcc.

Note that this should land some time after [1] to give users time to
update their firmware (DT) before updating the kernel.  Additionally [2]
should make it in before DSI PLL nodes are added.

[1]: https://lore.kernel.org/linux-arm-msm/20210911120101.248476-1-marijn.suijten@somainline.org/
[2]: https://lore.kernel.org/linux-arm-msm/20210830182445.167527-2-marijn.suijten@somainline.org/

Marijn Suijten (8):
  clk: qcom: gcc-msm8998: Move parent names and mapping below GPLLs
  clk: qcom: gcc-msm8998: Use parent_data/hws for internal clock
    relations
  clk: qcom: gcc-msm8998: Remove transient global "xo" clock
  clk: qcom: gpucc-msm8998: Use ARRAY_SIZE for num_parents
  clk: qcom: mmcc-msm8998: Use ARRAY_SIZE for num_parents
  dt-bindings: clocks: qcom,gcc-msm8998: Reflect actually referenced
    clks
  clk: qcom: gpucc-msm8998: Remove unnecessary fallbacks to global
    clocks
  clk: qcom: mmcc-msm8998: Remove unnecessary fallbacks to global clocks

 .../bindings/clock/qcom,gcc-msm8998.yaml      |  26 +-
 drivers/clk/qcom/gcc-msm8998.c                | 705 ++++++++++--------
 drivers/clk/qcom/gpucc-msm8998.c              |  13 +-
 drivers/clk/qcom/mmcc-msm8998.c               | 183 +++--
 4 files changed, 475 insertions(+), 452 deletions(-)

Comments

Stephen Boyd Sept. 14, 2021, 9:41 p.m. UTC | #1
Quoting Marijn Suijten (2021-09-11 05:13:33)
> Prepare for a future patch where we use .hw pointers to these GPLL
> clocks in the parent mapping instead of name references.  This requires
> the GPLL clocks to be decared before parent_data arrays.
> 
> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
> Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
> ---

Applied to clk-next
Stephen Boyd Sept. 14, 2021, 9:42 p.m. UTC | #2
Quoting Marijn Suijten (2021-09-11 05:13:36)
> Where possible, use ARRAY_SIZE to determine the number of parents in

> clk_parent_data, instead of hardcoding it.

> 

> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>

> Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>

> ---


Applied to clk-next
Stephen Boyd Sept. 14, 2021, 9:42 p.m. UTC | #3
Quoting Marijn Suijten (2021-09-11 05:13:39)
> A previous patch removes the "xo" clock from the global namespace making
> it impossible to acquire by that ".name".  The device-tree for msm8998
> already provides the "xo" and "gpll0" clock since the addition of the
> gpucc node making it unnecessary to have this fallback at all.
> 
> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
> Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
> ---

Applied to clk-next