From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 09/14] arm: move __mmu_cache_flush to bare_init section
Date: Fri, 23 Apr 2010 11:03:58 +0200 [thread overview]
Message-ID: <1272013443-29196-10-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1272013443-29196-1-git-send-email-s.hauer@pengutronix.de>
Instead of having seperate cache flush functions in the startup code
we want to call the generic functions. To accomplish this they have
to be in the bare_init section.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/cpu/cache-armv4.S | 2 ++
arch/arm/cpu/cache-armv5.S | 2 ++
arch/arm/cpu/cache-armv6.S | 3 +++
arch/arm/cpu/cache-armv7.S | 2 ++
4 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/arch/arm/cpu/cache-armv4.S b/arch/arm/cpu/cache-armv4.S
index a79cc27..3cec4dd 100644
--- a/arch/arm/cpu/cache-armv4.S
+++ b/arch/arm/cpu/cache-armv4.S
@@ -41,6 +41,7 @@ ENTRY(__mmu_cache_off)
mov pc, lr
ENDPROC(__mmu_cache_off)
+.section ".text_bare_init.text"
ENTRY(__mmu_cache_flush)
mrc p15, 0, r6, c0, c0 @ get processor ID
mov r2, #64*1024 @ default: 32K dcache size (*2)
@@ -73,6 +74,7 @@ no_cache_id:
mov pc, lr
ENDPROC(__mmu_cache_flush)
+.section ".text.text"
/*
* dma_inv_range(start, end)
*
diff --git a/arch/arm/cpu/cache-armv5.S b/arch/arm/cpu/cache-armv5.S
index f52bcb7..9fb320f 100644
--- a/arch/arm/cpu/cache-armv5.S
+++ b/arch/arm/cpu/cache-armv5.S
@@ -41,6 +41,7 @@ ENTRY(__mmu_cache_off)
mov pc, lr
ENDPROC(__mmu_cache_off)
+.section ".text_bare_init.text"
ENTRY(__mmu_cache_flush)
1: mrc p15, 0, r15, c7, c14, 3 @ test,clean,invalidate D cache
bne 1b
@@ -48,6 +49,7 @@ ENTRY(__mmu_cache_flush)
mcr p15, 0, r0, c7, c10, 4 @ drain WB
mov pc, lr
ENDPROC(__mmu_cache_flush)
+.section ".text.text"
/*
* dma_inv_range(start, end)
diff --git a/arch/arm/cpu/cache-armv6.S b/arch/arm/cpu/cache-armv6.S
index e3498bb..25476d5 100644
--- a/arch/arm/cpu/cache-armv6.S
+++ b/arch/arm/cpu/cache-armv6.S
@@ -31,6 +31,7 @@ __common_mmu_cache_on:
mrc p15, 0, r0, c1, c0, 0 @ and read it back to
sub pc, lr, r0, lsr #32 @ properly flush pipeline
+
ENTRY(__mmu_cache_off)
#ifdef CONFIG_MMU
mrc p15, 0, r0, c1, c0
@@ -42,6 +43,7 @@ ENTRY(__mmu_cache_off)
#endif
mov pc, lr
+.section ".text_bare_init.text"
ENTRY(__mmu_cache_flush)
mov r1, #0
mcr p15, 0, r1, c7, c14, 0 @ clean+invalidate D
@@ -50,6 +52,7 @@ ENTRY(__mmu_cache_flush)
mcr p15, 0, r1, c7, c10, 4 @ drain WB
mov pc, lr
ENDPROC(__mmu_cache_flush)
+.section ".text.text"
/*
* v6_dma_inv_range(start,end)
diff --git a/arch/arm/cpu/cache-armv7.S b/arch/arm/cpu/cache-armv7.S
index 9afa20d..a303dc1 100644
--- a/arch/arm/cpu/cache-armv7.S
+++ b/arch/arm/cpu/cache-armv7.S
@@ -49,6 +49,7 @@ ENTRY(__mmu_cache_off)
mov pc, r12
ENDPROC(__mmu_cache_on)
+.section ".text_bare_init.text"
ENTRY(__mmu_cache_flush)
mrc p15, 0, r10, c0, c1, 5 @ read ID_MMFR1
tst r10, #0xf << 16 @ hierarchical cache (ARMv7)
@@ -105,6 +106,7 @@ iflush:
mcr p15, 0, r10, c7, c5, 4 @ ISB
mov pc, lr
ENDPROC(__mmu_cache_flush)
+.section ".text.text"
/*
* cache_line_size - get the cache line size from the CSIDR register
--
1.7.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2010-04-23 9:04 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-23 9:03 some more patches for -next Sascha Hauer
2010-04-23 9:03 ` [PATCH 01/14] i.MX35 stack: Fix mc9sdz60 reset register offset Sascha Hauer
2010-04-23 9:03 ` [PATCH 02/14] ARM: use memalign in dma_alloc_coherent to assure alignment Sascha Hauer
2010-04-23 9:03 ` [PATCH 03/14] fsl_udc: make it work with MMU on Sascha Hauer
2010-04-23 9:03 ` [PATCH 04/14] Increase MAX_FILES to 128 Sascha Hauer
2010-04-23 9:03 ` [PATCH 05/14] fix _update scripts Sascha Hauer
2010-04-23 9:03 ` [PATCH 06/14] pcm043: Speed up NAND controller before copying barebox image Sascha Hauer
2010-04-23 9:03 ` [PATCH 07/14] add arm helper function to determine the program counter Sascha Hauer
2010-04-28 2:37 ` Jean-Christophe PLAGNIOL-VILLARD
2010-04-28 9:02 ` Sascha Hauer
2010-04-23 9:03 ` [PATCH 08/14] arm: remove unused variables from header file Sascha Hauer
2010-04-23 9:03 ` Sascha Hauer [this message]
2010-04-23 9:03 ` [PATCH 10/14] arm: reimplement startup code in C Sascha Hauer
2010-04-27 1:45 ` Shinya Kuribayashi
2010-04-28 2:32 ` Jean-Christophe PLAGNIOL-VILLARD
2010-04-28 10:04 ` Sascha Hauer
2010-04-23 9:04 ` [PATCH 11/14] i.MX: remove __REG from esd controller regs. use readl/writel instead Sascha Hauer
2010-04-23 9:04 ` [PATCH 12/14] pcm043: reimplement lowlevel code in C Sascha Hauer
2010-04-28 2:35 ` Jean-Christophe PLAGNIOL-VILLARD
2010-04-23 9:04 ` [PATCH 13/14] i.MX35: Fix ahbclock calculation Sascha Hauer
2010-04-23 9:04 ` [PATCH 14/14] pcm038: reimplement lowlevel code in C Sascha Hauer
2010-04-26 12:04 ` some more patches for -next Ivo Clarysse
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=1272013443-29196-10-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