]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - arch/sparc/lib/board.c
Merge branch 'u-boot-ti/master' into 'u-boot-arm/master'
[karo-tx-uboot.git] / arch / sparc / lib / board.c
index 770136b82a2fec9858e035fc9b41e50d389be6f0..c778ba26e737745d1e848c7bc3e8afa4eae3b3d4 100644 (file)
@@ -6,23 +6,7 @@
  * (C) Copyright 2007
  * Daniel Hellstrom, Gaisler Research, daniel@gaisler.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>
@@ -62,7 +46,6 @@ DECLARE_GLOBAL_DATA_PTR;
 */
 
 extern void timer_interrupt_init(void);
-extern void malloc_bin_reloc(void);
 extern int do_ambapp_print(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]);
 extern int prom_init(void);
 
@@ -166,7 +149,6 @@ char *str_init_seq_done = "\n\rInit sequence done...\r\n\r\n";
 void board_init_f(ulong bootflag)
 {
        bd_t *bd;
-       unsigned char *s;
        init_fnc_t **init_fnc_ptr;
        int j;
 
@@ -248,8 +230,8 @@ void board_init_f(ulong bootflag)
        /*
         * We have to relocate the command table manually
         */
-       fixup_cmdtable(&__u_boot_cmd_start,
-               (ulong)(&__u_boot_cmd_end - &__u_boot_cmd_start));
+       fixup_cmdtable(ll_entry_start(cmd_tbl_t, cmd),
+                       ll_entry_count(cmd_tbl_t, cmd));
 #endif /* defined(CONFIG_NEEDS_MANUAL_RELOC) */
 
 #if defined(CONFIG_CMD_AMBAPP) && defined(CONFIG_SYS_AMBAPP_PRINT_ON_STARTUP)
@@ -273,7 +255,6 @@ void board_init_f(ulong bootflag)
        /* The Malloc area is immediately below the monitor copy in RAM */
        mem_malloc_init(CONFIG_SYS_MALLOC_BASE,
                        CONFIG_SYS_MALLOC_END - CONFIG_SYS_MALLOC_BASE);
-       malloc_bin_reloc();
 
 #if !defined(CONFIG_SYS_NO_FLASH)
        puts("Flash: ");
@@ -286,8 +267,7 @@ void board_init_f(ulong bootflag)
                 *
                 * NOTE: Maybe we should add some WATCHDOG_RESET()? XXX
                 */
-               s = getenv("flashchecksum");
-               if (s && (*s == 'y')) {
+               if (getenv_yesno("flashchecksum") == 1) {
                        printf("  CRC: %08lX",
                               crc32(0, (const unsigned char *)CONFIG_SYS_FLASH_BASE,
                                     flash_size)
@@ -333,8 +313,6 @@ void board_init_f(ulong bootflag)
        mac_read_from_eeprom();
 #endif
 
-       /* IP Address */
-       bd->bi_ip_addr = getenv_IPaddr("ipaddr");
 #if defined(CONFIG_PCI)
        /*
         * Do pci configuration
@@ -359,11 +337,6 @@ void board_init_f(ulong bootflag)
 
        /* Initialize from environment */
        load_addr = getenv_ulong("loadaddr", 16, load_addr);
-#if defined(CONFIG_CMD_NET)
-       if ((s = getenv("bootfile")) != NULL) {
-               copy_filename(BootFile, s, sizeof(BootFile));
-       }
-#endif /* CONFIG_CMD_NET */
 
        WATCHDOG_RESET();
 
@@ -422,13 +395,4 @@ void board_init_f(ulong bootflag)
 
 }
 
-void hang(void)
-{
-       puts("### ERROR ### Please RESET the board ###\n");
-#ifdef CONFIG_SHOW_BOOT_PROGRESS
-       show_boot_error(BOOTSTAGE_ID_NEED_RESET);
-#endif
-       for (;;) ;
-}
-
 /************************************************************************/