diff options
Diffstat (limited to 'arch/nds32/cpu/n1213/ag101/lowlevel_init.S')
-rw-r--r-- | arch/nds32/cpu/n1213/ag101/lowlevel_init.S | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/arch/nds32/cpu/n1213/ag101/lowlevel_init.S b/arch/nds32/cpu/n1213/ag101/lowlevel_init.S index d6484b9cc5..1a94868734 100644 --- a/arch/nds32/cpu/n1213/ag101/lowlevel_init.S +++ b/arch/nds32/cpu/n1213/ag101/lowlevel_init.S @@ -205,8 +205,8 @@ relo_base: * Remapping */ led 0x1a - write32 SDMC_B0_BSR_A, SDMC_B0_BSR_D ! 0x00001100 - write32 SDMC_B1_BSR_A, SDMC_B1_BSR_D ! 0x00001140 + write32 SDMC_B0_BSR_A, SDMC_B0_BSR_D ! 0x00001800 + write32 SDMC_B1_BSR_A, SDMC_B1_BSR_D ! 0x00001880 /* clear empty BSR registers */ led 0x1b @@ -272,7 +272,11 @@ relo_base: */ led 0x1c write32 SDMC_B0_BSR_A, 0x00001000 - write32 SDMC_B1_BSR_A, 0x00001040 + write32 SDMC_B1_BSR_A, 0x00001200 + li $r5, CONFIG_SYS_TEXT_BASE /* flash base address */ + add $r11, $r11, $r5 /* add flash address offset for ret */ + add $r10, $r10, $r5 + move $lp, $r11 setbf15 AHBC_CR_A, FTAHBC020S_CR_REMAP ! 0x1 /* @@ -282,9 +286,9 @@ relo_base: li $r5, AHBC_BSR6_A lwi $r6, [$r5] li $r4, 0xfff0ffff - and $r6 ,$r4 , $r6 + and $r6 ,$r4, $r6 li $r4, 0x000b0000 - or $r6, $r4, $r6 + or $r6, $r4, $r6 swi $r6, [$r5] /* @@ -299,7 +303,7 @@ relo_base: or $r5, $r5, $r6 swi $r5, [$r4] #endif /* #ifdef CONFIG_MEM_REMAP */ - move $lp, $r11 + move $lp, $r11 2: ret |