From: John Rigby <jcrigby@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/9] arm926ejs: add nand_spl boot support
Date: Tue, 12 Jan 2010 21:43:54 -0700 [thread overview]
Message-ID: <1263357841-5100-3-git-send-email-jcrigby@gmail.com> (raw)
In-Reply-To: <1263357841-5100-2-git-send-email-jcrigby@gmail.com>
Add CONFIG_PRELOADER/CONFIG_NAND_SPL support for nand booting
to arm926ejs/start.S
This is derived from CONFIG_PRELOADER support in arm1136/start.S
Signed-off-by: John Rigby <jcrigby@gmail.com>
---
cpu/arm926ejs/start.S | 42 +++++++++++++++++++++++++++++++++++++++++-
1 files changed, 41 insertions(+), 1 deletions(-)
diff --git a/cpu/arm926ejs/start.S b/cpu/arm926ejs/start.S
index 4421b6a..3b81151 100644
--- a/cpu/arm926ejs/start.S
+++ b/cpu/arm926ejs/start.S
@@ -53,6 +53,27 @@
.globl _start
_start:
b reset
+#ifdef CONFIG_PRELOADER
+/* No exception handlers in preloader */
+ ldr pc, _hang
+ ldr pc, _hang
+ ldr pc, _hang
+ ldr pc, _hang
+ ldr pc, _hang
+ ldr pc, _hang
+ ldr pc, _hang
+
+_hang:
+ .word do_hang
+/* pad to 64 byte boundary */
+ .word 0x12345678
+ .word 0x12345678
+ .word 0x12345678
+ .word 0x12345678
+ .word 0x12345678
+ .word 0x12345678
+ .word 0x12345678
+#else
ldr pc, _undefined_instruction
ldr pc, _software_interrupt
ldr pc, _prefetch_abort
@@ -76,6 +97,7 @@ _irq:
_fiq:
.word fiq
+#endif /* CONFIG_PRELOADER */
.balignl 16,0xdeadbeef
@@ -150,7 +172,6 @@ relocate: /* relocate U-Boot to RAM */
ldr r1, _TEXT_BASE /* test if we run from flash or RAM */
cmp r0, r1 /* don't reloc during debug */
beq stack_setup
-
ldr r2, _armboot_start
ldr r3, _bss_start
sub r2, r3, r2 /* r2 <- size of armboot */
@@ -166,11 +187,14 @@ copy_loop:
/* Set up the stack */
stack_setup:
ldr r0, _TEXT_BASE /* upper 128 KiB: relocated uboot */
+ sub sp, r0, #128 /* leave 32 words for abort-stack */
+#ifndef CONFIG_PRELOADER
sub r0, r0, #CONFIG_SYS_MALLOC_LEN /* malloc area */
sub r0, r0, #CONFIG_SYS_GBL_DATA_SIZE /* bdinfo */
#ifdef CONFIG_USE_IRQ
sub r0, r0, #(CONFIG_STACKSIZE_IRQ+CONFIG_STACKSIZE_FIQ)
#endif
+#endif /* CONFIG_PRELOADER */
sub sp, r0, #12 /* leave 3 words for abort-stack */
bic sp, r0, #7 /* 8-byte align stack for ABI compliance */
@@ -179,6 +203,7 @@ clear_bss:
ldr r1, _bss_end /* stop here */
mov r2, #0x00000000 /* clear */
+#ifndef CONFIG_PRELOADER
clbss_l:str r2, [r0] /* clear loop... */
add r0, r0, #4
cmp r0, r1
@@ -186,11 +211,16 @@ clbss_l:str r2, [r0] /* clear loop... */
bl coloured_LED_init
bl red_LED_on
+#endif /* CONFIG_PRELOADER */
ldr pc, _start_armboot
_start_armboot:
+#ifdef CONFIG_NAND_SPL
+ .word nand_boot
+#else
.word start_armboot
+#endif /* CONFIG_NAND_SPL */
/*
@@ -231,6 +261,7 @@ cpu_init_crit:
mov pc, lr /* back to my caller */
#endif /* CONFIG_SKIP_LOWLEVEL_INIT */
+#ifndef CONFIG_PRELOADER
/*
*************************************************************************
*
@@ -332,10 +363,18 @@ cpu_init_crit:
.macro get_fiq_stack @ setup FIQ stack
ldr sp, FIQ_STACK_START
.endm
+#endif /* CONFIG_PRELOADER */
/*
* exception handlers
*/
+#ifdef CONFIG_PRELOADER
+ .align 5
+do_hang:
+ ldr sp, _TEXT_BASE /* switch to abort stack */
+1:
+ bl 1b /* hang and never return */
+#else /* !CONFIG_PRELOADER */
.align 5
undefined_instruction:
get_bad_stack
@@ -398,3 +437,4 @@ fiq:
bl do_fiq
#endif
+#endif /* CONFIG_PRELOADER */
--
1.6.4.2.236.gf324c
next prev parent reply other threads:[~2010-01-13 4:43 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-13 4:43 [U-Boot] [PATCH 0/9] Add support for i.MX25 SOC and TX25 board John Rigby
2010-01-13 4:43 ` [U-Boot] [PATCH 1/9] mxc_serial replace platform specific clock John Rigby
2010-01-13 4:43 ` John Rigby [this message]
2010-01-13 4:43 ` [U-Boot] [PATCH 3/9] Add v1.1 support to nand_spl fsl nfc driver John Rigby
2010-01-13 4:43 ` [U-Boot] [PATCH 4/9] Nand mxc_nand add v1.1 controller support John Rigby
2010-01-13 4:43 ` [U-Boot] [PATCH 5/9] fec_mxc: cleanup and factor out imx27 dependencies John Rigby
2010-01-13 4:43 ` [U-Boot] [PATCH 6/9] Add support for Freescale MX25 SOC John Rigby
2010-01-13 4:43 ` [U-Boot] [PATCH 7/9] fec_mxc: add imx25 support John Rigby
2010-01-13 4:44 ` [U-Boot] [PATCH 8/9] env_nand.c: print error message and fail gracefully John Rigby
2010-01-13 4:44 ` [U-Boot] [PATCH 9/9] Add support for KARO TX25 board John Rigby
2010-01-13 15:26 ` Fabio Estevam
2010-01-15 15:20 ` Wolfgang Denk
2010-01-15 22:28 ` [U-Boot] [PATCH 8/9] env_nand.c: print error message and fail gracefully Scott Wood
2010-01-13 15:10 ` [U-Boot] [PATCH 4/9] Nand mxc_nand add v1.1 controller support Fabio Estevam
2010-01-13 16:50 ` John Rigby
2010-01-15 0:48 ` Fabio Estevam
2010-01-15 16:49 ` John Rigby
2010-01-15 22:36 ` Scott Wood
2010-01-15 23:32 ` John Rigby
2010-01-13 15:15 ` [U-Boot] [PATCH 3/9] Add v1.1 support to nand_spl fsl nfc driver Fabio Estevam
2010-01-15 23:13 ` Scott Wood
2010-01-15 23:30 ` John Rigby
2010-01-15 23:48 ` Scott Wood
2010-01-15 15:09 ` [U-Boot] [PATCH 0/9] Add support for i.MX25 SOC and TX25 board Wolfgang Denk
2010-01-15 15:14 ` Wolfgang Denk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1263357841-5100-3-git-send-email-jcrigby@gmail.com \
--to=jcrigby@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox