[U-Boot] [PATCH] add support for EMK TOP7000 CPU Module (2nd try)

2010-06-06 Thread Reinhard Meyer (-VC)
Add support for EMK TOP7000 CPU Module

Specifics:

1) create subdir board/emk/top7000 and files in it
2) create include/configs/top7000.h
3) update board/emk/common/vpd.c
4) add call to misc_init_r() to arch/avr32/lib/board.c
5) create arch/avr32/include/asm/unaligned.h to
   fix zlib.c compilation problem
6) update Makefile, MAINTAINERS, MAKEALL

Signed-off-by: Reinhard Meyer i...@emk-elektronik.de

---
 MAINTAINERS|6 +-
 MAKEALL|3 +-
 Makefile   |3 +
 arch/avr32/include/asm/unaligned.h |1 +
 arch/avr32/lib/board.c |5 +
 board/emk/common/vpd.c |   71 +++-
 board/emk/top7000/Makefile |   41 +++
 board/emk/top7000/config.mk|3 +
 board/emk/top7000/top7000.c|  174 +
 board/emk/top7000/u-boot.lds   |   72 
 include/configs/top7000.h  |  217 
 11 files changed, 588 insertions(+), 8 deletions(-)
 create mode 100644 arch/avr32/include/asm/unaligned.h
 create mode 100644 board/emk/top7000/Makefile
 create mode 100644 board/emk/top7000/config.mk
 create mode 100644 board/emk/top7000/top7000.c
 create mode 100644 board/emk/top7000/u-boot.lds
 create mode 100644 include/configs/top7000.h

diff --git a/MAINTAINERS b/MAINTAINERS
index 7a13d28..a361be1 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -311,7 +311,7 @@ Andrea llandre Marson andrea.mar...@dave-tech.it
 
PPChameleonEVB  PPC405EP
 
-Reinhard Meyer r.me...@emk-elektronik.de
+Reinhard Meyer reinhard.me...@emk-elektronik.de
 
TOP860  MPC860T
TOP5200 MPC5200
@@ -919,6 +919,10 @@ Julien May julien@miromico.ch
 
HAMMERHEAD  AT32AP7000
 
+Reinhard Meyer reinhard.me...@emk-elektronik.de
+
+   TOP7000 AT32AP7000
+
 Haavard Skinnemoen haavard.skinnem...@atmel.com
 
ATSTK1000   AT32AP7xxx
diff --git a/MAKEALL b/MAKEALL
index 2527352..3a80041 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -873,7 +873,8 @@ LIST_avr32=\
atngw100\
favr-32-ezkit   \
hammerhead  \
-   mimc200 \
+   mimc200 \
+   top7000 \
 
 
 #
diff --git a/Makefile b/Makefile
index c26e491..e57a4ca 100644
--- a/Makefile
+++ b/Makefile
@@ -3549,6 +3549,9 @@ hammerhead_config :   unconfig
 mimc200_config :   unconfig
@$(MKCONFIG) $(@:_config=) avr32 at32ap mimc200 mimc at32ap700x
 
+top7000_config :   unconfig
+   @$(MKCONFIG) $(@:_config=) avr32 at32ap top7000 emk at32ap700x
+
 #
 # SH3 (SuperH)
 #
diff --git a/arch/avr32/include/asm/unaligned.h 
b/arch/avr32/include/asm/unaligned.h
new file mode 100644
index 000..6cecbbb
--- /dev/null
+++ b/arch/avr32/include/asm/unaligned.h
@@ -0,0 +1 @@
+#include asm-generic/unaligned.h
diff --git a/arch/avr32/lib/board.c b/arch/avr32/lib/board.c
index 917ed6c..6be5ab0 100644
--- a/arch/avr32/lib/board.c
+++ b/arch/avr32/lib/board.c
@@ -337,6 +337,11 @@ void board_init_r(gd_t *new_gd, ulong dest_addr)
jumptable_init();
console_init_r();
 
+#if defined(CONFIG_MISC_INIT_R)
+   /* miscellaneous platform dependent initialisations */
+   misc_init_r();
+#endif
+
s = getenv(loadaddr);
if (s)
load_addr = simple_strtoul(s, NULL, 16);
diff --git a/board/emk/common/vpd.c b/board/emk/common/vpd.c
index c2af219..d2c8af2 100644
--- a/board/emk/common/vpd.c
+++ b/board/emk/common/vpd.c
@@ -1,6 +1,6 @@
 /*
- * (C) Copyright 2003
- * Reinhard Meyer, EMK Elektronik GmbH, r.me...@emk-elektronik.de
+ * (C) Copyright 2003-2010
+ * EMK Elektronik GmbH  Co. KG, reinhard.me...@emk-elektronik.de
  *
  * See file CREDITS for list of people who contributed to this
  * project.
@@ -22,10 +22,9 @@
  */
 
 #include common.h
-
-/*
- * read factory part of EEPROM and set some environment variables
- */
+#include command.h
+
+/* read factory part of EEPROM and set some environment variables */
 void read_factory_r (void)
 {
/* read 'factory' part of EEPROM */
@@ -70,6 +69,10 @@ void read_factory_r (void)
/* search for our specific entry */
if (!strncmp ((char *) buf, [RLA/lan/Ethernet] , 19)) {
setenv (ethaddr, (char *)(buf + 19));
+#if defined(CONFIG_TOP7000)
+   } else if (!strncmp ((char *) buf, [RLA/lan2/Ethernet] , 20)) 
{
+   setenv (eth1addr, (char *)(buf + 20));
+#endif
} else if (!strncmp ((char *) buf, [BOARD/SERIAL] , 15)) {

Re: [U-Boot] [PATCH] add support for EMK TOP7000 CPU Module (2nd try)

2010-06-06 Thread Reinhard Meyer (-VC)
Reinhard Meyer (-VC) schrieb:

if anything can go wrong, it will go wrong...

a 0x0d (CR) sneaked into the following line:

   hammerhead  \
 - mimc200 \
 + mimc200 \
 + top7000 \

Please do not try to apply the patch. I will send a new one!

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot