summaryrefslogtreecommitdiff
path: root/include/common.h
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2009-07-17 23:35:29 +0200
committerWolfgang Denk <wd@denx.de>2009-07-22 09:30:31 +0200
commit70ebf31633f372a24505e47846b2628e8435ea37 (patch)
treed8bafe143f9014954927b090244308d0974bd9b8 /include/common.h
parentd4abc757c26c531293f5bbc4262ade44a317eec9 (diff)
AT91: factor out ROUND() macro
A large number of boards (all AT91 based) duplicated the ROUND() macro in their board specific config files. Add the definition to include/common.h and clean up the board config files. Signed-off-by: Wolfgang Denk <wd@denx.de>
Diffstat (limited to 'include/common.h')
-rw-r--r--include/common.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/common.h b/include/common.h
index a6c7c0769..6e689b233 100644
--- a/include/common.h
+++ b/include/common.h
@@ -697,6 +697,7 @@ void show_boot_progress(int val);
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
+#define ROUND(a,b) (((a) + (b)) & ~((b) - 1))
#define DIV_ROUND(n,d) (((n) + ((d)/2)) / (d))
#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d))
#define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y))