Skip to content

clk: qcom: clk-rcg2: introduce support for multiple conf for same freq

Christian Marangi linux-arm-msm linux-clk lkml 9 versions – Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v8 Latest3 patches 4 repliesApplied
  2. v73 patches 3 repliesSuperseded
  3. v63 patches 5 repliesSuperseded
Earlier versions · 6
VersionPostedPatchesRepliesStatus
v53 patches1 replySuperseded
v43 patches6 repliesSuperseded
v36 patches3 repliesSuperseded
v1 posting 2/22 patches2 repliesSuperseded
v24 patches0 repliesSuperseded
v1 RFC posting 1/22 patches0 repliesSuperseded

Changes in v8 from the cover letter

- Add Tested-by tag
- Fix typo in commit description
- Address requested fixup for Stephen

Patches in v8 Applied

#Subject and filesSizeRepliesApplied
1/3clk: qcom: clk-rcg: introduce support for multiple conf for same freqdrivers/clk/qcom/clk-rcg.h+22 -10 replies
2/3clk: qcom: clk-rcg2: add support for rcg2 freq multi opsdrivers/clk/qcom/clk-rcg.h drivers/clk/qcom/clk-rcg2.c drivers/clk/qcom/common.c +1 more+187 -00 replies
3/3clk: qcom: gcc-ipq8074: rework nss_port5/6 clock to multiple confdrivers/clk/qcom/gcc-ipq8074.c+76 -440 replies

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchWei LeiStephen Boyd
SeriesA-b
1/3
2/3T-b
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v8 thread

Cover letter [PATCH v8 0/3] clk: qcom: clk-rcg2: introduce support for multiple conf for same freq

This small series fix a current problem with ipq8074 where the 2 uniphy port doesn't work in some corner case with some clk configuration. The port to correctly work require a specific frequency, using the wrong one results in the port not transmitting data.

With the current code with a requested freq of 125MHz, the frequency is set to 105MHz. This is caused by the fact that there are 2 different configuration to set 125MHz and it's always selected the first one that results in 105MHz.

In the original QSDK code, the frequency configuration selection is different and the CEIL FLOOR logic is not present. Instead it's used a BEST approach where the frequency table is checked and then it's checked if there are duplicate entry.

This proposed implementation is more specific and introduce an entire new set of ops and a specific freq table to support this special configuration.

A union is introduced in rcg2 struct to not duplicate the struct. A new set of ops clk_rcg2_fm_ops are introduced to support this new kind of frequency table.

Changes v8:
- Add Tested-by tag
- Fix typo in commit description
- Address requested fixup for Stephen
Changes v7:
- Improve handling of exit condition on missing parent. Changes v6:
- Small rework of best_conf selection to mute Sparse warn. Changes v5:
- Rework selection logic with suggestion from Konrad
- Return -EINVAL and WARN if we fail to find a correct conf Changes v4:
- Drop suggested but wrong re-search patch
- Move everything to separate ops and struct to not affect current rcg2 users.
Changes v3:
- Add qcom_find_freq_exact
- Drop re-search on rcg2_set_rate
- Rework multiple conf patch to follow new implementation Changes v2:
- Out of RFC
- Fix compile warning from buildbot related to F redefinition

Christian Marangi (3):
clk: qcom: clk-rcg: introduce support for multiple conf for same freq
clk: qcom: clk-rcg2: add support for rcg2 freq multi ops
clk: qcom: gcc-ipq8074: rework nss_port5/6 clock to multiple conf

 drivers/clk/qcom/clk-rcg.h     |  24 ++++-
 drivers/clk/qcom/clk-rcg2.c    | 166 +++++++++++++++++++++++++++++++++
 drivers/clk/qcom/common.c      |  18 ++++
 drivers/clk/qcom/common.h      |   2 +
 drivers/clk/qcom/gcc-ipq8074.c | 120 +++++++++++++++---------
 5 files changed, 285 insertions(+), 45 deletions(-)
Signature · 1 line
2.40.1