summaryrefslogtreecommitdiffstats
path: root/arch/arm/cpu/cache-armv6.S
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2012-07-09 09:05:37 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2012-07-23 23:57:44 +0200
commit7c3e50c83db91e2a8679c8e7fc3e77c091c20697 (patch)
tree43f4ae5cd1e1b0a0e246405fadf47f9f276b9ba6 /arch/arm/cpu/cache-armv6.S
parent244198ea8bdf592799ebfd430fe9ab165284e480 (diff)
downloadbarebox-7c3e50c83db91e2a8679c8e7fc3e77c091c20697.tar.gz
barebox-7c3e50c83db91e2a8679c8e7fc3e77c091c20697.tar.xz
ARM: Separate assembler functions into their own section
To let the linker remove unused functions. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/cpu/cache-armv6.S')
-rw-r--r--arch/arm/cpu/cache-armv6.S11
1 files changed, 9 insertions, 2 deletions
diff --git a/arch/arm/cpu/cache-armv6.S b/arch/arm/cpu/cache-armv6.S
index 335bac2a45..02b1d3e58a 100644
--- a/arch/arm/cpu/cache-armv6.S
+++ b/arch/arm/cpu/cache-armv6.S
@@ -5,6 +5,7 @@
#define CACHE_LINE_SIZE 32
#define D_CACHE_LINE_SIZE 32
+.section .text.__mmu_cache_on
ENTRY(__mmu_cache_on)
mov r12, lr
#ifdef CONFIG_MMU
@@ -33,6 +34,7 @@ __common_mmu_cache_on:
sub pc, lr, r0, lsr #32 @ properly flush pipeline
+.section .text.__mmu_cache_off
ENTRY(__mmu_cache_off)
#ifdef CONFIG_MMU
mrc p15, 0, r0, c1, c0
@@ -44,6 +46,7 @@ ENTRY(__mmu_cache_off)
#endif
mov pc, lr
+.section .text.__mmu_cache_flush
ENTRY(__mmu_cache_flush)
mov r1, #0
mcr p15, 0, r1, c7, c14, 0 @ clean+invalidate D
@@ -52,7 +55,6 @@ 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)
@@ -64,6 +66,7 @@ ENDPROC(__mmu_cache_flush)
* - start - virtual start address of region
* - end - virtual end address of region
*/
+.section .text.__dma_inv_range
ENTRY(__dma_inv_range)
tst r0, #D_CACHE_LINE_SIZE - 1
bic r0, r0, #D_CACHE_LINE_SIZE - 1
@@ -91,12 +94,14 @@ ENTRY(__dma_inv_range)
mov r0, #0
mcr p15, 0, r0, c7, c10, 4 @ drain write buffer
mov pc, lr
+ENDPROC(__dma_inv_range)
/*
* v6_dma_clean_range(start,end)
* - start - virtual start address of region
* - end - virtual end address of region
*/
+.section .text.__dma_clean_range
ENTRY(__dma_clean_range)
bic r0, r0, #D_CACHE_LINE_SIZE - 1
1:
@@ -111,12 +116,14 @@ ENTRY(__dma_clean_range)
mov r0, #0
mcr p15, 0, r0, c7, c10, 4 @ drain write buffer
mov pc, lr
+ENDPROC(__dma_clean_range)
/*
* v6_dma_flush_range(start,end)
* - start - virtual start address of region
* - end - virtual end address of region
*/
+.section .text.__dma_flush_range
ENTRY(__dma_flush_range)
bic r0, r0, #D_CACHE_LINE_SIZE - 1
1:
@@ -131,4 +138,4 @@ ENTRY(__dma_flush_range)
mov r0, #0
mcr p15, 0, r0, c7, c10, 4 @ drain write buffer
mov pc, lr
-
+ENDPROC(__dma_flush_range)