]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - board/sixnet/sixnet.c
ARM: zynq: Remove spl.h
[karo-tx-uboot.git] / board / sixnet / sixnet.c
index 3ed581ec09ea8a207b5cd2cbf8d7a4bd49e736a7..06b20835588962c546084c080b41be180fe94699 100644 (file)
@@ -3,23 +3,9 @@
  * Dave Ellis, SIXNET, dge@sixnetio.com.
  *  Based on code by:
  * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- * and other contributors to U-Boot. See file CREDITS for list
- * of people who contributed to this  project.
+ * and other contributors to U-Boot.
  *
- * 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 <status_led.h>
 #endif
 
-#if defined(CONFIG_CMD_NAND)
-#include <linux/mtd/nand_legacy.h>
-extern struct nand_chip nand_dev_desc[CONFIG_SYS_MAX_NAND_DEVICE];
-#endif
-
 DECLARE_GLOBAL_DATA_PTR;
 
 #define ORMASK(size) ((-size) & OR_AM_MSK)
@@ -51,7 +32,7 @@ void show_boot_progress (int status)
 {
 #if defined(CONFIG_STATUS_LED)
 # if defined(STATUS_LED_BOOT)
-       if (status == 15) {
+       if (status == BOOTSTAGE_ID_RUN_OS) {
                /* ready to transfer to kernel, make sure LED is proper state */
                status_led_set(STATUS_LED_BOOT, CONFIG_BOOT_LED_STATE);
        }
@@ -260,10 +241,8 @@ int misc_init_r (void)
 {
        volatile immap_t     *immap = (immap_t *)CONFIG_SYS_IMMR;
        volatile memctl8xx_t *memctl = &immap->im_memctl;
-       char* s;
-       char* e;
-       int reg;
        bd_t *bd = gd->bd;
+       uchar enetaddr[6];
 
        memctl->memc_or2 = NVRAM_OR_PRELIM;
        memctl->memc_br2 = NVRAM_BR_VALUE;
@@ -315,13 +294,9 @@ int misc_init_r (void)
         * is present it gets a unique address, otherwise it
         * shares the FEC address.
         */
-       s = getenv("eth1addr");
-       if (s == NULL)
-               s = getenv("ethaddr");
-       for (reg=0; reg<6; ++reg) {
-               bd->bi_enet1addr[reg] = s ? simple_strtoul(s, &e, 16) : 0;
-               if (s)
-                       s = (*e) ? e+1 : e;
+       if (!eth_getenv_enetaddr("eth1addr", enetaddr)) {
+               eth_getenv_enetaddr("ethaddr", enetaddr);
+               eth_setenv_enetaddr("eth1addr", enetaddr);
        }
 
        return (0);