ARM: imx: enable big endian mode
Enable ARM big-endian mode on mach-imx. This requires adding some byte swapping in the debug functions (which otherwise hang forever) and of course the secondary core bringup. Tested (on top of 4.4) on i.MX6 HummingBoard quad-core (IMX6Q). The patch is pretty much as suggested by Arnd Bergmann, thanks! Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
This commit is contained in:
parent
c553138fbd
commit
26e30c6489
|
@ -11,6 +11,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <asm/assembler.h>
|
||||||
#include "imx-uart.h"
|
#include "imx-uart.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -34,6 +35,7 @@
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro senduart,rd,rx
|
.macro senduart,rd,rx
|
||||||
|
ARM_BE8(rev \rd, \rd)
|
||||||
str \rd, [\rx, #0x40] @ TXDATA
|
str \rd, [\rx, #0x40] @ TXDATA
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
|
@ -42,6 +44,7 @@
|
||||||
|
|
||||||
.macro busyuart,rd,rx
|
.macro busyuart,rd,rx
|
||||||
1002: ldr \rd, [\rx, #0x98] @ SR2
|
1002: ldr \rd, [\rx, #0x98] @ SR2
|
||||||
|
ARM_BE8(rev \rd, \rd)
|
||||||
tst \rd, #1 << 3 @ TXDC
|
tst \rd, #1 << 3 @ TXDC
|
||||||
beq 1002b @ wait until transmit done
|
beq 1002b @ wait until transmit done
|
||||||
.endm
|
.endm
|
||||||
|
|
|
@ -2,6 +2,7 @@ menuconfig ARCH_MXC
|
||||||
bool "Freescale i.MX family"
|
bool "Freescale i.MX family"
|
||||||
depends on ARCH_MULTI_V4_V5 || ARCH_MULTI_V6_V7 || ARM_SINGLE_ARMV7M
|
depends on ARCH_MULTI_V4_V5 || ARCH_MULTI_V6_V7 || ARM_SINGLE_ARMV7M
|
||||||
select ARCH_REQUIRE_GPIOLIB
|
select ARCH_REQUIRE_GPIOLIB
|
||||||
|
select ARCH_SUPPORTS_BIG_ENDIAN
|
||||||
select ARM_CPU_SUSPEND if PM
|
select ARM_CPU_SUSPEND if PM
|
||||||
select CLKSRC_IMX_GPT
|
select CLKSRC_IMX_GPT
|
||||||
select GENERIC_IRQ_CHIP
|
select GENERIC_IRQ_CHIP
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
|
|
||||||
#include <linux/linkage.h>
|
#include <linux/linkage.h>
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
|
#include <asm/assembler.h>
|
||||||
|
|
||||||
diag_reg_offset:
|
diag_reg_offset:
|
||||||
.word g_diag_reg - .
|
.word g_diag_reg - .
|
||||||
|
@ -25,6 +26,7 @@ diag_reg_offset:
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
ENTRY(v7_secondary_startup)
|
ENTRY(v7_secondary_startup)
|
||||||
|
ARM_BE8(setend be) @ go BE8 if entered LE
|
||||||
set_diag_reg
|
set_diag_reg
|
||||||
b secondary_startup
|
b secondary_startup
|
||||||
ENDPROC(v7_secondary_startup)
|
ENDPROC(v7_secondary_startup)
|
||||||
|
|
Loading…
Reference in New Issue