From: Michael Tretter <m.tretter@pengutronix.de>
To: Sascha Hauer <s.hauer@pengutronix.de>,
BAREBOX <barebox@lists.infradead.org>
Cc: Michael Tretter <m.tretter@pengutronix.de>
Subject: [PATCH 1/4] arm: socfpga: iossm: remove unused num_port
Date: Thu, 03 Sep 2026 18:12:42 +0200 [thread overview]
Message-ID: <20260903-socfpga-fix-sdram-setup-v1-1-0daa166adbca@pengutronix.de> (raw)
In-Reply-To: <20260903-socfpga-fix-sdram-setup-v1-0-0daa166adbca@pengutronix.de>
The dualport configuration is read from the handoff table and used for
configuration, but num_port is never read or used.
Remove the unused field.
Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
---
arch/arm/mach-socfpga/agilex5-sdram.c | 5 -----
arch/arm/mach-socfpga/iossm_mailbox.c | 5 ++---
arch/arm/mach-socfpga/iossm_mailbox.h | 2 --
3 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/arch/arm/mach-socfpga/agilex5-sdram.c b/arch/arm/mach-socfpga/agilex5-sdram.c
index fa940958d104..4a28713a3588 100644
--- a/arch/arm/mach-socfpga/agilex5-sdram.c
+++ b/arch/arm/mach-socfpga/agilex5-sdram.c
@@ -98,11 +98,6 @@ static int populate_ddr_handoff(struct altera_sdram_plat *plat, struct io96b_inf
plat->dualport = FIELD_GET(BIT(0), handoff_table[PORT_EMIF_CONFIG_OFFSET]);
pr_debug("%s: dualport from handoff: 0x%x\n", __func__, plat->dualport);
- if (plat->dualport)
- io96b_ctrl->num_port = 2;
- else
- io96b_ctrl->num_port = 1;
-
/* Read handoff - dual EMIF */
plat->dualemif = FIELD_GET(BIT(1), handoff_table[PORT_EMIF_CONFIG_OFFSET]);
pr_debug("%s: dualemif from handoff: 0x%x\n", __func__, plat->dualemif);
diff --git a/arch/arm/mach-socfpga/iossm_mailbox.c b/arch/arm/mach-socfpga/iossm_mailbox.c
index 6a9a7a489b75..b79ec87b4f46 100644
--- a/arch/arm/mach-socfpga/iossm_mailbox.c
+++ b/arch/arm/mach-socfpga/iossm_mailbox.c
@@ -49,7 +49,7 @@ static const char *ddr_type_list[7] = {
"DDR4", "DDR5", "DDR5_RDIMM", "LPDDR4", "LPDDR5", "QDRIV", "UNKNOWN"
};
-static int is_ddr_csr_clkgen_locked(u32 clkgen_mask, u8 num_port)
+static int is_ddr_csr_clkgen_locked(u32 clkgen_mask)
{
int ret;
u32 tmp;
@@ -289,8 +289,7 @@ void io96b_init_mem_cal(struct io96b_info *io96b_ctrl)
count = 0;
for (i = 0; i < io96b_ctrl->num_instance; i++) {
if (io96b_ctrl->ckgen_lock) {
- ret = is_ddr_csr_clkgen_locked(DDR_CSR_CLKGEN_LOCKED_IO96B_MASK(i),
- io96b_ctrl->num_port);
+ ret = is_ddr_csr_clkgen_locked(DDR_CSR_CLKGEN_LOCKED_IO96B_MASK(i));
if (ret) {
pr_err("%s: ckgena_lock iossm IO96B_%d is not locked\n",
__func__, i);
diff --git a/arch/arm/mach-socfpga/iossm_mailbox.h b/arch/arm/mach-socfpga/iossm_mailbox.h
index 0e942a632847..954bfcdf382e 100644
--- a/arch/arm/mach-socfpga/iossm_mailbox.h
+++ b/arch/arm/mach-socfpga/iossm_mailbox.h
@@ -119,7 +119,6 @@ struct io96b_instance {
* @overall_size: Total DDR memory size
* @io96b[]: IO96B instance specific information
* @ckgen_lock: IO96B GEN PLL lock (false = not locked, true = locked)
- * @num_port: Number of IO96B port.
*/
struct io96b_info {
int version;
@@ -131,7 +130,6 @@ struct io96b_info {
phys_size_t overall_size;
struct io96b_instance io96b[MAX_IO96B_SUPPORTED];
bool ckgen_lock;
- u8 num_port;
};
int io96b_mb_req(void __iomem *io96b_csr_addr, u32 ip_type, u32 instance_id,
--
2.47.3
next prev parent reply other threads:[~2026-09-03 16:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-03 16:12 [PATCH 0/4] arm: socfpga: iossm: cleanup and fix SDRAM setup Michael Tretter
2026-09-03 16:12 ` Michael Tretter [this message]
2026-09-03 16:12 ` [PATCH 2/4] arm: socfpga: iossm: fix macro Michael Tretter
2026-09-03 16:12 ` [PATCH 3/4] arm: socfpga: iossm: refactor register access Michael Tretter
2026-09-03 16:12 ` [PATCH 4/4] arm: socfpga: iossm: wait for PLL lock from handoff table Michael Tretter
2026-09-04 9:31 ` [PATCH 0/4] arm: socfpga: iossm: cleanup and fix SDRAM setup Sascha Hauer
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=20260903-socfpga-fix-sdram-setup-v1-1-0daa166adbca@pengutronix.de \
--to=m.tretter@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=s.hauer@pengutronix.de \
/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