aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Kamensky <victor.kamensky@linaro.org>2013-10-16 00:50:34 -0400
committerBen Dooks <ben.dooks@codethink.co.uk>2013-10-19 15:46:36 -0400
commitfdb07aee0b2b9d7d1893c97f5ce79ec355caaf1f (patch)
tree0f2e04f0717a87d81855da31f89d8d455d38c352
parenta1af3474487cc3b8731b990dceac6b6aad7f3ed8 (diff)
ARM: cci driver need big endian fixes in asm code
cci_enable_port_for_self written in asm and it works with h/w registers that are in little endian format. When run in big endian mode it needs byteswaped constants before/after it writes/reads to/from such registers Signed-off-by: Victor Kamensky <victor.kamensky@linaro.org> Acked-by: Nicolas Pitre <nico@linaro.org> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
-rw-r--r--drivers/bus/arm-cci.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/bus/arm-cci.c b/drivers/bus/arm-cci.c
index 200926699778..2e6c275322f1 100644
--- a/drivers/bus/arm-cci.c
+++ b/drivers/bus/arm-cci.c
@@ -280,7 +280,7 @@ asmlinkage void __naked cci_enable_port_for_self(void)
280 280
281 /* Enable the CCI port */ 281 /* Enable the CCI port */
282" ldr r0, [r0, %[offsetof_port_phys]] \n" 282" ldr r0, [r0, %[offsetof_port_phys]] \n"
283" mov r3, #"__stringify(CCI_ENABLE_REQ)" \n" 283" mov r3, %[cci_enable_req]\n"
284" str r3, [r0, #"__stringify(CCI_PORT_CTRL)"] \n" 284" str r3, [r0, #"__stringify(CCI_PORT_CTRL)"] \n"
285 285
286 /* poll the status reg for completion */ 286 /* poll the status reg for completion */
@@ -288,7 +288,7 @@ asmlinkage void __naked cci_enable_port_for_self(void)
288" ldr r0, [r1] \n" 288" ldr r0, [r1] \n"
289" ldr r0, [r0, r1] @ cci_ctrl_base \n" 289" ldr r0, [r0, r1] @ cci_ctrl_base \n"
290"4: ldr r1, [r0, #"__stringify(CCI_CTRL_STATUS)"] \n" 290"4: ldr r1, [r0, #"__stringify(CCI_CTRL_STATUS)"] \n"
291" tst r1, #1 \n" 291" tst r1, %[cci_control_status_bits] \n"
292" bne 4b \n" 292" bne 4b \n"
293 293
294" mov r0, #0 \n" 294" mov r0, #0 \n"
@@ -301,6 +301,8 @@ asmlinkage void __naked cci_enable_port_for_self(void)
301"7: .word cci_ctrl_phys - . \n" 301"7: .word cci_ctrl_phys - . \n"
302 : : 302 : :
303 [sizeof_cpu_port] "i" (sizeof(cpu_port)), 303 [sizeof_cpu_port] "i" (sizeof(cpu_port)),
304 [cci_enable_req] "i" cpu_to_le32(CCI_ENABLE_REQ),
305 [cci_control_status_bits] "i" cpu_to_le32(1),
304#ifndef __ARMEB__ 306#ifndef __ARMEB__
305 [offsetof_cpu_port_mpidr_lsb] "i" (offsetof(struct cpu_port, mpidr)), 307 [offsetof_cpu_port_mpidr_lsb] "i" (offsetof(struct cpu_port, mpidr)),
306#else 308#else