km/common: force set ethaddr only for KM kirkwood boards
authorHolger Brunck <holger.brunck@keymile.com>
Tue, 13 Sep 2011 23:06:10 +0000 (23:06 +0000)
committerWolfgang Denk <wd@denx.de>
Fri, 21 Oct 2011 22:28:36 +0000 (00:28 +0200)
This prevents u-boot to print out "Can't overwrite "ethaddr""
each time a powerpc board starts.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
cc: Wolfgang Denk <wd@denx.de>

board/keymile/common/ivm.c

index bcf3aed..70d7845 100644 (file)
@@ -221,7 +221,12 @@ static int ivm_analyze_block2(unsigned char *buf, int len)
                sprintf((char *)valbuf, "%pM", buf);
        }
 #endif
+#ifdef MACH_TYPE_KM_KIRKWOOD
        setenv((char *)"ethaddr", (char *)valbuf);
+#else
+       if (getenv("ethaddr") == NULL)
+               setenv((char *)"ethaddr", (char *)valbuf);
+#endif
 
        /* IVM_MacCount */
        count = (buf[10] << 24) +