[Armadeus-commitlog] armadeus branch, master, updated. armadeus-5.3-242-g7e5e504
Brought to you by:
sszy
|
From: jorasse <jo...@us...> - 2014-04-30 08:52:52
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via 7e5e50485e71b0cbf764a42994ad7a597db59b43 (commit)
from d1f6c82a4db63661dbf78a91664a4c2e98091970 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 7e5e50485e71b0cbf764a42994ad7a597db59b43
Author: Eric Jarrige <eri...@ar...>
Date: Wed Apr 30 10:51:26 2014 +0200
[UBOOT] 2014.04: apf27: support boot from RAM
-----------------------------------------------------------------------
Summary of changes:
.../2014.04/302-apf27-support-boot-from-RAM.patch | 48 ++++++++++++++++++++
1 files changed, 48 insertions(+), 0 deletions(-)
create mode 100644 patches/u-boot/2014.04/302-apf27-support-boot-from-RAM.patch
diff --git a/patches/u-boot/2014.04/302-apf27-support-boot-from-RAM.patch b/patches/u-boot/2014.04/302-apf27-support-boot-from-RAM.patch
new file mode 100644
index 0000000..7f1402e
--- /dev/null
+++ b/patches/u-boot/2014.04/302-apf27-support-boot-from-RAM.patch
@@ -0,0 +1,48 @@
+apf27: Support boot from RAM
+This patch adds capabilites to start U-Boot directly from RAM
+to test a new version of U-Boot before being programmed in FLASH.
+here is a typical use case: run download_uboot ; go a0000000
+
+Signed-off-by: Eric Jarrige <eri...@ar...>
+---
+--- a/board/armadeus/apf27/apf27.c
++++ b/board/armadeus/apf27/apf27.c
+@@ -241,10 +241,22 @@ void board_init_f(ulong bootflag)
+ * are 4-byte-aligned.
+ */
+ ulong *start_ptr, *end_ptr, *link_ptr, *run_ptr, *dst;
++ register ulong reg0;
+ asm volatile ("ldr %0, =_start" : "=r"(start_ptr));
+ asm volatile ("ldr %0, =_end" : "=r"(end_ptr));
+ asm volatile ("ldr %0, =board_init_f" : "=r"(link_ptr));
+ asm volatile ("adr %0, board_init_f" : "=r"(run_ptr));
++ asm volatile ("mov %0, pc" : "=r"(reg0));
++ if ((reg0 > (ulong)PHYS_SDRAM_1) &&
++ (reg0 < (ulong)(PHYS_SDRAM_2+PHYS_SDRAM_2_SIZE))) {
++ /*
++ * in the case we are already running from RAM we do not need
++ * to load U-Boot from flash - so let's go to U-Boot in RAM.
++ */
++ asm volatile ("ldr %0, =0xfffff800" : "=r"(reg0));
++ asm volatile ("and %0, %0, pc" : "=r"(reg0));
++ asm volatile ("add pc, %0, %1" : : "r" (reg0), "i" (CONFIG_SYS_NAND_U_BOOT_OFFS));
++ }
+ for (dst = start_ptr; dst < end_ptr; dst++)
+ *dst = *(dst+(run_ptr-link_ptr));
+
+--- a/board/armadeus/apf27/lowlevel_init.S
++++ b/board/armadeus/apf27/lowlevel_init.S
+@@ -162,6 +162,13 @@ lowlevel_init:
+ init_aipi
+ init_clock
+ #ifdef CONFIG_SPL_BUILD
++ /* skip sdram initialization if we run from RAM */
++ cmp pc, #PHYS_SDRAM_1
++ bls 1f
++ cmp pc, #(PHYS_SDRAM_2+PHYS_SDRAM_2_SIZE)
++ bhi 1f
++ mov pc, lr
++1:
+ init_ddr
+ #endif
+
hooks/post-receive
--
armadeus
|