From: Vinod <vkoul@kernel.org>
To: Timur Tabi <timur@codeaurora.org>
Cc: timur@kernel.org, linux-arm-msm@vger.kernel.org,
swboyd@chromium.org, linux-crypto@vger.kernel.org,
Matt Mackall <mpm@selenic.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 2/2] hwrng: msm: add ACPI support
Date: Fri, 22 Jun 2018 10:14:17 +0530 [thread overview]
Message-ID: <20180622044417.GI27187@vkoul-mobl> (raw)
In-Reply-To: <869e9828-5e34-49db-4387-629dcc4b09b0@codeaurora.org>
On 21-06-18, 23:26, Timur Tabi wrote:
> On 6/21/18 11:23 PM, Vinod wrote:
> > On 21-06-18, 10:17, Timur Tabi wrote:
> > > Add support for probing on ACPI systems, with ACPI HID QCOM8160.
> > >
> > > On ACPI systems, clocks are always enabled, the PRNG should
> > > already be enabled, and the register region is read-only.
> > > The driver only verifies that the hardware is already
> > > enabled never tries to disable or configure it.
> >
> > so if you are using v2 hardware, are you pointing to High Level OS EE or
> > some other..?
>
> I'm not sure what you mean.
>
> > > + /*
> > > + * ACPI systems have v2 hardware. The clocks are always enabled,
> > > + * the PRNG register space is read-only, and the PRNG should
> > > + * already be enabled.
> > > + */
> > > + if (has_acpi_companion(&pdev->dev)) {
> > > + u32 val;
> > > +
> > > + val = readl(rng->base + PRNG_CONFIG);
> >
> > v2 EEs dont seem to have CONFIG register, so not sure about this one
>
> I can post the register set, but this works on my silicon. The first device
> has all the registers. Then there are about 12-13 other devices with their
> own 64K register regions, and those don't have a config register.
The one on MSM8996 have 4K register space for each region and first two
regions are not accessible to the SW. They are part of security ring and
hence the CONFIG register is not accessible. If i try to access then it
borks!
Are you sure you are supposed to use the TZ there, I would presume the
lower level firmware would use that?
> I don't know why you would choose to support a one of the secondary register
> sets when you can use the primary.
Access denied is the reason :D
So this make me think you should do 2 level support for ACPI, one ACPI
support and one V2 support where we dont touch CONFIG register. That way
both regions will work
--
~Vinod
next prev parent reply other threads:[~2018-06-22 4:44 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-21 15:17 [PATCH 1/2] hwrng: msm: add a spinlock and support for blocking reads Timur Tabi
2018-06-21 15:17 ` [PATCH 2/2] hwrng: msm: add ACPI support Timur Tabi
2018-06-22 4:23 ` Vinod
2018-06-22 4:26 ` Timur Tabi
2018-06-22 4:44 ` Vinod [this message]
2018-06-22 4:46 ` Timur Tabi
2018-06-22 4:48 ` Vinod
2018-06-22 4:17 ` [PATCH 1/2] hwrng: msm: add a spinlock and support for blocking reads Vinod
2018-06-22 4:18 ` Timur Tabi
2018-06-22 4:24 ` Vinod
2018-06-22 4:28 ` Timur Tabi
2018-06-22 5:36 ` Stephen Boyd
2018-06-22 13:11 ` Timur Tabi
2018-06-22 15:38 ` Stanimir Varbanov
2018-06-22 15:41 ` Timur Tabi
2018-06-22 17:51 ` Stephen Boyd
2018-06-22 18:03 ` Timur Tabi
2018-06-22 21:17 ` Timur Tabi
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=20180622044417.GI27187@vkoul-mobl \
--to=vkoul@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=mpm@selenic.com \
--cc=swboyd@chromium.org \
--cc=timur@codeaurora.org \
--cc=timur@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