ALIGN() returns the smallest aligned value greater than the passed in address or size. Taken from Linux.
Signed-off-by: Andy Fleming <[EMAIL PROTECTED]> --- Rebased off the top of tree to ease application. include/common.h | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/include/common.h b/include/common.h index fd5adb3..3190781 100644 --- a/include/common.h +++ b/include/common.h @@ -682,6 +682,9 @@ void __attribute__((weak)) show_boot_progress (int val); #define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) #define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y)) +#define ALIGN(x,a) __ALIGN_MASK((x),(typeof(x))(a)-1) +#define __ALIGN_MASK(x,mask) (((x)+(mask))&~(mask)) + /* Multicore arch functions */ #ifdef CONFIG_MP int cpu_status(int nr); -- 1.5.4.GIT ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users