From: E Shattow <e@freeshell.de>
To: Minda Chen <minda.chen@starfivetech.com>,
Hal Feng <hal.feng@starfivetech.com>,
Leo Liang <ycliang@andestech.com>,
Heinrich Schuchardt <xypron.glpk@gmx.de>,
Tom Rini <trini@konsulko.com>
Cc: u-boot@lists.denx.de, E Shattow <e@freeshell.de>
Subject: [PATCH v1 1/3] ram: starfive: drop references to 16GB memory size
Date: Wed, 29 Oct 2025 23:23:32 -0700 [thread overview]
Message-ID: <20251030062354.35413-2-e@freeshell.de> (raw)
In-Reply-To: <20251030062354.35413-1-e@freeshell.de>
16GB memory size is not addressable on StarFive JH-7110 SoC because the
DRAM uncached alias begins at +8GB offset from start of DRAM. The logic
for 16GB memory size is a fall-through to the default for an unknown size.
Let's drop this unnecessary 16GB memory size and rely on the case default.
Signed-off-by: E Shattow <e@freeshell.de>
---
drivers/ram/starfive/ddrcsr_boot.c | 3 ---
drivers/ram/starfive/ddrphy_start.c | 1 -
drivers/ram/starfive/starfive_ddr.c | 1 -
drivers/ram/starfive/starfive_ddr.h | 1 -
4 files changed, 6 deletions(-)
diff --git a/drivers/ram/starfive/ddrcsr_boot.c b/drivers/ram/starfive/ddrcsr_boot.c
index 6764b3ed5cc..ece6f5aae94 100644
--- a/drivers/ram/starfive/ddrcsr_boot.c
+++ b/drivers/ram/starfive/ddrcsr_boot.c
@@ -231,7 +231,6 @@ void ddrcsr_boot(u32 *csrreg, u32 *secreg, u32 *phyreg, enum ddr_size_t size)
mask = REG8G;
break;
- case DDR_SIZE_16G:
default:
return;
};
@@ -260,7 +259,6 @@ void ddrcsr_boot(u32 *csrreg, u32 *secreg, u32 *phyreg, enum ddr_size_t size)
out_le32(csrreg + REGOFFSET(0x10), 0x3c);
break;
- case DDR_SIZE_16G:
default:
break;
};
@@ -286,7 +284,6 @@ void ddrcsr_boot(u32 *csrreg, u32 *secreg, u32 *phyreg, enum ddr_size_t size)
break;
case DDR_SIZE_2G:
- case DDR_SIZE_16G:
default:
break;
};
diff --git a/drivers/ram/starfive/ddrphy_start.c b/drivers/ram/starfive/ddrphy_start.c
index efe3f8a181a..f26bc9ccaad 100644
--- a/drivers/ram/starfive/ddrphy_start.c
+++ b/drivers/ram/starfive/ddrphy_start.c
@@ -267,7 +267,6 @@ void ddr_phy_start(u32 *phyreg, enum ddr_size_t size)
mask = REG8G;
break;
- case DDR_SIZE_16G:
default:
return;
};
diff --git a/drivers/ram/starfive/starfive_ddr.c b/drivers/ram/starfive/starfive_ddr.c
index b31ed3bcf61..9e902f03ee9 100644
--- a/drivers/ram/starfive/starfive_ddr.c
+++ b/drivers/ram/starfive/starfive_ddr.c
@@ -47,7 +47,6 @@ static int starfive_ddr_setup(struct udevice *dev, struct starfive_ddr_priv *pri
size = DDR_SIZE_8G;
break;
- case 0x400000000:
default:
pr_err("unsupport size %lx\n", priv->info.size);
return -EINVAL;
diff --git a/drivers/ram/starfive/starfive_ddr.h b/drivers/ram/starfive/starfive_ddr.h
index c29d26b510c..3ab0b0e8fa6 100644
--- a/drivers/ram/starfive/starfive_ddr.h
+++ b/drivers/ram/starfive/starfive_ddr.h
@@ -48,7 +48,6 @@ enum ddr_size_t {
DDR_SIZE_2G,
DDR_SIZE_4G,
DDR_SIZE_8G,
- DDR_SIZE_16G,
};
void ddr_phy_train(u32 *phyreg);
--
2.50.0
next prev parent reply other threads:[~2025-10-30 6:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-30 6:23 [PATCH v1 0/3] ram: starfive: cleanup size types and typos E Shattow
2025-10-30 6:23 ` E Shattow [this message]
2025-10-30 7:53 ` [PATCH v1 1/3] ram: starfive: drop references to 16GB memory size Heinrich Schuchardt
2025-11-03 4:21 ` E Shattow
2025-10-30 6:23 ` [PATCH v1 2/3] ram: starfive: use SZ_8G for 8GB " E Shattow
2025-10-30 6:31 ` Hal Feng
2025-10-30 7:56 ` Heinrich Schuchardt
2025-10-30 6:23 ` [PATCH v1 3/3] ram: starfive: fix typo for unsupported DDR size E Shattow
2025-10-30 7:55 ` Heinrich Schuchardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251030062354.35413-2-e@freeshell.de \
--to=e@freeshell.de \
--cc=hal.feng@starfivetech.com \
--cc=minda.chen@starfivetech.com \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
--cc=xypron.glpk@gmx.de \
--cc=ycliang@andestech.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox