Merge branch 'master' of git://git.denx.de/u-boot-video
[oweals/u-boot.git] / board / ifm / ac14xx / ac14xx.c
index c8e88cc99eb3b1067a67072bdd9c108d1f4ef735..72932ca69f92788e4dafd1134409ded4f56087cf 100644 (file)
@@ -3,13 +3,7 @@
  * (C) Copyright 2009 Dave Srl www.dave.eu
  * (C) Copyright 2010 ifm ecomatic GmbH
  *
- * 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.
+ * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -231,7 +225,7 @@ int mac_read_from_eeprom(void)
                break;
        }
 
-       if (mac && is_valid_ether_addr(mac)) {
+       if (mac && is_valid_ethaddr(mac)) {
                eth_setenv_enetaddr("ethaddr", mac);
                if (mac_diag) {
                        mac_txt = getenv("ethaddr");
@@ -336,8 +330,8 @@ int misc_init_r(void)
        /*
         * enforce the start of the recovery system when
         * - the appropriate keys were pressed
-        * - a previous installation was aborted or has failed
         * - "some" external software told us to
+        * - a previous installation was aborted or has failed
         */
        want_recovery = 0;
        keys = gpio_querykbd();
@@ -347,6 +341,11 @@ int misc_init_r(void)
                printf("detected recovery request (keyboard)\n");
                want_recovery = 1;
        }
+       s = getenv("want_recovery");
+       if ((s != NULL) && (*s != '\0')) {
+               printf("detected recovery request (environment)\n");
+               want_recovery = 1;
+       }
        s = getenv("install_in_progress");
        if ((s != NULL) && (*s != '\0')) {
                printf("previous installation has not completed\n");
@@ -357,11 +356,6 @@ int misc_init_r(void)
                printf("previous installation has failed\n");
                want_recovery = 1;
        }
-       s = getenv("want_recovery");
-       if ((s != NULL) && (*s != '\0')) {
-               printf("detected recovery request (environment)\n");
-               want_recovery = 1;
-       }
        if (want_recovery) {
                printf("enforced start of the recovery system\n");
                setenv("bootcmd", "run recovery");
@@ -614,8 +608,10 @@ int checkboard(void)
 }
 
 #if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
-void ft_board_setup(void *blob, bd_t *bd)
+int ft_board_setup(void *blob, bd_t *bd)
 {
        ft_cpu_setup(blob, bd);
+
+       return 0;
 }
 #endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */