summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryan Brattlof <bb@ti.com>2024-02-15 10:52:30 -0600
committerFrancesco Dolcini <francesco.dolcini@toradex.com>2024-03-21 14:26:33 +0000
commit13de31aeaa37b4ddeebccb9b1c8963fff539e94e (patch)
tree10e6d0f2ef148dc969d792abd02c9b5b90dfdcfb
parent97cb5d477807bf5b365c8259d0f8f05bc40e92d6 (diff)
ram: k3-ddrss: limit only the am64x addressable range
The AM64x and some of the AM62xx family of devices use the same 16b controller though only the AM64x is limited to 2GB addressable. Annoyingly the address alias detection machinery defaults to the full 8GB for the AM64x. Reset this value to 2GB only if we're initializin DDR on an am64x device Signed-off-by: Bryan Brattlof <bb@ti.com>
-rw-r--r--drivers/ram/k3-ddrss/k3-ddrss.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/ram/k3-ddrss/k3-ddrss.c b/drivers/ram/k3-ddrss/k3-ddrss.c
index a7a0b8bca9..2254ecc085 100644
--- a/drivers/ram/k3-ddrss/k3-ddrss.c
+++ b/drivers/ram/k3-ddrss/k3-ddrss.c
@@ -781,11 +781,11 @@ static int k3_ddrss_probe(struct udevice *dev)
if (ret)
return ret;
-#ifdef CONFIG_K3_AM64_DDRSS
- /* AM64x supports only up to 2 GB SDRAM */
- writel(0x000001EF, ddrss->ddrss_ss_cfg + DDRSS_V2A_CTL_REG);
- writel(0x0, ddrss->ddrss_ss_cfg + DDRSS_ECC_CTRL_REG);
-#endif
+ if (IS_ENABLED(CONFIG_SOC_K3_AM642)) {
+ /* AM64x supports only up to 2 GB SDRAM */
+ writel(0x000001EF, ddrss->ddrss_ss_cfg + DDRSS_V2A_CTL_REG);
+ writel(0x0, ddrss->ddrss_ss_cfg + DDRSS_ECC_CTRL_REG);
+ }
ddrss->driverdt = lpddr4_getinstance();