mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Michael Olbrich <m.olbrich@pengutronix.de>
Subject: [PATCH 1/3] ARM Samsung: fix booting from NAND without pbl
Date: Tue, 24 Feb 2015 15:53:48 +0100	[thread overview]
Message-ID: <1424789630-10461-1-git-send-email-m.olbrich@pengutronix.de> (raw)

This was broken in 558d72dc5116 (ARM Samsung: fix booting from NAND with
pbl). '_text' is TEXT_BASE when building without pbl and (TEXT_BASE -
SZ_2M) when building with pbl, so this works in both cases.

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
---

I hope I understood how this should work and this is correct now. It worked
for me with and without pbl. Anything else that could mess this up?

Michael

 arch/arm/mach-samsung/lowlevel-s3c24x0.S | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-samsung/lowlevel-s3c24x0.S b/arch/arm/mach-samsung/lowlevel-s3c24x0.S
index 626ad0418778..d43cdff52863 100644
--- a/arch/arm/mach-samsung/lowlevel-s3c24x0.S
+++ b/arch/arm/mach-samsung/lowlevel-s3c24x0.S
@@ -15,7 +15,6 @@
  */
 
 #include <config.h>
-#include <linux/sizes.h>
 #include <mach/s3c-iomap.h>
 
 	.section ".text_bare_init.s3c24x0_disable_wd","ax"
@@ -251,7 +250,7 @@ s3c24x0_nand_boot:
 	beq 2f
 	mov pc, lr	/* NOR case: nothing to do here */
 
-2:	ldr sp, =(TEXT_BASE - SZ_2M)	/* Setup a temporary stack in SDRAM */
+2:	ldr sp, =_text	/* Setup a temporary stack in SDRAM */
 /*
  * We still run at a location we are not linked to. But lets still running
  * from the internal SRAM, this may speed up the boot
@@ -262,7 +261,7 @@ s3c24x0_nand_boot:
 /*
  * Adjust the return address to the correct address in SDRAM
  */
-	ldr r1, =(TEXT_BASE - SZ_2M)
+	ldr r1, =_text
 	add lr, lr, r1
 
 	mov pc, lr
-- 
2.1.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

             reply	other threads:[~2015-02-24 14:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-24 14:53 Michael Olbrich [this message]
2015-02-24 14:53 ` [PATCH 2/3] friendlyarm-mini2440: add support for the W35 display Michael Olbrich
2015-02-25  7:36   ` Sascha Hauer
2015-02-24 14:53 ` [PATCH 3/3] ARM Samsung: add simple NAND barebox update handler Michael Olbrich
2015-02-25  7:34   ` Sascha Hauer
2015-02-25 16:48     ` [PATCH] " Michael Olbrich
2015-02-26  5:58       ` Sascha Hauer
2015-02-25  7:31 ` [PATCH 1/3] ARM Samsung: fix booting from NAND without pbl Sascha Hauer

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=1424789630-10461-1-git-send-email-m.olbrich@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /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