From: Will Deacon <will.deacon@arm.com>
To: Vivek Gautam <vivek.gautam@codeaurora.org>
Cc: Robin Murphy <robin.murphy@arm.com>,
sboyd@kernel.org,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@vger.kernel.org>,
"list@263.net:IOMMU DRIVERS <iommu@lists.linux-foundation.org>,
Joerg Roedel <joro@8bytes.org>,"
<iommu@lists.linux-foundation.org>,
Joerg Roedel <joro@8bytes.org>, robh+dt <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Linux PM <linux-pm@vger.kernel.org>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
open list <linux-kernel@vger.kernel.org>,
alex.williamson@redhat.com,
linux-arm-msm <linux-arm-msm@vger.kernel.org>,
freedreno <freedreno@lists.freedesktop.org>
Subject: Re: [PATCH v18 1/5] iommu/arm-smmu: Add pm_runtime/sleep ops
Date: Fri, 30 Nov 2018 18:15:37 +0000 [thread overview]
Message-ID: <20181130181536.GA15274@arm.com> (raw)
In-Reply-To: <CAFp+6iEC8hobAdVF5nLdhQdCUqbi1xa4Vi-NLugGshV=dg+h1A@mail.gmail.com>
On Thu, Nov 29, 2018 at 08:25:20PM +0530, Vivek Gautam wrote:
> On Wed, Nov 28, 2018 at 10:07 PM Robin Murphy <robin.murphy@arm.com> wrote:
> >
> > On 28/11/2018 16:24, Stephen Boyd wrote:
> > > Quoting Vivek Gautam (2018-11-27 02:11:41)
> > >> @@ -1966,6 +1970,23 @@ static const struct of_device_id arm_smmu_of_match[] = {
> > >> };
> > >> MODULE_DEVICE_TABLE(of, arm_smmu_of_match);
> > >>
> > >> +static void arm_smmu_fill_clk_data(struct arm_smmu_device *smmu,
> > >> + const char * const *clks)
> > >> +{
> > >> + int i;
> > >> +
> > >> + if (smmu->num_clks < 1)
> > >> + return;
> > >> +
> > >> + smmu->clks = devm_kcalloc(smmu->dev, smmu->num_clks,
> > >> + sizeof(*smmu->clks), GFP_KERNEL);
> > >> + if (!smmu->clks)
> > >> + return;
> > >> +
> > >> + for (i = 0; i < smmu->num_clks; i++)
> > >> + smmu->clks[i].id = clks[i];
> > >
> > > Is this clk_bulk_get_all()?
>
> From what I remember, and now I could go back to v7 and check [1], we parked
> clk_bulk_get out of OF's sole purview as we also have
> arm_smmu_device_acpi_probe() besides arm_smmu_device_dt_probe().
>
> arm_smmu_device_dt_probe() could get the clocks from dt and fill in
> the clock bulk data, and
> similarly, arm_smmu_device_acpi_probe() could fill the clock bulk data
> by getting it from ACPI.
>
> clk_bulk_get_all() seems like going only the OF way.
> Is there another way here to have something common between ACPI
> and OF, and then do the clk_bulk_get?
I'd say just go with clk_bulk_get_all() and if somebody really wants to
mess with the SMMU clocks on a system booted via ACPI, then it's their
problem to solve. My understanding is that the design of IORT makes this
next to impossible to solve anyway, because a static table is used and
therefore we're unable to run whatever ASL methods need to be invoked to
mess with the clocks.
Will
next prev parent reply other threads:[~2018-11-30 18:15 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-27 10:11 [PATCH v18 0/5] iommu/arm-smmu: Add runtime pm/sleep support Vivek Gautam
2018-11-27 10:11 ` [PATCH v18 1/5] iommu/arm-smmu: Add pm_runtime/sleep ops Vivek Gautam
2018-11-28 14:32 ` Thor Thayer
2018-11-28 16:24 ` Stephen Boyd
2018-11-28 16:36 ` Robin Murphy
2018-11-29 14:55 ` Vivek Gautam
2018-11-30 18:15 ` Will Deacon [this message]
2018-12-03 6:43 ` Vivek Gautam
2018-12-03 23:44 ` Stephen Boyd
2018-11-27 10:11 ` [PATCH v18 2/5] iommu/arm-smmu: Invoke pm_runtime during probe, add/remove device Vivek Gautam
2018-11-27 10:11 ` [PATCH v18 3/5] iommu/arm-smmu: Add the device_link between masters and smmu Vivek Gautam
2018-11-27 10:11 ` [PATCH v18 4/5] dt-bindings: arm-smmu: Add bindings for qcom,smmu-v2 Vivek Gautam
2018-11-27 10:11 ` [PATCH v18 5/5] iommu/arm-smmu: Add support for qcom,smmu-v2 variant Vivek Gautam
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=20181130181536.GA15274@arm.com \
--to=will.deacon@arm.com \
--cc=alex.williamson@redhat.com \
--cc=devicetree@vger.kernel.org \
--cc=freedreno@lists.freedesktop.org \
--cc=iommu@lists.linux-foundation.org \
--cc=joro@8bytes.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=rjw@rjwysocki.net \
--cc=robh+dt@kernel.org \
--cc=robin.murphy@arm.com \
--cc=sboyd@kernel.org \
--cc=vivek.gautam@codeaurora.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
Powered by JetHome