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 4/4] ARM: mode cpu_architecture() to common.c
Date: Wed, 29 Jan 2014 10:33:39 +0100	[thread overview]
Message-ID: <1390988019-31405-4-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1390988019-31405-1-git-send-email-s.hauer@pengutronix.de>

It might be needed in pbl code, so move it to a file which is
compiled in pbl mode.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/cpu/common.c | 14 ++++++++++++++
 arch/arm/cpu/cpu.c    | 14 --------------
 2 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/arch/arm/cpu/common.c b/arch/arm/cpu/common.c
index 40f784f..d5f8929 100644
--- a/arch/arm/cpu/common.c
+++ b/arch/arm/cpu/common.c
@@ -18,6 +18,7 @@
 #include <common.h>
 #include <init.h>
 #include <sizes.h>
+#include <asm/system_info.h>
 #include <asm/barebox-arm.h>
 #include <asm/barebox-arm-head.h>
 #include <asm-generic/memory_layout.h>
@@ -64,3 +65,16 @@ void relocate_to_current_adr(void)
 	arm_early_mmu_cache_flush();
 	flush_icache();
 }
+
+#ifdef ARM_MULTIARCH
+
+int __cpu_architecture;
+
+int __pure cpu_architecture(void)
+{
+	if(__cpu_architecture == CPU_ARCH_UNKNOWN)
+		__cpu_architecture = arm_early_get_cpu_architecture();
+
+	return __cpu_architecture;
+}
+#endif
diff --git a/arch/arm/cpu/cpu.c b/arch/arm/cpu/cpu.c
index f2e698d..895e07e 100644
--- a/arch/arm/cpu/cpu.c
+++ b/arch/arm/cpu/cpu.c
@@ -29,7 +29,6 @@
 #include <asm/system.h>
 #include <asm/memory.h>
 #include <asm-generic/memory_layout.h>
-#include <asm/system_info.h>
 #include <asm/cputype.h>
 #include <asm/cache.h>
 #include <asm/ptrace.h>
@@ -146,16 +145,3 @@ static int execute_init(void)
 }
 postcore_initcall(execute_init);
 #endif
-
-#ifdef ARM_MULTIARCH
-
-int __cpu_architecture;
-
-int __pure cpu_architecture(void)
-{
-	if(__cpu_architecture == CPU_ARCH_UNKNOWN)
-		__cpu_architecture = arm_early_get_cpu_architecture();
-
-	return __cpu_architecture;
-}
-#endif
-- 
1.8.5.3


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

      parent reply	other threads:[~2014-01-29  9:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-29  9:33 [PATCH 1/4] ARM: Make thumb2 compilation only visible on CPUs that support it Sascha Hauer
2014-01-29  9:33 ` [PATCH 2/4] ARM: Pass armv7-a AFLAGS to cache-v7 Sascha Hauer
2014-01-29  9:33 ` [PATCH 3/4] ARM: Do not use BUG() in pbl code Sascha Hauer
2014-01-29  9:33 ` 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=1390988019-31405-4-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