aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorGregory CLEMENT <gregory.clement@free-electrons.com>2014-04-14 11:10:09 -0400
committerJason Cooper <jason@lakedaemon.net>2014-05-08 12:18:55 -0400
commit1a6bfbc339b6a2b59a8f88fa494fe70073cdb85a (patch)
tree62e7f746b8de242c8dd975e8e9a2bde728599a62 /arch/arm
parent2e8a5942f8751c03fdd50228a02909654d13f01d (diff)
ARM: mvebu: Low level function to disable HW coherency support
When going to deep idle we need to disable the SoC snooping (aka hardware coherency support). Playing with the coherency fabric requires to use assembly code to be sure that the compiler doesn't reorder the instructions nor do wrong optimization. Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com> Link: https://lkml.kernel.org/r/1397488214-20685-7-git-send-email-gregory.clement@free-electrons.com Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-mvebu/coherency_ll.S20
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/arm/mach-mvebu/coherency_ll.S b/arch/arm/mach-mvebu/coherency_ll.S
index f2e2e8677c4b..6828f9f157b0 100644
--- a/arch/arm/mach-mvebu/coherency_ll.S
+++ b/arch/arm/mach-mvebu/coherency_ll.S
@@ -102,6 +102,26 @@ ENTRY(ll_enable_coherency)
102 mov pc, lr 102 mov pc, lr
103ENDPROC(ll_enable_coherency) 103ENDPROC(ll_enable_coherency)
104 104
105ENTRY(ll_disable_coherency)
106 /*
107 * r0 being untouched in ll_get_coherency_base and
108 * ll_get_cpuid, we can use it to save lr modifing it with the
109 * following bl
110 */
111 mov r0, lr
112 bl ll_get_coherency_base
113 bl ll_get_cpuid
114 mov lr, r0
115 add r0, r1, #ARMADA_XP_CFB_CTL_REG_OFFSET
1161:
117 ldrex r2, [r0]
118 bic r2, r2, r3
119 strex r1, r2, [r0]
120 cmp r1, #0
121 bne 1b
122 dsb
123 mov pc, lr
124ENDPROC(ll_disable_coherency)
105 125
106 .align 2 126 .align 2
1073: 1273: