From: Bjorn Andersson <andersson@kernel.org>
To: Komal Bajaj <quic_kbajaj@quicinc.com>
Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
Andy Gross <agross@kernel.org>,
Konrad Dybcio <konrad.dybcio@linaro.org>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org
Subject: Re: [PATCH v3 04/10] nvmem: qfprom: Add support for secure reading on QDU1000/QRU1000
Date: Sat, 27 May 2023 14:08:49 -0700 [thread overview]
Message-ID: <20230527210849.sd3ycp2pqyorpbpr@ripper> (raw)
In-Reply-To: <257e11b5-29b5-78c6-882b-ec3bb64ee28b@quicinc.com>
On Mon, May 15, 2023 at 02:02:11PM +0530, Komal Bajaj wrote:
>
>
> On 5/12/2023 11:01 PM, Dmitry Baryshkov wrote:
> > On Fri, 12 May 2023 at 20:01, Krzysztof Kozlowski
> > <krzysztof.kozlowski@linaro.org> wrote:
> > > On 12/05/2023 14:21, Komal Bajaj wrote:
> > > > Add qfprom driver support for QDU1000/QRU1000 SOCs.
> > > >
> > > > Signed-off-by: Komal Bajaj <quic_kbajaj@quicinc.com>
> > > > ---
> > > > drivers/nvmem/qfprom.c | 5 +++++
> > > > 1 file changed, 5 insertions(+)
> > > >
> > > > diff --git a/drivers/nvmem/qfprom.c b/drivers/nvmem/qfprom.c
> > > > index 20662e2d3732..12a7981a8a71 100644
> > > > --- a/drivers/nvmem/qfprom.c
> > > > +++ b/drivers/nvmem/qfprom.c
> > > > @@ -109,6 +109,10 @@ struct qfprom_soc_compatible_data {
> > > > bool secure;
> > > > };
> > > >
> > > > +static const struct qfprom_soc_compatible_data qdu1000_qfprom = {
> > > > + .secure = true
> > > > +};
> > > > +
> > > > static const struct nvmem_keepout sc7180_qfprom_keepout[] = {
> > > > {.start = 0x128, .end = 0x148},
> > > > {.start = 0x220, .end = 0x228}
> > > > @@ -490,6 +494,7 @@ static int qfprom_probe(struct platform_device *pdev)
> > > >
> > > > static const struct of_device_id qfprom_of_match[] = {
> > > > { .compatible = "qcom,qfprom",},
> > > > + { .compatible = "qcom,qdu1000-qfprom", .data = &qdu1000_qfprom},
> > > > { .compatible = "qcom,sc7180-qfprom", .data = &sc7180_qfprom},
> > > I have doubts that this is still compatible with qcom,qfprom. It uses
> > > entirely different read method. That's why generic fallbacks are bad,
> > > one more case to my growing list of awesome examples. :)
> Okay, will do that.
> > Yes, it looks like it should be 'qcom,qdu1000-qfprom",
> > "qcom,scm-qfprom". And possibly a separate driver for scm-qfprom.
> The only difference here is in read method, which can be controlled by a
> single property,
> do we really need to write a separate driver for just reading secure feature
> register.
I presume that if reads are hidden behind scm, then the most of the
driver - which deals with writing to qfprom - isn't going to be at all
applicable.
So, I actually think it would make sense to put that in a separate
qfprom-scm driver, which handles the generic fallback of
"qcom,qfprom-scm".
Regards,
Bjorn
>
> Thanks,
> Komal
> >
> >
>
next prev parent reply other threads:[~2023-05-27 21:05 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-12 12:21 [PATCH v3 00/10] soc: qcom: llcc: Add support for QDU1000/QRU1000 Komal Bajaj
2023-05-12 12:21 ` [PATCH v3 01/10] nvmem: qfprom: Add support for secure reading Komal Bajaj
2023-05-27 20:50 ` Bjorn Andersson
2023-06-01 11:30 ` Komal Bajaj
2023-05-12 12:21 ` [PATCH v3 02/10] dt-bindings: nvmem: qfprom: Add compatible for QDU1000/QRU1000 Komal Bajaj
2023-05-12 16:56 ` Krzysztof Kozlowski
2023-05-15 7:08 ` Komal Bajaj
2023-05-15 9:04 ` Krzysztof Kozlowski
2023-05-15 9:05 ` Krzysztof Kozlowski
2023-05-12 12:21 ` [PATCH v3 03/10] arm64: dts: qcom: qdu1000: Add properties to qfprom for multi channel DDR Komal Bajaj
2023-05-12 16:58 ` Krzysztof Kozlowski
2023-05-12 12:21 ` [PATCH v3 04/10] nvmem: qfprom: Add support for secure reading on QDU1000/QRU1000 Komal Bajaj
2023-05-12 17:01 ` Krzysztof Kozlowski
2023-05-12 17:31 ` Dmitry Baryshkov
2023-05-15 8:32 ` Komal Bajaj
2023-05-27 21:08 ` Bjorn Andersson [this message]
2023-05-12 12:21 ` [PATCH v3 05/10] soc: qcom: llcc: Refactor llcc driver to support multiple configuration Komal Bajaj
2023-05-12 12:21 ` [PATCH v3 06/10] soc: qcom: Add LLCC support for multi channel DDR Komal Bajaj
2023-05-12 19:39 ` kernel test robot
2023-05-12 19:39 ` kernel test robot
2023-06-13 17:11 ` Bjorn Andersson
2023-06-14 6:30 ` Komal Bajaj
2023-05-12 12:21 ` [PATCH v3 07/10] dt-bindings: arm: msm: Add LLCC compatible for QDU1000/QRU1000 Komal Bajaj
2023-05-13 9:29 ` Krzysztof Kozlowski
2023-05-15 8:38 ` Komal Bajaj
2023-05-12 12:21 ` [PATCH v3 08/10] Revert "arm64: dts: qcom: qdu1000: Add LLCC/system-cache-controller" Komal Bajaj
2023-05-13 9:30 ` Krzysztof Kozlowski
2023-05-12 12:21 ` [PATCH v3 09/10] arm64: dts: qcom: qdu1000: Add LLCC/system-cache-controller Komal Bajaj
2023-05-13 9:30 ` Krzysztof Kozlowski
2023-05-12 12:21 ` [PATCH v3 10/10] soc: qcom: llcc: Add QDU1000 and QRU1000 LLCC support Komal Bajaj
2023-05-12 16:56 ` [PATCH v3 00/10] soc: qcom: llcc: Add support for QDU1000/QRU1000 Krzysztof Kozlowski
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=20230527210849.sd3ycp2pqyorpbpr@ripper \
--to=andersson@kernel.org \
--cc=agross@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=konrad.dybcio@linaro.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=quic_kbajaj@quicinc.com \
--cc=robh+dt@kernel.org \
--cc=srinivas.kandagatla@linaro.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