From: Rob Herring <robh@kernel.org>
To: Florian Fainelli <florian.fainelli@broadcom.com>
Cc: linux-kernel@vger.kernel.org, justin.chen@broadcom.com,
Krzysztof Kozlowski <krzk@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Broadcom internal kernel review list
<bcm-kernel-feedback-list@broadcom.com>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@vger.kernel.org>,
"moderated list:BROADCOM BCM7XXX ARM ARCHITECTURE"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 2/2] memory: brcmstb_memc: Simplify compatible matching
Date: Thu, 5 Jun 2025 13:55:57 -0500 [thread overview]
Message-ID: <20250605185557.GA3023589-robh@kernel.org> (raw)
In-Reply-To: <20250523184354.1249577-3-florian.fainelli@broadcom.com>
On Fri, May 23, 2025 at 11:43:54AM -0700, Florian Fainelli wrote:
> Now that a "brcm,brcmstb-memc-ddr-rev-b.2.x" fallback compatible string
> has been defined, we can greatly simplify the matching within the driver
> to only look for that compatible string and nothing else.
>
> The fallback "brcm,brcmstb-memc-ddr" is also updated to assume the V21
> register layout since that is the most common nowadays.
>
> Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
> ---
> drivers/memory/brcmstb_memc.c | 58 ++---------------------------------
> 1 file changed, 3 insertions(+), 55 deletions(-)
>
> diff --git a/drivers/memory/brcmstb_memc.c b/drivers/memory/brcmstb_memc.c
> index c87b37e2c1f0..ec4c198ddc49 100644
> --- a/drivers/memory/brcmstb_memc.c
> +++ b/drivers/memory/brcmstb_memc.c
> @@ -181,65 +181,13 @@ static const struct of_device_id brcmstb_memc_of_match[] = {
> .data = &brcmstb_memc_versions[BRCMSTB_MEMC_V20]
> },
> {
> - .compatible = "brcm,brcmstb-memc-ddr-rev-b.2.1",
> + .compatible = "brcm,brcmstb-memc-ddr-rev-b.2.x",
> .data = &brcmstb_memc_versions[BRCMSTB_MEMC_V21]
This entry is pointless because the default will get V21.
In fact, I don't think you need the new compatible string at all. It
doesn't work to add fallbacks after the fact.
Rob
next prev parent reply other threads:[~2025-06-05 18:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-23 18:43 [PATCH 0/2] Simplify compatible matching for brcmstb_memc Florian Fainelli
2025-05-23 18:43 ` [PATCH 1/2] dt-bindings: memory-controller: Define fallback compatible Florian Fainelli
2025-05-23 18:43 ` [PATCH 2/2] memory: brcmstb_memc: Simplify compatible matching Florian Fainelli
2025-06-05 18:55 ` Rob Herring [this message]
2025-06-05 19:10 ` Florian Fainelli
2025-06-05 20:30 ` Krzysztof Kozlowski
2025-06-05 21:15 ` Florian Fainelli
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=20250605185557.GA3023589-robh@kernel.org \
--to=robh@kernel.org \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=florian.fainelli@broadcom.com \
--cc=justin.chen@broadcom.com \
--cc=krzk@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.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