aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mvebu
diff options
context:
space:
mode:
authorBen Dooks <ben.dooks@codethink.co.uk>2013-02-01 05:36:22 -0500
committerBen Dooks <ben.dooks@codethink.co.uk>2013-10-19 15:46:34 -0400
commitbca028e7c2537fea9f401c20dd7b2103358b5efe (patch)
tree40d369c9cef9376867cbba09330b1e7c8e8699c4 /arch/arm/mach-mvebu
parent50eec2fce45ed48575f1c0582b748e409da08511 (diff)
ARM: mvebu: support running big-endian
Add indication we can run these cores in BE mode, and ensure that the secondary CPU is set to big-endian mode in the initialisation code as the initial code runs little-endian. Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> Tested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Acked-by: Jason Cooper <jason@lakedaemon.net>
Diffstat (limited to 'arch/arm/mach-mvebu')
-rw-r--r--arch/arm/mach-mvebu/Kconfig1
-rw-r--r--arch/arm/mach-mvebu/coherency_ll.S3
-rw-r--r--arch/arm/mach-mvebu/headsmp.S4
3 files changed, 8 insertions, 0 deletions
diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig
index 9eb63d724602..5e269d7263ce 100644
--- a/arch/arm/mach-mvebu/Kconfig
+++ b/arch/arm/mach-mvebu/Kconfig
@@ -1,5 +1,6 @@
1config ARCH_MVEBU 1config ARCH_MVEBU
2 bool "Marvell SOCs with Device Tree support" if ARCH_MULTI_V7 2 bool "Marvell SOCs with Device Tree support" if ARCH_MULTI_V7
3 select ARCH_SUPPORTS_BIG_ENDIAN
3 select CLKSRC_MMIO 4 select CLKSRC_MMIO
4 select COMMON_CLK 5 select COMMON_CLK
5 select GENERIC_CLOCKEVENTS 6 select GENERIC_CLOCKEVENTS
diff --git a/arch/arm/mach-mvebu/coherency_ll.S b/arch/arm/mach-mvebu/coherency_ll.S
index 5476669ba905..ee7598fe75db 100644
--- a/arch/arm/mach-mvebu/coherency_ll.S
+++ b/arch/arm/mach-mvebu/coherency_ll.S
@@ -20,6 +20,8 @@
20#define ARMADA_XP_CFB_CTL_REG_OFFSET 0x0 20#define ARMADA_XP_CFB_CTL_REG_OFFSET 0x0
21#define ARMADA_XP_CFB_CFG_REG_OFFSET 0x4 21#define ARMADA_XP_CFB_CFG_REG_OFFSET 0x4
22 22
23#include <asm/assembler.h>
24
23 .text 25 .text
24/* 26/*
25 * r0: Coherency fabric base register address 27 * r0: Coherency fabric base register address
@@ -29,6 +31,7 @@ ENTRY(ll_set_cpu_coherent)
29 /* Create bit by cpu index */ 31 /* Create bit by cpu index */
30 mov r3, #(1 << 24) 32 mov r3, #(1 << 24)
31 lsl r1, r3, r1 33 lsl r1, r3, r1
34ARM_BE8(rev r1, r1)
32 35
33 /* Add CPU to SMP group - Atomic */ 36 /* Add CPU to SMP group - Atomic */
34 add r3, r0, #ARMADA_XP_CFB_CTL_REG_OFFSET 37 add r3, r0, #ARMADA_XP_CFB_CTL_REG_OFFSET
diff --git a/arch/arm/mach-mvebu/headsmp.S b/arch/arm/mach-mvebu/headsmp.S
index 8a1b0c96e9ec..3dd80df428f7 100644
--- a/arch/arm/mach-mvebu/headsmp.S
+++ b/arch/arm/mach-mvebu/headsmp.S
@@ -21,12 +21,16 @@
21#include <linux/linkage.h> 21#include <linux/linkage.h>
22#include <linux/init.h> 22#include <linux/init.h>
23 23
24#include <asm/assembler.h>
25
24/* 26/*
25 * Armada XP specific entry point for secondary CPUs. 27 * Armada XP specific entry point for secondary CPUs.
26 * We add the CPU to the coherency fabric and then jump to secondary 28 * We add the CPU to the coherency fabric and then jump to secondary
27 * startup 29 * startup
28 */ 30 */
29ENTRY(armada_xp_secondary_startup) 31ENTRY(armada_xp_secondary_startup)
32 ARM_BE8(setend be ) @ go BE8 if entered LE
33
30 /* Get coherency fabric base physical address */ 34 /* Get coherency fabric base physical address */
31 adr r0, 1f 35 adr r0, 1f
32 ldr r1, [r0] 36 ldr r1, [r0]