diff options
author | Kun-Hua Huang <kunhua@andestech.com> | 2015-08-24 14:52:35 +0800 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2015-08-28 11:46:35 -0400 |
commit | 2e88bb28d8061286d2f1cabcac224df15b941b82 (patch) | |
tree | f61379fd60c3a45e33c2fbae96df449daf7294db /arch/nds32/cpu/n1213 | |
parent | 14006a5671058bfe2f323beeec66448fce228adb (diff) | |
download | u-boot-2e88bb28d8061286d2f1cabcac224df15b941b82.tar.gz |
NDS32: Generic Board Support and Unsupport
Add nds32 ag101p generic board support.
Signed-off-by: Kun-Hua Huang <kunhua@andestech.com>
Diffstat (limited to 'arch/nds32/cpu/n1213')
-rw-r--r-- | arch/nds32/cpu/n1213/Makefile | 1 | ||||
-rw-r--r-- | arch/nds32/cpu/n1213/ag101/lowlevel_init.S | 16 | ||||
-rw-r--r-- | arch/nds32/cpu/n1213/start.S | 7 |
3 files changed, 15 insertions, 9 deletions
diff --git a/arch/nds32/cpu/n1213/Makefile b/arch/nds32/cpu/n1213/Makefile index 8ab1fcea26..7d5ae963ba 100644 --- a/arch/nds32/cpu/n1213/Makefile +++ b/arch/nds32/cpu/n1213/Makefile @@ -12,4 +12,3 @@ extra-y = start.o obj-$(if $(filter ag101,$(SOC)),y) += ag101/ -obj-$(if $(filter ag102,$(SOC)),y) += ag102/ 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 diff --git a/arch/nds32/cpu/n1213/start.S b/arch/nds32/cpu/n1213/start.S index 0d96c52cd5..2f0b76c04c 100644 --- a/arch/nds32/cpu/n1213/start.S +++ b/arch/nds32/cpu/n1213/start.S @@ -153,8 +153,11 @@ turnoff_wtdog: * $sp must be 8-byte alignment for ABI compliance. */ call_board_init_f: - li $sp, CONFIG_SYS_INIT_SP_ADDR - li $r0, 0x00000000 + li $sp, CONFIG_SYS_INIT_SP_ADDR + li $r10, GD_SIZE /* get GD size */ + sub $sp, $sp, $r10 /* GD start addr */ + move $r10, $sp + li $r0, 0x00000000 #ifdef __PIC__ #ifdef __NDS32_N1213_43U1H__ |