diff options
author | Wolfgang Denk <wd@pollux.(none)> | 2005-12-01 02:15:07 +0100 |
---|---|---|
committer | Wolfgang Denk <wd@pollux.(none)> | 2005-12-01 02:15:07 +0100 |
commit | c75eba3b4140187cd0d9bd8049f5df4c49b6889b (patch) | |
tree | a3ee0f61898fdac05b298b23e42b784d6fe0d5e1 /cpu | |
parent | 4a86d779ff0b2bf9690e50786dece5a689ba3345 (diff) |
Fix U-Boot compilation for MIPS boards using ELDK 4.0
Diffstat (limited to 'cpu')
-rw-r--r-- | cpu/mips/config.mk | 2 | ||||
-rw-r--r-- | cpu/mips/start.S | 31 |
2 files changed, 19 insertions, 14 deletions
diff --git a/cpu/mips/config.mk b/cpu/mips/config.mk index fd10747aa3..c357615c03 100644 --- a/cpu/mips/config.mk +++ b/cpu/mips/config.mk @@ -26,7 +26,7 @@ MIPSFLAGS=$(shell \ 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))) diff --git a/cpu/mips/start.S b/cpu/mips/start.S index ff105a4184..e91e2137d7 100644 --- a/cpu/mips/start.S +++ b/cpu/mips/start.S @@ -234,21 +234,34 @@ reset: 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. @@ -260,21 +273,13 @@ reset: /* 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 |