[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250605185557.GA3023589-robh@kernel.org>
Date: Thu, 5 Jun 2025 13:55:57 -0500
From: Rob Herring <robh@...nel.org>
To: Florian Fainelli <florian.fainelli@...adcom.com>
Cc: linux-kernel@...r.kernel.org, justin.chen@...adcom.com,
Krzysztof Kozlowski <krzk@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Broadcom internal kernel review list <bcm-kernel-feedback-list@...adcom.com>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" <devicetree@...r.kernel.org>,
"moderated list:BROADCOM BCM7XXX ARM ARCHITECTURE" <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH 2/2] memory: brcmstb_memc: Simplify compatible matching
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@...adcom.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
Powered by blists - more mailing lists