Skip to contentSkip to conversation

add support for EMK TOP7000 CPU module (modified files)

PATCH New Reinhard Meyer (-VC) 2 participants 4 messages Jun 4, 2010 – Jun 22, 2010 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 add support for EMK TOP7000 CPU module (modified files)

This Patch adds support for the EMK TOP7000 CPU Module Part 2: modified files

Signed-off-by Reinhard Meyer reinhard.meyer at emk-elektronik.de
---
 MAINTAINERS               |    6 ++++-
 Makefile                  |    3 ++
 board/emk/common/vpd.c    |   57 
++++++++++++++++++++++++++++++++++++++++----
 3 files changed, 59 insertions(+), 7 deletions(-)
 mode change 100755 => 100644 include/configs/top7000.h
MAINTAINERS +5 -1
index 7a13d28..9d5540a 100644
@@ -311,7 +311,7 @@ Andrea "llandre" Marson <[email protected]>
 
     PPChameleonEVB    PPC405EP
 
-Reinhard Meyer <[email protected]>
+Reinhard Meyer <[email protected]>
 
     TOP860        MPC860T
     TOP5200        MPC5200
@@ -928,6 +928,10 @@ Haavard Skinnemoen <[email protected]>
     ATSTK1006    AT32AP7000
     ATNGW100    AT32AP7000
 
+Reinhard Meyer <[email protected]>
+
+    TOP7000        AT32AP7000
+
 #########################################################################
 # SuperH Systems:                            #
 #                                    #
Makefile +3 -0
index c26e491..e57a4ca 100644
@@ -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)
 #========================================================================
board/emk/common/vpd.c +42 -6

66 lines not on this page · raw message

buf, i+2)) {
+ printf ("cannot write factory configuration\n");
+ return 1;
+ }
+
+ return 0;
+}
+
+U_BOOT_CMD(vpd, 3, 0, do_vpd, "enter vital product data",
"serialnumer type");
+#endif

include/configs/top7000.h +0 -0
old mode 100755
new mode 100644
Signature · 1 line
1.5.6.5
#1 lore raw

PATCH 1/1 add support for EMK TOP7000 CPU module (modified files)

Dear "Reinhard Meyer (-VC)",

Quoted 11 lines · In message <[email protected]> you wrote:

This Patch adds support for the EMK TOP7000 CPU Module Part 2: modified files

Signed-off-by Reinhard Meyer reinhard.meyer at emk-elektronik.de
---
 MAINTAINERS               |    6 ++++-
 Makefile                  |    3 ++
 board/emk/common/vpd.c    |   57 

++++++++++++++++++++++++++++++++++++++++----

Fix your mailer, it is wrapping lines!

MAINTAINERS Haavard Skinnemoen <[email protected]> · line 931

Quoted 5 lines
MAINTAINERS +1 -0
@@ -928,6 +928,10 @@ Haavard Skinnemoen <[email protected]>
     ATSTK1006    AT32AP7000
     ATNGW100    AT32AP7000
 
+Reinhard Meyer <[email protected]>

Please keep lists sorted - M < S

board/emk/common/vpd.c line 3

Quoted 8 lines
board/emk/common/vpd.c +2 -2
@@ -1,6 +1,6 @@
 /*
- * (C) Copyright 2003
- * Reinhard Meyer, EMK Elektronik GmbH, r.meyer at emk-elektronik.de
+ * (C) Copyright 2003-2010
+ * Reinhard Meyer, EMK Elektronik

Please add mail address

board/emk/common/vpd.c void read_factory_r (void) · line 78

Quoted 13 lines
board/emk/common/vpd.c +6 -2
@@ -68,12 +69,56 @@ void read_factory_r (void)
         addr += p - buf;
         /*printf ("%s\n", buf); */
         /* search for our specific entry */
