Add GPL-2.0+ SPDX-License-Identifier to source files
[platform/kernel/u-boot.git] / board / davinci / schmoogie / schmoogie.c
index 433769a..741afc4 100644 (file)
@@ -8,35 +8,19 @@
  * Copyright (C) 2004 Texas Instruments.
  *
  * ----------------------------------------------------------------------------
- * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * SPDX-License-Identifier:    GPL-2.0+
  * ----------------------------------------------------------------------------
  */
 
 #include <common.h>
 #include <i2c.h>
 #include <asm/arch/hardware.h>
-#include "../common/psc.h"
-#include "../common/misc.h"
+#include <asm/arch/davinci_misc.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
 int board_init(void)
 {
-       /* arch number of the board */
-       gd->bd->bi_arch_number = MACH_TYPE_SCHMOOGIE;
-
        /* address of boot parameters */
        gd->bd->bi_boot_params = LINUX_BOOT_PARAM_ADDR;
 
@@ -105,17 +89,15 @@ int misc_init_r(void)
                        0xb6, 0xe8, 0x0a, 0x54, 0xd7, 0x89, 0x6b, 0x35
                };
 
-       dv_display_clk_infos();
-
        /* Set serial number from UID chip */
        if (i2c_read(CONFIG_SYS_UID_ADDR, 0, 1, buf, 8)) {
                printf("\nUID @ 0x%02x read FAILED!!!\n", CONFIG_SYS_UID_ADDR);
-               forceenv("serial#", "FAILED");
+               setenv("serial#", "FAILED");
        } else {
                if (buf[0] != 0x70) {
                        /* Device Family Code */
                        printf("\nUID @ 0x%02x read FAILED!!!\n", CONFIG_SYS_UID_ADDR);
-                       forceenv("serial#", "FAILED");
+                       setenv("serial#", "FAILED");
                }
        }
        /* Now check CRC */
@@ -125,16 +107,13 @@ int misc_init_r(void)
 
        if (tmp[0] != 0) {
                printf("\nUID @ 0x%02x - BAD CRC!!!\n", CONFIG_SYS_UID_ADDR);
-               forceenv("serial#", "FAILED");
+               setenv("serial#", "FAILED");
        } else {
                /* CRC OK, set "serial" env variable */
                sprintf((char *)&tmp[0], "%02x%02x%02x%02x%02x%02x",
                        buf[6], buf[5], buf[4], buf[3], buf[2], buf[1]);
-               forceenv("serial#", (char *)&tmp[0]);
+               setenv("serial#", (char *)&tmp[0]);
        }
 
-       if (!eth_hw_init())
-               printf("ethernet init failed!\n");
-
        return(0);
 }