mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 04/10] ARM omap3: call a_init from board code
Date: Mon, 16 Jan 2012 11:18:14 +0100	[thread overview]
Message-ID: <1326709100-24106-5-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1326709100-24106-1-git-send-email-s.hauer@pengutronix.de>

There is no need to call a_init before relocation, so rename
the function to omap3_core_init and call it from board code.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/boards/beagle/board.c            |    2 ++
 arch/arm/boards/omap343xdsp/board.c       |    3 +++
 arch/arm/boards/omap3evm/board.c          |    2 ++
 arch/arm/mach-omap/include/mach/silicon.h |    4 +---
 arch/arm/mach-omap/omap3_core.S           |    9 ---------
 arch/arm/mach-omap/omap3_generic.c        |    2 +-
 6 files changed, 9 insertions(+), 13 deletions(-)

diff --git a/arch/arm/boards/beagle/board.c b/arch/arm/boards/beagle/board.c
index bd663ad..faeaf8e 100644
--- a/arch/arm/boards/beagle/board.c
+++ b/arch/arm/boards/beagle/board.c
@@ -224,6 +224,8 @@ static int beagle_board_init(void)
 {
 	int in_sdram = running_in_sdram();
 
+	omap3_core_init();
+
 	mux_config();
 	/* Dont reconfigure SDRAM while running in SDRAM! */
 	if (!in_sdram)
diff --git a/arch/arm/boards/omap343xdsp/board.c b/arch/arm/boards/omap343xdsp/board.c
index 2cbb987..4ad6f13 100644
--- a/arch/arm/boards/omap343xdsp/board.c
+++ b/arch/arm/boards/omap343xdsp/board.c
@@ -80,6 +80,9 @@ static void mux_config(void);
 static int sdp343x_board_init(void)
 {
 	int in_sdram = running_in_sdram();
+
+	omap3_core_init();
+
 	mux_config();
 	if (!in_sdram)
 		sdrc_init();
diff --git a/arch/arm/boards/omap3evm/board.c b/arch/arm/boards/omap3evm/board.c
index ec2ed2c..fdd5227 100644
--- a/arch/arm/boards/omap3evm/board.c
+++ b/arch/arm/boards/omap3evm/board.c
@@ -200,6 +200,8 @@ static int omap3_evm_board_init(void)
 {
 	int in_sdram = running_in_sdram();
 
+	omap3_core_init();
+
 	mux_config();
 
 	/* Dont reconfigure SDRAM while running in SDRAM! */
diff --git a/arch/arm/mach-omap/include/mach/silicon.h b/arch/arm/mach-omap/include/mach/silicon.h
index c2f0c41..638d6c4 100644
--- a/arch/arm/mach-omap/include/mach/silicon.h
+++ b/arch/arm/mach-omap/include/mach/silicon.h
@@ -30,10 +30,8 @@
 #endif
 
 /* If Architecture specific init functions are present */
-#ifdef CONFIG_ARCH_HAS_LOWLEVEL_INIT
 #ifndef __ASSEMBLY__
-void a_init(void);
+void omap3_core_init(void);
 #endif /* __ASSEMBLY__ */
-#endif
 
 #endif /* __ASM_ARCH_OMAP_SILICON_H */
diff --git a/arch/arm/mach-omap/omap3_core.S b/arch/arm/mach-omap/omap3_core.S
index 90c4243..b32017c 100644
--- a/arch/arm/mach-omap/omap3_core.S
+++ b/arch/arm/mach-omap/omap3_core.S
@@ -69,16 +69,7 @@ next:
 	orr r0, r0, r1
 	/* Store the new vector address */
 	mcr p15, #0, r0, c12, c0, #0
-	/* Setup a temporary stack so that we can call C functions */
-	ldr	sp,	SRAM_STACK
-        str     ip,	[sp]    /* stash old link register */
-        str     lr,	[sp]    /* stash current link register */
-	mov	ip,	lr	/* save link reg across call */
-	bl      a_init          /* Architecture init */
-        ldr     lr,	[sp]    /* restore current link register */
-        ldr     ip,	[sp]    /* restore save ip */
 
-	/* Invalidate all Dcaches */
 #ifndef CONFIG_CPU_V7_DCACHE_SKIP
 	/* If Arch specific ROM code SMI handling does not exist */
 	mrc	p15, 1, r0, c0, c0, 1	/* read clidr */
diff --git a/arch/arm/mach-omap/omap3_generic.c b/arch/arm/mach-omap/omap3_generic.c
index fc83d23..7219e28 100644
--- a/arch/arm/mach-omap/omap3_generic.c
+++ b/arch/arm/mach-omap/omap3_generic.c
@@ -484,7 +484,7 @@ static void try_unlock_memory(void)
  *
  * @return void
  */
-void a_init(void)
+void omap3_core_init(void)
 {
 	watchdog_init();
 
-- 
1.7.8.3


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

  parent reply	other threads:[~2012-01-16 10:18 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-16 10:18 [PATCH] omap3 towards thumb2 support Sascha Hauer
2012-01-16 10:18 ` [PATCH 01/10] ARM omap3: remove OMAP3_COPY_CLOCK_SRAM Sascha Hauer
2012-01-16 10:18 ` [PATCH 02/10] ARM omap3 beagle xload: Move stack to SRAM Sascha Hauer
2012-01-16 10:18 ` [PATCH 03/10] ARM omap3: move board_init to pure_initcall Sascha Hauer
2012-01-16 10:18 ` Sascha Hauer [this message]
2012-01-16 10:18 ` [PATCH 05/10] ARM omap3 clock: move pll tables to C code Sascha Hauer
2012-01-16 10:18 ` [PATCH 06/10] ARM omap3: remove vector setup from lowlevel code Sascha Hauer
2012-01-16 10:18 ` [PATCH 07/10] ARM omap3: reimplement setup_auxcr in pure asm Sascha Hauer
2012-01-16 10:18 ` [PATCH 08/10] ARM cache-armv7: Add additional ISB Sascha Hauer
2012-01-16 10:18 ` [PATCH 09/10] mtd omap nand: fix driver without CONFIG_PARAMETER Sascha Hauer
2012-01-16 10:34   ` Sascha Hauer
2012-01-16 10:18 ` [PATCH 10/10] ARM omap3: make omap3_core.S thumb safe Sascha Hauer
2012-01-16 11:30 ` [PATCH] omap3 towards thumb2 support Premi, Sanjeev
2012-01-16 11:52   ` Sascha Hauer
2012-01-16 12:01     ` Premi, Sanjeev
2012-01-16 12:42       ` Premi, Sanjeev
2012-01-16 15:46         ` Sascha Hauer
2012-01-16 16:16           ` Premi, Sanjeev
2012-01-17 11:14             ` Premi, Sanjeev
2012-01-17 12:12               ` Sascha Hauer
2012-01-17 12:24                 ` Premi, Sanjeev
2012-01-17 13:10                   ` Sascha Hauer
2012-01-17 13:20                     ` Premi, Sanjeev

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=1326709100-24106-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