All of lore.kernel.org
 help / color / mirror / Atom feed
From: shawnguo@kernel.org (Shawn Guo)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 2/2] arm/mach-imx: enable big endian mode
Date: Tue, 2 Feb 2016 13:33:04 +0800	[thread overview]
Message-ID: <20160202053304.GA8307@tiger> (raw)
In-Reply-To: <1453913976-30619-3-git-send-email-johannes@sipsolutions.net>

On Wed, Jan 27, 2016 at 05:59:36PM +0100, Johannes Berg wrote:
> 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>

We conventionally use "ARM: imx: ..." as the subject for IMX platform
patches.

> ---
>  arch/arm/include/debug/imx.S | 3 +++
>  arch/arm/mach-imx/Kconfig    | 1 +
>  arch/arm/mach-imx/headsmp.S  | 2 ++
>  3 files changed, 6 insertions(+)
> 
> diff --git a/arch/arm/include/debug/imx.S b/arch/arm/include/debug/imx.S
> index 619d8cc1ac12..92c44760d656 100644
> --- a/arch/arm/include/debug/imx.S
> +++ b/arch/arm/include/debug/imx.S
> @@ -11,6 +11,7 @@
>   *
>   */
>  
> +#include <asm/assembler.h>
>  #include "imx-uart.h"
>  
>  /*
> @@ -34,6 +35,7 @@
>  		.endm
>  
>  		.macro	senduart,rd,rx
> +		ARM_BE8(rev \rd, \rd)
>  		str	\rd, [\rx, #0x40]	@ TXDATA
>  		.endm
>  
> @@ -42,6 +44,7 @@
>  
>  		.macro	busyuart,rd,rx
>  1002:		ldr	\rd, [\rx, #0x98]	@ SR2
> +		ARM_BE8(rev \rd, \rd)
>  		tst	\rd, #1 << 3		@ TXDC
>  		beq	1002b			@ wait until transmit done
>  		.endm
> diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
> index 15df34fbdf44..607e0fedbf1c 100644
> --- a/arch/arm/mach-imx/Kconfig
> +++ b/arch/arm/mach-imx/Kconfig
> @@ -9,6 +9,7 @@ menuconfig ARCH_MXC
>  	select PM_OPP if PM
>  	select SOC_BUS
>  	select SRAM
> +	select ARCH_SUPPORTS_BIG_ENDIAN

It should be added in alphabetical order.

I fixed these two minor things and applied both patches.

Shawn

>  	help
>  	  Support for Freescale MXC/iMX-based family of processors
>  
> diff --git a/arch/arm/mach-imx/headsmp.S b/arch/arm/mach-imx/headsmp.S
> index b5e976816b63..6c28d28b3c64 100644
> --- a/arch/arm/mach-imx/headsmp.S
> +++ b/arch/arm/mach-imx/headsmp.S
> @@ -12,6 +12,7 @@
>  
>  #include <linux/linkage.h>
>  #include <linux/init.h>
> +#include <asm/assembler.h>
>  
>  diag_reg_offset:
>  	.word	g_diag_reg - .
> @@ -25,6 +26,7 @@ diag_reg_offset:
>  	.endm
>  
>  ENTRY(v7_secondary_startup)
> +ARM_BE8(setend be)			@ go BE8 if entered LE
>  	set_diag_reg
>  	b	secondary_startup
>  ENDPROC(v7_secondary_startup)
> -- 
> 2.6.2
> 
> 

  reply	other threads:[~2016-02-02  5:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-27 16:59 [PATCH v2 0/2] arm/mach-imx: add big-endian support Johannes Berg
2016-01-27 16:59 ` [PATCH v2 1/2] arm/mach-imx: use endian-safe readl/readw/writel/writew Johannes Berg
2016-01-27 16:59 ` [PATCH v2 2/2] arm/mach-imx: enable big endian mode Johannes Berg
2016-02-02  5:33   ` Shawn Guo [this message]
2016-02-02  8:16     ` Johannes Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160202053304.GA8307@tiger \
    --to=shawnguo@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.