From: Fabio Estevam <festevam@gmail.com>
To: u-boot@lists.denx.de
Subject: [PATCH] tools: imx8mimage: Restore the original __ALIGN_MASK() macro
Date: Mon, 22 Feb 2021 13:06:00 -0300 [thread overview]
Message-ID: <20210222160600.303180-1-festevam@gmail.com> (raw)
Since commit c738adb8dbbf ("tool: Move ALIGN_MASK to header as common MACRO")
the i.MX8MQ EVK board no longer boots.
The reason is that imx8mimage.c used a custom __ALIGN_MASK() macro, so
restore the original macro to fix the boot.
Reported-by: Lukas Rusak <lorusak@gmail.com>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
tools/imx8mimage.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/imx8mimage.c b/tools/imx8mimage.c
index bc4ee793cb97..057a55838a8f 100644
--- a/tools/imx8mimage.c
+++ b/tools/imx8mimage.c
@@ -32,6 +32,8 @@ static uint32_t rom_version = ROM_V1;
#define HDMI_FW_SIZE 0x17000 /* Use Last 0x1000 for IVT and CSF */
#define ALIGN_SIZE 0x1000
+#define ALIGN(x, a) __ALIGN_MASK((x), (__typeof__(x))(a) - 1, a)
+#define __ALIGN_MASK(x, mask, mask2) (((x) + (mask)) / (mask2) * (mask2))
static uint32_t get_cfg_value(char *token, char *name, int linenr)
{
--
2.25.1
reply other threads:[~2021-02-22 16:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20210222160600.303180-1-festevam@gmail.com \
--to=festevam@gmail.com \
--cc=u-boot@lists.denx.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