aboutsummaryrefslogtreecommitdiff
path: root/tools/mksunxiboot.c
diff options
context:
space:
mode:
authorKever Yang <kever.yang@rock-chips.com>2020-03-30 11:56:17 +0800
committerTom Rini <trini@konsulko.com>2020-04-24 10:10:00 -0400
commitc738adb8dbbf28a34f8574239a241e85d46f3877 (patch)
treef16bc06c077bda0a20db03571e23c053d9a95363 /tools/mksunxiboot.c
parent9b544c9eb312741e8e27bb738329bcf2737168ad (diff)
downloadu-boot-c738adb8dbbf28a34f8574239a241e85d46f3877.zip
u-boot-c738adb8dbbf28a34f8574239a241e85d46f3877.tar.gz
u-boot-c738adb8dbbf28a34f8574239a241e85d46f3877.tar.bz2
tool: Move ALIGN_MASK to header as common MACRO
The ALIGN code is need by many files who need handle structure or image align, so move the macro to imagetool.h file. Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Punit Agrawal <punit1.agrawal@toshiba.co.jp> Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'tools/mksunxiboot.c')
-rw-r--r--tools/mksunxiboot.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/tools/mksunxiboot.c b/tools/mksunxiboot.c
index 1c8701e..a18c9d9 100644
--- a/tools/mksunxiboot.c
+++ b/tools/mksunxiboot.c
@@ -14,6 +14,7 @@
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
+#include "imagetool.h"
#include "../arch/arm/include/asm/arch-sunxi/spl.h"
#define STAMP_VALUE 0x5F0A6C39
@@ -44,9 +45,6 @@ int gen_check_sum(struct boot_file_head *head_p)
return 0;
}
-#define ALIGN(x, a) __ALIGN_MASK((x), (typeof(x))(a)-1)
-#define __ALIGN_MASK(x, mask) (((x)+(mask))&~(mask))
-
#define SUNXI_SRAM_SIZE 0x8000 /* SoC with smaller size are limited before */
#define SRAM_LOAD_MAX_SIZE (SUNXI_SRAM_SIZE - sizeof(struct boot_file_head))