linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Cc: yong.wu@mediatek.com, joro@8bytes.org, will@kernel.org,
	krzysztof.kozlowski+dt@linaro.org, matthias.bgg@gmail.com,
	iommu@lists.linux-foundation.org,
	linux-mediatek@lists.infradead.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 7/8] dt-bindings: iommu: mediatek: Require mediatek,infracfg for mt2712/8173
Date: Wed, 18 May 2022 13:43:39 -0500	[thread overview]
Message-ID: <20220518184339.GJ3302100-robh@kernel.org> (raw)
In-Reply-To: <4ed63c3a-ec47-5801-ab89-b7d1a597c0da@collabora.com>

On Wed, May 18, 2022 at 10:14:43AM +0200, AngeloGioacchino Del Regno wrote:
> Il 18/05/22 03:41, Rob Herring ha scritto:
> > On Tue, May 17, 2022 at 03:21:06PM +0200, AngeloGioacchino Del Regno wrote:
> > > Both MT2712 and MT8173 got a mediatek,infracfg phandle: add that to
> > > the required properties for these SoCs to deprecate the old way of
> > > looking for SoC-specific infracfg compatible in the entire devicetree.
> > 
> > Wait, what? If there's only one possible node that can match, I prefer
> > the 'old way'. Until we implemented a phandle cache, searching the
> > entire tree was how phandle lookups worked too, so not any better.
> > 
> > But if this makes things more consistent,
> > 
> > Acked-by: Rob Herring <robh@kernel.org>
> 
> 
> Hello Rob,
> 
> This makes things definitely more consistent, as it's done like that on
> mtk-pm-domains and other mtk drivers as well.
> 
> The main reason why this phandle is useful, here and in other drivers, is
> that we're seeing a list of compatibles that is growing more and more, so
> you see stuff like (mockup names warning):
> 
> switch (some_model)
> case MT1000:
> 	p = "mediatek,mt1000-infracfg";
> 	break;
> case MT1001:
> 	p = "mediatek,mt1001-infracfg";
> 	break;
> case MT1002:
> 	p = "mediatek,mt1002-infracfg";
> 	break;
> .....add another 20 SoCs, replicate this switch for 4/5 drivers....

This type of property is used for poking random bits in another block 
(that's usually a collection of random bits). These interfaces don't 
tend to be that stable across many SoC generations. As there's no 
abstraction beyond perhaps what the offset is, the client side ends up 
needing to know the specifics of that block anyways. If the block is 
that stable, then perhaps it needs a common fallback compatible.

Sometimes these instances are also just places we haven't created a 
common subsystem for.

> and this is why I want the mtk_iommu driver to also get that phandle like
> some other drivers are already doing.

As I said, fine.

Rob

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-05-18 18:45 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-17 13:20 [PATCH 0/8] mtk_iommu: Specify phandles to infracfg and pericfg AngeloGioacchino Del Regno
2022-05-17 13:21 ` [PATCH 1/8] dt-bindings: iommu: mediatek: Add mediatek, infracfg phandle AngeloGioacchino Del Regno
2022-05-17 14:23   ` [PATCH 1/8] dt-bindings: iommu: mediatek: Add mediatek,infracfg phandle Krzysztof Kozlowski
2022-05-18  9:16   ` Matthias Brugger
2022-05-17 13:21 ` [PATCH 2/8] iommu: mtk_iommu: Lookup phandle to retrieve syscon to infracfg AngeloGioacchino Del Regno
2022-05-17 14:12   ` Robin Murphy
2022-05-18  8:29     ` AngeloGioacchino Del Regno
2022-05-18 11:07       ` Robin Murphy
2022-05-18 18:46         ` Rob Herring
2022-05-17 13:21 ` [PATCH 3/8] dt-bindings: iommu: mediatek: Add mediatek, pericfg phandle AngeloGioacchino Del Regno
2022-05-17 14:23   ` [PATCH 3/8] dt-bindings: iommu: mediatek: Add mediatek,pericfg phandle Krzysztof Kozlowski
2022-05-17 13:21 ` [PATCH 4/8] iommu: mtk_iommu: Lookup phandle to retrieve syscon to pericfg AngeloGioacchino Del Regno
2022-05-18 10:17   ` Matthias Brugger
2022-05-17 13:21 ` [PATCH 5/8] arm64: dts: mediatek: mt8173: Add mediatek, infracfg phandle for IOMMU AngeloGioacchino Del Regno
2022-05-17 13:21 ` [PATCH 6/8] arm64: dts: mediatek: mt2712e: " AngeloGioacchino Del Regno
2022-05-17 13:21 ` [PATCH 7/8] dt-bindings: iommu: mediatek: Require mediatek, infracfg for mt2712/8173 AngeloGioacchino Del Regno
2022-05-18  1:41   ` [PATCH 7/8] dt-bindings: iommu: mediatek: Require mediatek,infracfg " Rob Herring
2022-05-18  8:14     ` AngeloGioacchino Del Regno
2022-05-18 18:43       ` Rob Herring [this message]
2022-05-17 13:21 ` [PATCH 8/8] dt-bindings: iommu: mediatek: Require mediatek, pericfg for mt8195-infra AngeloGioacchino Del Regno
2022-05-18  1:42   ` [PATCH 8/8] dt-bindings: iommu: mediatek: Require mediatek,pericfg " Rob Herring

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=20220518184339.GJ3302100-robh@kernel.org \
    --to=robh@kernel.org \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=devicetree@vger.kernel.org \
    --cc=iommu@lists.linux-foundation.org \
    --cc=joro@8bytes.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=will@kernel.org \
    --cc=yong.wu@mediatek.com \
    /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).