summaryrefslogtreecommitdiff
path: root/common/memsize.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2025-10-06 13:20:24 -0600
committerTom Rini <trini@konsulko.com>2025-10-06 13:20:24 -0600
commit0eaa4b337336dbbe93395d1f2ccc18937eaafea2 (patch)
treec01e661d69181dceca68f56a4849a9bd04608521 /common/memsize.c
parente50b1e8715011def8aff1588081a2649a2c6cd47 (diff)
parent4e4a9de31de2a5f395ee25c59e4026422fbcb27e (diff)
Merge branch 'next'
Merge the outstanding changes from the 'next' branch to master.
Diffstat (limited to 'common/memsize.c')
-rw-r--r--common/memsize.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/common/memsize.c b/common/memsize.c
index 86109579c95..3c3ae6f1eba 100644
--- a/common/memsize.c
+++ b/common/memsize.c
@@ -52,7 +52,10 @@ long get_ram_size(long *base, long maxsize)
long val;
long size;
int i = 0;
- int dcache_en = dcache_status();
+ int dcache_en = 0;
+
+ if (!CONFIG_IS_ENABLED(SYS_DCACHE_OFF))
+ dcache_en = dcache_status();
for (cnt = (maxsize / sizeof(long)) >> 1; cnt > 0; cnt >>= 1) {
addr = base + cnt; /* pointer arith! */