From: Konrad Dybcio <konrad.dybcio@linaro.org>
To: Andy Gross <agross@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Herbert Xu <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>, Vinod Koul <vkoul@kernel.org>
Cc: Marijn Suijten <marijn.suijten@somainline.org>,
linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
Konrad Dybcio <konrad.dybcio@linaro.org>
Subject: [PATCH 2/3] crypto: qcom-rng: Make the core clock optional regardless of ACPI presence
Date: Fri, 11 Aug 2023 22:50:57 +0200 [thread overview]
Message-ID: <20230811-topic-8450_prng-v1-2-01becceeb1ee@linaro.org> (raw)
In-Reply-To: <20230811-topic-8450_prng-v1-0-01becceeb1ee@linaro.org>
Some newer SoCs (like SM8450) do not require a clock vote for the PRNG
to function. Make it entirely optional and rely on the bindings checker
to ensure platforms that need it, consume one.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
drivers/crypto/qcom-rng.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/drivers/crypto/qcom-rng.c b/drivers/crypto/qcom-rng.c
index 72dd1a4ebac4..825a729f205e 100644
--- a/drivers/crypto/qcom-rng.c
+++ b/drivers/crypto/qcom-rng.c
@@ -173,13 +173,9 @@ static int qcom_rng_probe(struct platform_device *pdev)
if (IS_ERR(rng->base))
return PTR_ERR(rng->base);
- /* ACPI systems have clk already on, so skip clk_get */
- if (!has_acpi_companion(&pdev->dev)) {
- rng->clk = devm_clk_get(&pdev->dev, "core");
- if (IS_ERR(rng->clk))
- return PTR_ERR(rng->clk);
- }
-
+ rng->clk = devm_clk_get_optional(&pdev->dev, "core");
+ if (IS_ERR(rng->clk))
+ return PTR_ERR(rng->clk);
rng->skip_init = (unsigned long)device_get_match_data(&pdev->dev);
--
2.41.0
next prev parent reply other threads:[~2023-08-11 20:51 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-11 20:50 [PATCH 0/3] Introduce PRNG on SM8450 Konrad Dybcio
2023-08-11 20:50 ` [PATCH 1/3] dt-bindings: crypto: qcom,prng: Add SM8450 Konrad Dybcio
2023-08-13 9:48 ` Conor Dooley
2023-08-18 16:17 ` Om Prakash Singh
2023-08-19 7:45 ` Krzysztof Kozlowski
2023-08-21 0:52 ` Om Prakash Singh
2023-08-21 6:07 ` Krzysztof Kozlowski
2023-08-22 4:27 ` Om Prakash Singh
2023-08-11 20:50 ` Konrad Dybcio [this message]
2023-08-14 2:39 ` [PATCH 2/3] crypto: qcom-rng: Make the core clock optional regardless of ACPI presence Bjorn Andersson
2023-08-11 20:50 ` [PATCH 3/3] arm64: dts: qcom: sm8450: Add PRNG Konrad Dybcio
2023-08-14 3:27 ` (subset) [PATCH 0/3] Introduce PRNG on SM8450 Bjorn Andersson
2023-08-18 10:26 ` Herbert Xu
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=20230811-topic-8450_prng-v1-2-01becceeb1ee@linaro.org \
--to=konrad.dybcio@linaro.org \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=herbert@gondor.apana.org.au \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marijn.suijten@somainline.org \
--cc=robh+dt@kernel.org \
--cc=vkoul@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;
as well as URLs for NNTP newsgroup(s).