Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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.

Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
Link: https://patch.msgid.link/20260122003501.1191059-1-florian.fainelli@broadcom.com
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>

authored by

Florian Fainelli and committed by
Krzysztof Kozlowski
a969a083 9983d51d

+5 -3
+5 -3
drivers/memory/brcmstb_memc.c
··· 14 14 15 15 #define REG_MEMC_CNTRLR_CONFIG 0x00 16 16 #define CNTRLR_CONFIG_LPDDR4_SHIFT 5 17 + #define CNTRLR_CONFIG_LPDDR5_SHIFT 6 17 18 #define CNTRLR_CONFIG_MASK 0xf 18 19 #define REG_MEMC_SRPD_CFG_21 0x20 19 20 #define REG_MEMC_SRPD_CFG_20 0x34 ··· 35 34 u32 srpd_offset; 36 35 }; 37 36 38 - static int brcmstb_memc_uses_lpddr4(struct brcmstb_memc *memc) 37 + static int brcmstb_memc_uses_lpddr45(struct brcmstb_memc *memc) 39 38 { 40 39 void __iomem *config = memc->ddr_ctrl + REG_MEMC_CNTRLR_CONFIG; 41 40 u32 reg; 42 41 43 42 reg = readl_relaxed(config) & CNTRLR_CONFIG_MASK; 44 43 45 - return reg == CNTRLR_CONFIG_LPDDR4_SHIFT; 44 + return reg == CNTRLR_CONFIG_LPDDR4_SHIFT || 45 + reg == CNTRLR_CONFIG_LPDDR5_SHIFT; 46 46 } 47 47 48 48 static int brcmstb_memc_srpd_config(struct brcmstb_memc *memc, ··· 97 95 * dynamic tuning process will also get affected by the inactivity 98 96 * timeout, thus making it non functional. 99 97 */ 100 - if (brcmstb_memc_uses_lpddr4(memc)) 98 + if (brcmstb_memc_uses_lpddr45(memc)) 101 99 return -EOPNOTSUPP; 102 100 103 101 ret = kstrtouint(buf, 10, &val);