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 2/4] arm: socfpga: iossm: fix macro
Date: Thu, 03 Sep 2026 18:12:43 +0200 [thread overview]
Message-ID: <20260903-socfpga-fix-sdram-setup-v1-2-0daa166adbca@pengutronix.de> (raw)
In-Reply-To: <20260903-socfpga-fix-sdram-setup-v1-0-0daa166adbca@pengutronix.de>
The argument x of the macro is not used, but the macro uses i instead,
which works, because i is defined, when the macro is used.
Fix this by using the proper argument names.
While at it, simplify the macro and fix the formatting.
Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
---
arch/arm/mach-socfpga/iossm_mailbox.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-socfpga/iossm_mailbox.c b/arch/arm/mach-socfpga/iossm_mailbox.c
index b79ec87b4f46..b66056a91279 100644
--- a/arch/arm/mach-socfpga/iossm_mailbox.c
+++ b/arch/arm/mach-socfpga/iossm_mailbox.c
@@ -18,11 +18,14 @@
#define ECC_INTSTATUS_SERR SOCFPGA_SYSMGR_ADDRESS + 0x9C
#define ECC_INISTATUS_DERR SOCFPGA_SYSMGR_ADDRESS + 0xA0
+
#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 : \
+ DDR_CSR_CLKGEN_LOCKED_IO96B1_MASK)
-#define DDR_CSR_CLKGEN_LOCKED_IO96B_MASK(x) (i == 0 ? DDR_CSR_CLKGEN_LOCKED_IO96B0_MASK : \
- DDR_CSR_CLKGEN_LOCKED_IO96B1_MASK)
#define MAX_RETRY_COUNT 3
#define NUM_CMD_RESPONSE_DATA 3
--
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 ` Michael Tretter [this message]
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-2-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