-        if (!strncmp ((char *) buf, "[RLA/lan/Ethernet] ", 19)) {
+        if (!strncmp ((char *) buf, "[RLA/lan/Ethernet] ", 19))
             setenv ("ethaddr", (char *)(buf + 19));
-        } else if (!strncmp ((char *) buf, "[BOARD/SERIAL] ", 15)) {
+#if defined(CONFIG_TOP7000)
+        /* boards that have 2 LAN interfaces */
+        else if (!strncmp ((char *) buf, "[RLA/lan2/Ethernet] ", 20))
+            setenv ("eth1addr", (char *)(buf + 20));
+#endif

Curly braces are needed for multiline statements.

...

board/emk/common/vpd.c void read_factory_r (void) · line 81

Quoted 3 lines
board/emk/common/vpd.c +2 -0
+    if (eeprom_write (CONFIG_SYS_I2C_FACT_ADDR, CONFIG_SYS_FACT_OFFSET, 
 buf, i+2)) {
+        printf ("cannot write factory configuration\n");

All previous comments apply here, too (too long lines, wrapped lines, no spaces after function name, ...)

Best regards,

Wolfgang Denk

Signature · 6 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Comparing information  and  knowledge  is  like  asking  whether  the
fatness  of  a  pig  is more or less green than the designated hitter
rule."                                               - David Guaspari
#2 lore raw

PATCH 1/1 add support for EMK TOP7000 CPU module (modified files)

Quoted 10 lines · Wolfgang Denk

Dear "Reinhard Meyer (-VC)",

Quoted 6 lines · In message <[email protected]> you wrote:

This Patch adds support for the EMK TOP7000 CPU Module Part 2: modified files

Signed-off-by Reinhard Meyer reinhard.meyer at emk-elektronik.de
Quoted 9 lines
Quoted 6 lines
---
 MAINTAINERS               |    6 ++++-
 Makefile                  |    3 ++
 board/emk/common/vpd.c    |   57 

++++++++++++++++++++++++++++++++++++++++----

Fix your mailer, it is wrapping lines!

I will investigate on that. Using Thunderbird, should have settings for that.

Quoted 10 lines

MAINTAINERS Haavard Skinnemoen <[email protected]> · line 932

Quoted 7 lines
MAINTAINERS +1 -0
@@ -928,6 +928,10 @@ Haavard Skinnemoen <[email protected]>
     ATSTK1006    AT32AP7000
     ATNGW100    AT32AP7000
 
+Reinhard Meyer <[email protected]>
 

Please keep lists sorted - M < S

Well, what about that situation (two names as maintainers for HAMMERHEAD), where do I sort in?

Mark Jackson <[email protected]>

    MIMC200            AT32AP7000

Alex Raimondi <[email protected]>
Julien May <[email protected]>

HAMMERHEAD AT32AP7000

Reinhard Meyer <[email protected]>

    TOP7000        AT32AP7000

Haavard Skinnemoen <[email protected]>

Quoted 13 lines

board/emk/common/vpd.c line 4

Quoted 10 lines
board/emk/common/vpd.c +2 -2
@@ -1,6 +1,6 @@
 /*
- * (C) Copyright 2003
- * Reinhard Meyer, EMK Elektronik GmbH, r.meyer at emk-elektronik.de
+ * (C) Copyright 2003-2010
+ * Reinhard Meyer, EMK Elektronik
 

Please add mail address

I can do that. But is it really senseful to add an email address to each file?
E-Mail adresses can change. Also "Rechtsform" (GmbH -> GmbH & Co. KG). Shall that all be reflected in a simple copyright string?

Quoted 18 lines
Quoted 5 lines
board/emk/common/vpd.c +0 -0
@@ -68,12 +69,56 @@ void read_factory_r (void)
         addr += p - buf;
         /*printf ("%s\n", buf); */
         /* search for our specific entry */

board/emk/common/vpd.c void read_factory_r (void) · line 79

Quoted 10 lines
board/emk/common/vpd.c +6 -2
-        if (!strncmp ((char *) buf, "[RLA/lan/Ethernet] ", 19)) {
+        if (!strncmp ((char *) buf, "[RLA/lan/Ethernet] ", 19))
             setenv ("ethaddr", (char *)(buf + 19));
-        } else if (!strncmp ((char *) buf, "[BOARD/SERIAL] ", 15)) {
+#if defined(CONFIG_TOP7000)
+        /* boards that have 2 LAN interfaces */
+        else if (!strncmp ((char *) buf, "[RLA/lan2/Ethernet] ", 20))
+            setenv ("eth1addr", (char *)(buf + 20));
+#endif
 

Curly braces are needed for multiline statements.

Not sure what is multiline here? its like
if (cond1)

    statement1;
else if (cond2)
    statement2;
else if (cond3)
    statement3;
Quoted 11 lines

...

Quoted 4 lines

+ if (eeprom_write (CONFIG_SYS_I2C_FACT_ADDR, CONFIG_SYS_FACT_OFFSET,
buf, i+2)) {
+ printf ("cannot write factory configuration\n");

All previous comments apply here, too (too long lines, wrapped lines, no spaces after function name, ...)

willco.

Best Regards
Reinhard

#3 lore raw

PATCH 1/1 add support for EMK TOP7000 CPU module (modified files)

Dear "Reinhard Meyer (-VC)",

Quoted 10 lines · In message <[email protected]> you wrote:

Well, what about that situation (two names as maintainers for HAMMERHEAD), where do I sort in?

Mark Jackson <[email protected]>

    MIMC200            AT32AP7000

Alex Raimondi <[email protected]>
Julien May <[email protected]>

First name counts, i. e. this entry should sort as "Alex Raimondi".

Quoted 6 lines
Quoted 2 lines

Please add mail address

I can do that. But is it really senseful to add an email address to each file?
E-Mail adresses can change. Also "Rechtsform" (GmbH -> GmbH & Co. KG). Shall that all be reflected in a simple copyright string?

It makes a lot of sense to the reader of the code, even i=f it should change later (when the code is properly maintained, such entries should get updated, too).

Quoted 17 lines
Quoted 8 lines
Quoted 8 lines
board/emk/common/vpd.c +1 -2
@@ -68,12 +69,56 @@ void read_factory_r (void)
         addr += p - buf;
         /*printf ("%s\n", buf); */
         /* search for our specific entry */
-        if (!strncmp ((char *) buf, "[RLA/lan/Ethernet] ", 19)) {
+        if (!strncmp ((char *) buf, "[RLA/lan/Ethernet] ", 19))
             setenv ("ethaddr", (char *)(buf + 19));
-        } else if (!strncmp ((char *) buf, "[BOARD/SERIAL] ", 15)) {
Quoted 9 lines

board/emk/common/vpd.c void read_factory_r (void)

Quoted 6 lines
board/emk/common/vpd.c +5 -0
+#if defined(CONFIG_TOP7000)
+        /* boards that have 2 LAN interfaces */
+        else if (!strncmp ((char *) buf, "[RLA/lan2/Ethernet] ", 20))
+            setenv ("eth1addr", (char *)(buf + 20));
+#endif
 

Curly braces are needed for multiline statements.

Quoted 1 line

Not sure what is multiline here? its like

Your code (ignoring the ifdef):

	if (!strncmp ((char *) buf, "[RLA/lan/Ethernet] ", 19))
		setenv ("ethaddr", (char *)(buf + 19));
	/* boards that have 2 LAN interfaces */
	else if (!strncmp ((char *) buf, "[RLA/lan2/Ethernet] ", 20))

To me this is multi-line, and badly indented, too.

Best regards,

Wolfgang Denk

Signature · 4 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
365 Days of drinking Lo-Cal beer.                       = 1 Lite-year