X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;ds=sidebyside;f=arch%2Fmips%2Flib%2Fboard.c;h=3feb02071209b1e959d8ca1706e03be7928f7caf;hb=cc49da249cf2f380d2fed5571fad65ce6494fc95;hp=7ddd77832cc5f165111d5b553d212002fa6d1047;hpb=c7656bab411433f987baa2288eff8c78ddc0f378;p=oweals%2Fu-boot.git diff --git a/arch/mips/lib/board.c b/arch/mips/lib/board.c index 7ddd77832c..3feb020712 100644 --- a/arch/mips/lib/board.c +++ b/arch/mips/lib/board.c @@ -2,28 +2,13 @@ * (C) Copyright 2003 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. * - * 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 #include #include +#include #include #include #include @@ -42,12 +27,6 @@ ulong monitor_flash_len; static char *failed = "*** failed ***\n"; -/* - * mips_io_port_base is the begin of the address space to which x86 style - * I/O ports are mapped. - */ -unsigned long mips_io_port_base = -1; - int __board_early_init_f(void) { /* @@ -124,9 +103,6 @@ init_fnc_t *init_sequence[] = { board_early_init_f, timer_init, env_init, /* initialize environment */ -#ifdef CONFIG_INCA_IP - incaip_set_cpuclk, /* set cpu clock according to env. variable */ -#endif init_baudrate, /* initialize baudrate settings */ serial_init, /* serial communications setup */ console_init_f, @@ -142,7 +118,7 @@ void board_init_f(ulong bootflag) gd_t gd_data, *id; bd_t *bd; init_fnc_t **init_fnc_ptr; - ulong addr, addr_sp, len = (ulong)&uboot_end - CONFIG_SYS_MONITOR_BASE; + ulong addr, addr_sp, len; ulong *s; /* Pointer is writable since we allocated a register for it. @@ -175,6 +151,7 @@ void board_init_f(ulong bootflag) /* Reserve memory for U-Boot code, data & bss * round down to next 16 kB limit */ + len = bss_end() - CONFIG_SYS_MONITOR_BASE; addr -= len; addr &= ~(16 * 1024 - 1); @@ -227,7 +204,6 @@ void board_init_f(ulong bootflag) */ bd->bi_memstart = CONFIG_SYS_SDRAM_BASE; /* start of DRAM */ bd->bi_memsize = gd->ram_size; /* size of DRAM in bytes */ - bd->bi_baudrate = gd->baudrate; /* Console Baudrate */ memcpy(id, (void *)gd, sizeof(gd_t)); @@ -247,9 +223,6 @@ void board_init_r(gd_t *id, ulong dest_addr) { #ifndef CONFIG_SYS_NO_FLASH ulong size; -#endif -#ifndef CONFIG_ENV_IS_NOWHERE - extern char *env_name_spec; #endif bd_t *bd; @@ -260,27 +233,15 @@ void board_init_r(gd_t *id, ulong dest_addr) gd->reloc_off = dest_addr - CONFIG_SYS_MONITOR_BASE; - monitor_flash_len = (ulong)&uboot_end_data - dest_addr; + monitor_flash_len = image_copy_end() - dest_addr; -#if defined(CONFIG_NEEDS_MANUAL_RELOC) - /* - * We have to relocate the command table manually - */ - fixup_cmdtable(ll_entry_start(cmd_tbl_t, cmd), - ll_entry_count(cmd_tbl_t, cmd)); -#endif /* defined(CONFIG_NEEDS_MANUAL_RELOC) */ - - /* there are some other pointer constants we must deal with */ -#ifndef CONFIG_ENV_IS_NOWHERE - env_name_spec += gd->reloc_off; -#endif + serial_initialize(); bd = gd->bd; /* The Malloc area is immediately below the monitor copy in DRAM */ mem_malloc_init(CONFIG_SYS_MONITOR_BASE + gd->reloc_off - TOTAL_MALLOC_LEN, TOTAL_MALLOC_LEN); - malloc_bin_reloc(); #ifndef CONFIG_SYS_NO_FLASH /* configure available FLASH banks */ @@ -357,10 +318,3 @@ void board_init_r(gd_t *id, ulong dest_addr) /* NOTREACHED - no way out of command loop except booting */ } - -void hang(void) -{ - puts("### ERROR ### Please RESET the board ###\n"); - for (;;) - ; -}