drivers/memory/brcmstb_memc.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
The same limitations that apply to LPDDR4 also apply to LPDDR5. Expand
the check and rename accordingly.
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
---
drivers/memory/brcmstb_memc.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/memory/brcmstb_memc.c b/drivers/memory/brcmstb_memc.c
index ba73470b1b13..c28fe9093616 100644
--- a/drivers/memory/brcmstb_memc.c
+++ b/drivers/memory/brcmstb_memc.c
@@ -14,6 +14,7 @@
#define REG_MEMC_CNTRLR_CONFIG 0x00
#define CNTRLR_CONFIG_LPDDR4_SHIFT 5
+#define CNTRLR_CONFIG_LPDDR5_SHIFT 6
#define CNTRLR_CONFIG_MASK 0xf
#define REG_MEMC_SRPD_CFG_21 0x20
#define REG_MEMC_SRPD_CFG_20 0x34
@@ -34,14 +35,15 @@ struct brcmstb_memc {
u32 srpd_offset;
};
-static int brcmstb_memc_uses_lpddr4(struct brcmstb_memc *memc)
+static int brcmstb_memc_uses_lpddr45(struct brcmstb_memc *memc)
{
void __iomem *config = memc->ddr_ctrl + REG_MEMC_CNTRLR_CONFIG;
u32 reg;
reg = readl_relaxed(config) & CNTRLR_CONFIG_MASK;
- return reg == CNTRLR_CONFIG_LPDDR4_SHIFT;
+ return reg == CNTRLR_CONFIG_LPDDR4_SHIFT ||
+ reg == CNTRLR_CONFIG_LPDDR5_SHIFT;
}
static int brcmstb_memc_srpd_config(struct brcmstb_memc *memc,
@@ -95,7 +97,7 @@ static ssize_t srpd_store(struct device *dev, struct device_attribute *attr,
* dynamic tuning process will also get affected by the inactivity
* timeout, thus making it non functional.
*/
- if (brcmstb_memc_uses_lpddr4(memc))
+ if (brcmstb_memc_uses_lpddr45(memc))
return -EOPNOTSUPP;
ret = kstrtouint(buf, 10, &val);
--
2.43.0
On 1/21/26 16:35, Florian Fainelli wrote: > The same limitations that apply to LPDDR4 also apply to LPDDR5. Expand > the check and rename accordingly. > > Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com> Krzysztof, can you take this patch? Thanks! -- Florian
On 04/02/2026 19:34, Florian Fainelli wrote: > On 1/21/26 16:35, Florian Fainelli wrote: >> The same limitations that apply to LPDDR4 also apply to LPDDR5. Expand >> the check and rename accordingly. >> >> Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com> > > Krzysztof, can you take this patch? Thanks! I will take it, but it was too late in the cycle and now is merge window. I still have it in my queue, I will take it after the merge window. Best regards, Krzysztof
© 2016 - 2026 Red Hat, Inc.