public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Christian Marangi <ansuelsmth@gmail.com>
To: Andy Gross <agross@kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konrad.dybcio@somainline.org>,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>,
	linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org,
	linux-kernel@vger.kernel.org
Cc: Christian Marangi <ansuelsmth@gmail.com>
Subject: [PATCH v2 0/4] clk: qcom: clk-rcg2: introduce support for multiple conf for same freq
Date: Thu,  3 Nov 2022 14:49:40 +0100	[thread overview]
Message-ID: <20221103134944.23275-1-ansuelsmth@gmail.com> (raw)

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 keep the CEIL FLOOR
logic while maitaining the possibility to provide multiple
configuration.

The first 2 patch drop redundant F entry redefinition.

The 3rd one implement the change with also some macro description on how
this new implementation works

The 4th one migrate the gcc-ipq8074 driver to this new implementation.

Changes v2:
- Out of RFC
- Fix compile warning from buildbot related to F redefinition

Christian Marangi (4):
  clk: qcom: gcc-ipq6018: drop redundant F define
  clk: qcom: gcc-sdm660: drop redundant F define
  clk: qcom: clk-rcg2: introduce support for multiple conf for same freq
  clk: qcom: gcc-ipq8074: rework nss_port5/6 clock to multiple conf

 drivers/clk/qcom/clk-rcg.h     | 14 +++++-
 drivers/clk/qcom/clk-rcg2.c    | 84 ++++++++++++++++++++++++++++++----
 drivers/clk/qcom/gcc-ipq6018.c |  2 -
 drivers/clk/qcom/gcc-ipq8074.c | 64 +++++++++++++++++++-------
 drivers/clk/qcom/gcc-sdm660.c  |  2 -
 5 files changed, 136 insertions(+), 30 deletions(-)

-- 
2.37.2


             reply	other threads:[~2022-11-03 13:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-03 13:49 Christian Marangi [this message]
2022-11-03 13:49 ` [PATCH v2 1/4] clk: qcom: gcc-ipq6018: drop redundant F define Christian Marangi
2022-11-03 13:49 ` [PATCH v2 2/4] clk: qcom: gcc-sdm660: " Christian Marangi
2022-11-03 13:49 ` [PATCH v2 3/4] clk: qcom: clk-rcg2: introduce support for multiple conf for same freq Christian Marangi
2022-11-03 13:49 ` [PATCH v2 4/4] clk: qcom: gcc-ipq8074: rework nss_port5/6 clock to multiple conf Christian Marangi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221103134944.23275-1-ansuelsmth@gmail.com \
    --to=ansuelsmth@gmail.com \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=konrad.dybcio@somainline.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=sboyd@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox