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>
This commit is contained in:
Kever Yang 2020-03-30 11:56:17 +08:00 committed by Tom Rini
parent 9b544c9eb3
commit c738adb8db
5 changed files with 5 additions and 9 deletions

View file

@ -32,8 +32,6 @@ 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)
{