Patchwork [U-Boot,1/3] Add definitions for OpenRD-Client and OpenRD-Ultimate

login
register
mail settings
Submitter Clint Adams
Date April 12, 2011, 4:09 p.m.
Message ID <1302624582-26705-1-git-send-email-clint@debian.org>
Download mbox | patch
Permalink /patch/90828/
State Superseded
Headers show

Comments

Clint Adams - April 12, 2011, 4:09 p.m.
---
 MAKEALL                                 |    2 ++
 board/Marvell/openrd_base/openrd_base.c |    6 ++++++
 boards.cfg                              |    4 +++-
 include/configs/openrd_base.h           |   14 +++++++++++++-
 4 files changed, 24 insertions(+), 2 deletions(-)
Albert ARIBAUD - April 12, 2011, 4:44 p.m.
Le 12/04/2011 18:09, Clint Adams a écrit :
> ---
>   MAKEALL                                 |    2 ++
>   board/Marvell/openrd_base/openrd_base.c |    6 ++++++
>   boards.cfg                              |    4 +++-
>   include/configs/openrd_base.h           |   14 +++++++++++++-
>   4 files changed, 24 insertions(+), 2 deletions(-)

This is a new version -- please add version in subject and provide patch 
history.

Amicalement,

Patch

diff --git a/MAKEALL b/MAKEALL
index e1b928f..011cead 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -361,6 +361,8 @@  LIST_ARM9="			\
 	omap5912osk		\
 	omap730p2		\
 	openrd_base		\
+	openrd_client		\
+	openrd_ultimate		\
 	rd6281a			\
 	sbc2410x		\
 	scb9328			\
diff --git a/board/Marvell/openrd_base/openrd_base.c b/board/Marvell/openrd_base/openrd_base.c
index 10109c1..f7c63ac 100644
--- a/board/Marvell/openrd_base/openrd_base.c
+++ b/board/Marvell/openrd_base/openrd_base.c
@@ -110,7 +110,13 @@  int board_init(void)
 	/*
 	 * arch number of board
 	 */
+#if defined(CONFIG_BOARD_IS_OPENRD_BASE)
 	gd->bd->bi_arch_number = MACH_TYPE_OPENRD_BASE;
+#elif defined(CONFIG_BOARD_IS_OPENRD_CLIENT)
+	gd->bd->bi_arch_number = MACH_TYPE_OPENRD_CLIENT;
+#elif defined(CONFIG_BOARD_IS_OPENRD_ULTIMATE)
+	gd->bd->bi_arch_number = MACH_TYPE_OPENRD_ULTIMATE;
+#endif
 
 	/* adress of boot parameters */
 	gd->bd->bi_boot_params = kw_sdram_bar(0) + 0x100;
diff --git a/boards.cfg b/boards.cfg
index a45bd83..ee5d5f4 100644
--- a/boards.cfg
+++ b/boards.cfg
@@ -96,7 +96,9 @@  davinci_sonata               arm         arm926ejs   sonata              davinci
 suen3                        arm         arm926ejs   km_arm              keymile        kirkwood
 guruplug                     arm         arm926ejs   -                   Marvell        kirkwood
 mv88f6281gtw_ge              arm         arm926ejs   -                   Marvell        kirkwood
-openrd_base                  arm         arm926ejs   -                   Marvell        kirkwood
+openrd_base                  arm         arm926ejs   openrd_base         Marvell        kirkwood        openrd_base:BOARD_IS_OPENRD_BASE
+openrd_client                arm         arm926ejs   openrd_base         Marvell        kirkwood        openrd_base:BOARD_IS_OPENRD_CLIENT
+openrd_ultimate              arm         arm926ejs   openrd_base         Marvell        kirkwood        openrd_base:BOARD_IS_OPENRD_ULTIMATE
 rd6281a                      arm         arm926ejs   -                   Marvell        kirkwood
 sheevaplug                   arm         arm926ejs   -                   Marvell        kirkwood
 dockstar                     arm         arm926ejs   -                   Seagate        kirkwood
diff --git a/include/configs/openrd_base.h b/include/configs/openrd_base.h
index cfdd09c..5e05890 100644
--- a/include/configs/openrd_base.h
+++ b/include/configs/openrd_base.h
@@ -33,7 +33,19 @@ 
 /*
  * Version number information
  */
-#define CONFIG_IDENT_STRING	"\nOpenRD_base"
+#ifdef CONFIG_BOARD_IS_OPENRD_ULTIMATE
+# define CONFIG_IDENT_STRING	"\nOpenRD-Ultimate"
+#else
+# ifdef CONFIG_BOARD_IS_OPENRD_CLIENT
+#  define CONFIG_IDENT_STRING	"\nOpenRD-Client"
+# else
+#  ifdef CONFIG_BOARD_IS_OPENRD_BASE
+#   define CONFIG_IDENT_STRING	"\nOpenRD-Base"
+#  else
+#   error Unknown OpenRD board specified
+#  endif
+# endif
+#endif
 
 /*
  * High Level Configuration Options (easy to change)