Skip to contentSkip to conversation

tools: imx8mimage: Restore the original __ALIGN_MASK() macro

PATCH Superseded Fabio Estevam 1 participant 1 message Feb 22, 2021 Arm i.MX and Layerscape

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Fabio Estevam

author reviewer
#0 lore raw

PATCH 1/1 tools: imx8mimage: Restore the original __ALIGN_MASK() macro

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.

---
 tools/imx8mimage.c | 2 ++
 1 file changed, 2 insertions(+)
tools/imx8mimage.c +2 -0
index bc4ee793cb97..057a55838a8f 100644
@@ -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)
 {
Signature · 1 line
2.25.1