memory: brcmstb_memc: Expand LPDDR4 check to cover for LPDDR5
Subsystems (2)
Florian Fainelli
maintainerPATCH 1/1 memory: brcmstb_memc: Expand LPDDR4 check to cover for LPDDR5
The same limitations that apply to LPDDR4 also apply to LPDDR5. Expand the check and rename accordingly.
--- drivers/memory/brcmstb_memc.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/memory/brcmstb_memc.c +5 -3
@@ -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);
Signature · 1 line
2.43.0
Florian Fainelli
maintainerQuoted 4 lines · Florian Fainelli
The same limitations that apply to LPDDR4 also apply to LPDDR5. Expand the check and rename accordingly.
Signed-off-by Florian Fainelli <[email protected]>
Krzysztof, can you take this patch? Thanks!
Signature · 1 line
Florian
Krzysztof Kozlowski
maintainerQuoted 7 lines · Florian Fainelli
Quoted 4 lines · Florian Fainelli
The same limitations that apply to LPDDR4 also apply to LPDDR5. Expand the check and rename accordingly.
Signed-off-by Florian Fainelli <[email protected]>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
Quoted 4 lines · Florian Fainelli
The same limitations that apply to LPDDR4 also apply to LPDDR5. Expand the check and rename accordingly.
Applied, thanks!
[1/1] memory: brcmstb_memc: Expand LPDDR4 check to cover for LPDDR5
https://git.kernel.org/krzk/linux-mem-ctrl/c/a969a0835152984a0f556434eafdee0b84213670
Best regards,
Signature · 1 line
Krzysztof Kozlowski <[email protected]>