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 3/4] arm: socfpga: iossm: refactor register access
Date: Thu, 03 Sep 2026 18:12:44 +0200 [thread overview]
Message-ID: <20260903-socfpga-fix-sdram-setup-v1-3-0daa166adbca@pengutronix.de> (raw)
In-Reply-To: <20260903-socfpga-fix-sdram-setup-v1-0-0daa166adbca@pengutronix.de>
Don't add the base register address when defining the register, but add
it, when the register is accessed. This is how all other accesses to the
SOCFPGA_SYSMGR_ADDRESS are made.
Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
---
arch/arm/mach-socfpga/iossm_mailbox.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/arm/mach-socfpga/iossm_mailbox.c b/arch/arm/mach-socfpga/iossm_mailbox.c
index b66056a91279..28070121ee6b 100644
--- a/arch/arm/mach-socfpga/iossm_mailbox.c
+++ b/arch/arm/mach-socfpga/iossm_mailbox.c
@@ -16,11 +16,11 @@
#include <mach/socfpga/soc64-regs.h>
#include <mach/socfpga/soc64-system-manager.h>
-#define ECC_INTSTATUS_SERR SOCFPGA_SYSMGR_ADDRESS + 0x9C
-#define ECC_INISTATUS_DERR SOCFPGA_SYSMGR_ADDRESS + 0xA0
+#define ECC_INTSTATUS_SERR 0x9C
+#define ECC_INISTATUS_DERR 0xA0
-#define DDR_CSR_CLKGEN_LOCKED_IO96B0_MASK BIT(16)
-#define DDR_CSR_CLKGEN_LOCKED_IO96B1_MASK BIT(17)
+#define DDR_CSR_CLKGEN_LOCKED_IO96B0_MASK BIT(16)
+#define DDR_CSR_CLKGEN_LOCKED_IO96B1_MASK BIT(17)
#define DDR_CSR_CLKGEN_LOCKED_IO96B_MASK(i) \
(i == 0 ? \
DDR_CSR_CLKGEN_LOCKED_IO96B0_MASK : \
@@ -57,7 +57,7 @@ static int is_ddr_csr_clkgen_locked(u32 clkgen_mask)
int ret;
u32 tmp;
- ret = readl_poll_timeout(IOMEM(ECC_INTSTATUS_SERR),
+ ret = readl_poll_timeout(IOMEM(SOCFPGA_SYSMGR_ADDRESS) + ECC_INTSTATUS_SERR,
tmp, tmp & clkgen_mask, 10 * USEC_PER_SEC);
if (ret) {
pr_debug("%s: ddr csr clkgena locked is timeout\n", __func__);
--
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 ` [PATCH 1/4] arm: socfpga: iossm: remove unused num_port Michael Tretter
2026-09-03 16:12 ` [PATCH 2/4] arm: socfpga: iossm: fix macro Michael Tretter
2026-09-03 16:12 ` Michael Tretter [this message]
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-3-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