U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] AT91: factor out ROUND() macro
Date: Fri, 17 Jul 2009 23:35:29 +0200	[thread overview]
Message-ID: <1247866529-31432-1-git-send-email-wd@denx.de> (raw)

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>
---
 include/common.h                   |    1 +
 include/configs/afeb9260.h         |    1 -
 include/configs/at91cap9adk.h      |    1 -
 include/configs/at91rm9200ek.h     |    1 -
 include/configs/at91sam9260ek.h    |    1 -
 include/configs/at91sam9261ek.h    |    1 -
 include/configs/at91sam9263ek.h    |    1 -
 include/configs/at91sam9m10g45ek.h |    1 -
 include/configs/at91sam9rlek.h     |    1 -
 include/configs/pm9261.h           |    1 -
 include/configs/pm9263.h           |    1 -
 11 files changed, 1 insertions(+), 10 deletions(-)

diff --git a/include/common.h b/include/common.h
index a6c7c07..6e689b2 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))
diff --git a/include/configs/afeb9260.h b/include/configs/afeb9260.h
index c5134a2..22099c8 100644
--- a/include/configs/afeb9260.h
+++ b/include/configs/afeb9260.h
@@ -159,7 +159,6 @@
 #define CONFIG_SYS_LONGHELP		1
 #define CONFIG_CMDLINE_EDITING	1
 
-#define ROUND(A, B)		(((A) + (B)) & ~((B) - 1))
 /*
  * Size of malloc() pool
  */
diff --git a/include/configs/at91cap9adk.h b/include/configs/at91cap9adk.h
index 526cd60..f977527 100644
--- a/include/configs/at91cap9adk.h
+++ b/include/configs/at91cap9adk.h
@@ -201,7 +201,6 @@
 #define CONFIG_SYS_LONGHELP		1
 #define CONFIG_CMDLINE_EDITING	1
 
-#define ROUND(A, B)		(((A) + (B)) & ~((B) - 1))
 /*
  * Size of malloc() pool
  */
diff --git a/include/configs/at91rm9200ek.h b/include/configs/at91rm9200ek.h
index c898c73..58ec94a 100644
--- a/include/configs/at91rm9200ek.h
+++ b/include/configs/at91rm9200ek.h
@@ -311,7 +311,6 @@ struct bd_info_ext {
  */
 #define CONFIG_SYS_HZ_CLOCK (AT91C_MASTER_CLOCK / 2)
 
-#define ROUND(A, B)		(((A) + (B)) & ~((B) - 1))
 /*
  * Size of malloc() pool
  */
diff --git a/include/configs/at91sam9260ek.h b/include/configs/at91sam9260ek.h
index 1828c63..dd886d8 100644
--- a/include/configs/at91sam9260ek.h
+++ b/include/configs/at91sam9260ek.h
@@ -205,7 +205,6 @@
 #define CONFIG_SYS_LONGHELP		1
 #define CONFIG_CMDLINE_EDITING	1
 
-#define ROUND(A, B)		(((A) + (B)) & ~((B) - 1))
 /*
  * Size of malloc() pool
  */
diff --git a/include/configs/at91sam9261ek.h b/include/configs/at91sam9261ek.h
index 6d24023..cb0384a 100644
--- a/include/configs/at91sam9261ek.h
+++ b/include/configs/at91sam9261ek.h
@@ -223,7 +223,6 @@
 #define CONFIG_SYS_LONGHELP		1
 #define CONFIG_CMDLINE_EDITING	1
 
-#define ROUND(A, B)		(((A) + (B)) & ~((B) - 1))
 /*
  * Size of malloc() pool
  */
diff --git a/include/configs/at91sam9263ek.h b/include/configs/at91sam9263ek.h
index 00f3114..2bd2915 100644
--- a/include/configs/at91sam9263ek.h
+++ b/include/configs/at91sam9263ek.h
@@ -333,7 +333,6 @@
 #define CONFIG_SYS_HUSH_PARSER
 #define CONFIG_SYS_PROMPT_HUSH_PS2	"> "
 
-#define ROUND(A, B)		(((A) + (B)) & ~((B) - 1))
 /*
  * Size of malloc() pool
  */
diff --git a/include/configs/at91sam9m10g45ek.h b/include/configs/at91sam9m10g45ek.h
index 572c45b..8f86839 100644
--- a/include/configs/at91sam9m10g45ek.h
+++ b/include/configs/at91sam9m10g45ek.h
@@ -209,7 +209,6 @@
 #define CONFIG_SYS_HUSH_PARSER
 #define CONFIG_SYS_PROMPT_HUSH_PS2	"> "
 
-#define ROUND(A, B)		(((A) + (B)) & ~((B) - 1))
 /*
  * Size of malloc() pool
  */
diff --git a/include/configs/at91sam9rlek.h b/include/configs/at91sam9rlek.h
index c466823..64a9951 100644
--- a/include/configs/at91sam9rlek.h
+++ b/include/configs/at91sam9rlek.h
@@ -168,7 +168,6 @@
 #define CONFIG_SYS_LONGHELP		1
 #define CONFIG_CMDLINE_EDITING	1
 
-#define ROUND(A, B)		(((A) + (B)) & ~((B) - 1))
 /*
  * Size of malloc() pool
  */
diff --git a/include/configs/pm9261.h b/include/configs/pm9261.h
index 4784c40..3307a94 100644
--- a/include/configs/pm9261.h
+++ b/include/configs/pm9261.h
@@ -366,7 +366,6 @@
 #define CONFIG_SYS_LONGHELP		1
 #define CONFIG_CMDLINE_EDITING	1
 
-#define ROUND(A, B)		(((A) + (B)) & ~((B) - 1))
 /*
  * Size of malloc() pool
  */
diff --git a/include/configs/pm9263.h b/include/configs/pm9263.h
index 94e1eb9..a197061 100644
--- a/include/configs/pm9263.h
+++ b/include/configs/pm9263.h
@@ -395,7 +395,6 @@
 #define CONFIG_SYS_LONGHELP		1
 #define CONFIG_CMDLINE_EDITING		1
 
-#define ROUND(A, B)			(((A) + (B)) & ~((B) - 1))
 /*
  * Size of malloc() pool
  */
-- 
1.6.0.6

             reply	other threads:[~2009-07-17 21:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-17 21:35 Wolfgang Denk [this message]
2009-07-22 22:09 ` [U-Boot] [PATCH] AT91: factor out ROUND() macro Jean-Christophe PLAGNIOL-VILLARD
2009-07-22 22:51   ` Wolfgang Denk
2009-07-23 22:17     ` [U-Boot] [PATCH] Make include/common.h usable by assembler code Wolfgang Denk
2009-07-26 22:12       ` Wolfgang Denk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1247866529-31432-1-git-send-email-wd@denx.de \
    --to=wd@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox