From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 4/4] ARM: Add missing barebox_arm_boarddata function
Date: Sun, 10 Mar 2013 11:19:21 +0100 [thread overview]
Message-ID: <1362910761-1732-5-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1362910761-1732-1-git-send-email-s.hauer@pengutronix.de>
The comment above barebox_arm_entry promises to preserve the boarddata
variable passed to it which can then later get back with
barebox_arm_boarddata(). This function was missing so far, add it.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/cpu/start.c | 10 ++++++++++
arch/arm/include/asm/barebox-arm.h | 1 +
2 files changed, 11 insertions(+)
diff --git a/arch/arm/cpu/start.c b/arch/arm/cpu/start.c
index cd34d9c..943fa46 100644
--- a/arch/arm/cpu/start.c
+++ b/arch/arm/cpu/start.c
@@ -30,6 +30,15 @@
#include "mmu-early.h"
unsigned long arm_stack_top;
+static unsigned long barebox_boarddata;
+
+/*
+ * return the boarddata variable passed to barebox_arm_entry
+ */
+unsigned long barebox_arm_boarddata(void)
+{
+ return barebox_boarddata;
+}
static noinline __noreturn void __start(uint32_t membase, uint32_t memsize,
uint32_t boarddata)
@@ -39,6 +48,7 @@ static noinline __noreturn void __start(uint32_t membase, uint32_t memsize,
setup_c();
+ barebox_boarddata = boarddata;
arm_stack_top = endmem;
endmem -= STACK_SIZE; /* Stack */
diff --git a/arch/arm/include/asm/barebox-arm.h b/arch/arm/include/asm/barebox-arm.h
index 9c10e36..f097092 100644
--- a/arch/arm/include/asm/barebox-arm.h
+++ b/arch/arm/include/asm/barebox-arm.h
@@ -41,5 +41,6 @@ uint32_t get_runtime_offset(void);
void setup_c(void);
void __noreturn barebox_arm_entry(uint32_t membase, uint32_t memsize, uint32_t boarddata);
+unsigned long barebox_arm_boarddata(void);
#endif /* _BAREBOX_ARM_H_ */
--
1.8.2.rc2
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
prev parent reply other threads:[~2013-03-10 10:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-10 10:19 [PATCH] misc cleanups Sascha Hauer
2013-03-10 10:19 ` [PATCH 1/4] include asm/sections.h instead of asm-generic/sections.h Sascha Hauer
2013-03-10 10:19 ` [PATCH 2/4] MMC i.MX: remove unnecessary mach include Sascha Hauer
2013-03-10 10:19 ` [PATCH 3/4] ARM i.MX: Add double include protection for generic.h Sascha Hauer
2013-03-10 10:19 ` Sascha Hauer [this message]
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=1362910761-1732-5-git-send-email-s.hauer@pengutronix.de \
--to=s.hauer@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