Changes for U-Boot 1.1.4:
======================================================================
+* Fix U-Boot compilation for MIPS boards using ELDK 4.0
+
* Add support for TQM8541/8555 boards, TQM85xx support reworked:
- Support for TQM8541/8555 boards added.
- Complete rework of TQM8540/8560 support.
if [ "$v" -lt "14" ]; then \
echo "-mcpu=4kc"; \
else \
- echo "-march=4kc -mtune=4kc -Wa,-mips_allow_branch_to_undefined"; \
+ echo "-march=4kc -mtune=4kc"; \
fi)
ifneq (,$(findstring 4KCle,$(CROSS_COMPILE)))
li t0, CONF_CM_UNCACHED
mtc0 t0, CP0_CONFIG
+ /* Initialize GOT pointer.
+ */
+ bal 1f
+ nop
+ .word _GLOBAL_OFFSET_TABLE_
+ 1:
+ move gp, ra
+ lw t1, 0(ra)
+ move gp, t1
+
#ifdef CONFIG_INCA_IP
/* Disable INCA-IP Watchdog.
*/
- bal disable_incaip_wdt
+ la t9, disable_incaip_wdt
+ jalr t9
nop
#endif
/* Initialize any external memory.
*/
- bal lowlevel_init
+ la t9, lowlevel_init
+ jalr t9
nop
/* Initialize caches...
*/
- bal mips_cache_reset
+ la t9, mips_cache_reset
+ jalr t9
nop
/* ... and enable them.
/* Set up temporary stack.
*/
li a0, CFG_INIT_SP_OFFSET
- bal mips_cache_lock
+ la t9, mips_cache_lock
+ jalr t9
nop
li t0, CFG_SDRAM_BASE + CFG_INIT_SP_OFFSET
la sp, 0(t0)
- /* Initialize GOT pointer.
- */
- bal 1f
- nop
- .word _GLOBAL_OFFSET_TABLE_ - 1f + 4
-1:
- move gp, ra
- lw t1, 0(ra)
- add gp, t1
la t9, board_init_f
j t9
nop
#include <net.h>
#include <environment.h>
+DECLARE_GLOBAL_DATA_PTR;
+
#if ( ((CFG_ENV_ADDR+CFG_ENV_SIZE) < CFG_MONITOR_BASE) || \
(CFG_ENV_ADDR >= (CFG_MONITOR_BASE + CFG_MONITOR_LEN)) ) || \
defined(CFG_ENV_IS_IN_NVRAM)
*/
static void mem_malloc_init (void)
{
- DECLARE_GLOBAL_DATA_PTR;
-
ulong dest_addr = CFG_MONITOR_BASE + gd->reloc_off;
mem_malloc_end = dest_addr;
static int init_func_ram (void)
{
- DECLARE_GLOBAL_DATA_PTR;
-
#ifdef CONFIG_BOARD_TYPES
int board_type = gd->board_type;
#else
static int init_baudrate (void)
{
- DECLARE_GLOBAL_DATA_PTR;
-
uchar tmp[64]; /* long enough for environment variables */
int i = getenv_r ("baudrate", tmp, sizeof (tmp));
void board_init_f(ulong bootflag)
{
- DECLARE_GLOBAL_DATA_PTR;
-
gd_t gd_data, *id;
bd_t *bd;
init_fnc_t **init_fnc_ptr;
ulong addr, addr_sp, len = (ulong)&uboot_end - CFG_MONITOR_BASE;
+ ulong *s;
#ifdef CONFIG_PURPLE
void copy_code (ulong);
#endif
*/
addr_sp -= 16;
addr_sp &= ~0xF;
- *((ulong *) addr_sp)-- = 0;
- *((ulong *) addr_sp)-- = 0;
+ s = (ulong *)addr_sp;
+ *s-- = 0;
+ *s-- = 0;
+ addr_sp = (ulong)s;
debug ("Stack Pointer at: %08lx\n", addr_sp);
/*
void board_init_r (gd_t *id, ulong dest_addr)
{
- DECLARE_GLOBAL_DATA_PTR;
cmd_tbl_t *cmdtp;
ulong size;
extern void malloc_bin_reloc (void);