public inbox for linux-clk@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC 0/9] clk: qcom: gcc-sdm845: Swicth from expanded definitions to compact macros
@ 2022-07-26 14:22 Abel Vesa
  2022-07-26 14:22 ` [RFC 1/9] clk: qcom: qcc-sdm845: Collapse gdsc structs into macros Abel Vesa
                   ` (9 more replies)
  0 siblings, 10 replies; 17+ messages in thread
From: Abel Vesa @ 2022-07-26 14:22 UTC (permalink / raw)
  To: Bjorn Andersson, Andy Gross, Konrad Dybcio, Mike Turquette,
	Stephen Boyd
  Cc: linux-arm-msm, linux-clk, Linux Kernel Mailing List, Abel Vesa

Lets see where this goes.

This RFC is basically a proof-of-concept of how we could use more
compact macros rather than expanded definitions for clocks on QCOM
platforms. As the subject says, this is only for SDM845 GCC, for now.

Also, there are a couple of hacky solutions here that need to be
reworked before it could be merged (if ever). One that comes to mind is
the way the branch clock macros differentiate between having no parent,
a parent name, or a parent HW. I'm still looking into that, so ...

I tried to make them as compact and readable from the user's POV, but
there is some complexity needed in order to allow passing different
types (or number) of parents. Maybe that complexity is too crazy and
doesn't bring that much benefit.

I managed to put together some semi-automated way to do this for every
CC, on every platform, if it's decided so. The only testing I managed to
do so far was comparing the preprocessed output before and after. Oh,
and the MTP does boot. I still need time to make sure that nothing gets
broken.

Also, this series is still WIP, so everything can be reworked fast, if
needed.

Abel Vesa (9):
  clk: qcom: qcc-sdm845: Collapse gdsc structs into macros
  clk: qcom: gcc-sdm845: Switch from parent_hws to parent_data
  clk: qcom: rcg: Add macros to collapse definition
  clk: qcom: alpha-pll: Add macros to collapse definition
  clk: qcom: branch: Add macros to collapse definition
  clk: qcom: common: Add macro wrapper for all clock types
  clk: qcom: gcc-sdm845: Switch to macros to collapse branch clocks
    definitions
  clk: qcom: gcc-sdm845: Switch to macros to collapse rcg2 clocks
    definitions
  clk: qcom: gcc-sdm845: Switch to macros to collapse alpha-pll clocks
    definitions

 drivers/clk/qcom/clk-alpha-pll.h |   61 +
 drivers/clk/qcom/clk-branch.h    |   82 +
 drivers/clk/qcom/clk-rcg.h       |   40 +
 drivers/clk/qcom/common.h        |    3 +
 drivers/clk/qcom/gcc-sdm845.c    | 3222 ++----------------------------
 drivers/clk/qcom/gdsc.h          |   10 +
 6 files changed, 406 insertions(+), 3012 deletions(-)

--
2.34.3


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2022-08-10  7:45 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-26 14:22 [RFC 0/9] clk: qcom: gcc-sdm845: Swicth from expanded definitions to compact macros Abel Vesa
2022-07-26 14:22 ` [RFC 1/9] clk: qcom: qcc-sdm845: Collapse gdsc structs into macros Abel Vesa
2022-07-26 16:36   ` Dmitry Baryshkov
2022-08-09 20:25   ` Bjorn Andersson
2022-08-10  7:45     ` Abel Vesa
2022-07-26 14:22 ` [RFC 2/9] clk: qcom: gcc-sdm845: Switch from parent_hws to parent_data Abel Vesa
2022-07-26 14:22 ` [RFC 3/9] clk: qcom: rcg: Add macros to collapse definition Abel Vesa
2022-07-26 16:39   ` Dmitry Baryshkov
2022-07-26 14:22 ` [RFC 4/9] clk: qcom: alpha-pll: " Abel Vesa
2022-07-26 14:22 ` [RFC 5/9] clk: qcom: branch: " Abel Vesa
2022-07-26 14:23 ` [RFC 6/9] clk: qcom: common: Add macro wrapper for all clock types Abel Vesa
2022-07-26 16:48   ` Dmitry Baryshkov
2022-07-26 14:23 ` [RFC 7/9] clk: qcom: gcc-sdm845: Switch to macros to collapse branch clocks definitions Abel Vesa
2022-07-26 14:23 ` [RFC 8/9] clk: qcom: gcc-sdm845: Switch to macros to collapse rcg2 " Abel Vesa
2022-07-26 16:47   ` Dmitry Baryshkov
2022-07-26 14:23 ` [RFC 9/9] clk: qcom: gcc-sdm845: Switch to macros to collapse alpha-pll " Abel Vesa
2022-07-26 19:16 ` [RFC 0/9] clk: qcom: gcc-sdm845: Swicth from expanded definitions to compact macros Konrad Dybcio

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox