diff mbox

[19/22] armv7: embed u-boot size within u-boot for use from SPL

Message ID 1298893591-17636-20-git-send-email-aneesh@ti.com
State New
Headers show

Commit Message

Aneesh V Feb. 28, 2011, 11:46 a.m. UTC
Embed the u-boot flash image size at a known offset from the
start of u-boot so that SPL can use it while loading u-boot
from a non-XIP media.

Signed-off-by: Aneesh V <aneesh@ti.com>
---
 arch/arm/cpu/armv7/start.S |    6 +++++-
 spl/board/ti/spl-omap.lds  |    1 +
 2 files changed, 6 insertions(+), 1 deletions(-)
diff mbox

Patch

diff --git a/arch/arm/cpu/armv7/start.S b/arch/arm/cpu/armv7/start.S
index f5f08d9..1cbd128 100644
--- a/arch/arm/cpu/armv7/start.S
+++ b/arch/arm/cpu/armv7/start.S
@@ -64,8 +64,12 @@  _pad:			.word 0x12345678 /* now 16*4=64 */
 
 .global _end_vect
 _end_vect:
+.global	_u_boot_size
+_u_boot_size:
+	.word	0xDEADBEEF
+	.word	__flash_image_end - _start
 
-	.balignl 16,0xdeadbeef
+.balignl 16,0xdeadbeef
 /*************************************************************************
  *
  * Startup Code (reset vector)
diff --git a/spl/board/ti/spl-omap.lds b/spl/board/ti/spl-omap.lds
index 27b5295..64eb4c9 100644
--- a/spl/board/ti/spl-omap.lds
+++ b/spl/board/ti/spl-omap.lds
@@ -50,6 +50,7 @@  SECTIONS
 	.data : { *(SORT_BY_ALIGNMENT(.data*)) } >.sram
 	. = ALIGN(4);
 	__image_copy_end = .;
+	__flash_image_end = .;
 
 	.bss :
 	{