]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/etin/debris/debris.c
mx25pdk: Remove CONFIG_SYS_GENERIC_BOARD
[karo-tx-uboot.git] / board / etin / debris / debris.c
index 227c49a14dfed02da344bf066bf2e5c77b549559..0308fef6cf53be0ea748d5a15bfeced589070ca4 100644 (file)
@@ -2,27 +2,12 @@
  * (C) Copyright 2000
  * Sangmoon Kim, Etin Systems. dogoil@etinsys.com.
  *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
+ * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
 #include <mpc824x.h>
+#include <net.h>
 #include <pci.h>
 #include <i2c.h>
 #include <netdev.h>
@@ -173,9 +158,13 @@ void nvram_write(long dest, const void *src, size_t count)
 
 int misc_init_r(void)
 {
-       /* Write ethernet addr in NVRAM for VxWorks */
-       nvram_write(CONFIG_ENV_ADDR + CONFIG_SYS_NVRAM_VXWORKS_OFFS,
-                       (char*)&gd->bd->bi_enetaddr[0], 6);
+       uchar ethaddr[6];
+
+       if (eth_getenv_enetaddr("ethaddr", ethaddr))
+               /* Write ethernet addr in NVRAM for VxWorks */
+               nvram_write(CONFIG_ENV_ADDR + CONFIG_SYS_NVRAM_VXWORKS_OFFS,
+                               ethaddr, 6);
+
        return 0;
 }