diff options
author | Babu Moger <babu.moger@oracle.com> | 2017-09-08 19:14:25 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-09-08 21:26:48 -0400 |
commit | 206d3642d8eea06ba23ff1d60b1452f9f57d0fe5 (patch) | |
tree | 4430b4560603159d8f01d0cf7a2869520657a796 | |
parent | 4c97a0c8fee302fe64feed21e6f7ed25e3e651b8 (diff) |
arch/microblaze: add choice for endianness and update Makefile
microblaze architectures can be configured for either little or big endian
formats. Add a choice option for the user to select the correct endian
format(default to big endian).
Also update the Makefile so toolchain can compile for the format it is
configured for.
Link: http://lkml.kernel.org/r/1499358861-179979-3-git-send-email-babu.moger@oracle.com
Signed-off-by: Babu Moger <babu.moger@oracle.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Michal Simek <monstr@monstr.eu>
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: David S. Miller <davem@davemloft.net>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Greg KH <gregkh@linuxfoundation.org>
Cc: Helge Deller <deller@gmx.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Jonas Bonn <jonas@southpole.se>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stafford Horne <shorne@gmail.com>
Cc: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | arch/microblaze/Kconfig | 16 | ||||
-rw-r--r-- | arch/microblaze/Makefile | 2 |
2 files changed, 18 insertions, 0 deletions
diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig index 4ed8ebf33509..9d26abdf0dc1 100644 --- a/arch/microblaze/Kconfig +++ b/arch/microblaze/Kconfig | |||
@@ -36,6 +36,22 @@ config MICROBLAZE | |||
36 | select VIRT_TO_BUS | 36 | select VIRT_TO_BUS |
37 | select CPU_NO_EFFICIENT_FFS | 37 | select CPU_NO_EFFICIENT_FFS |
38 | 38 | ||
39 | # Endianness selection | ||
40 | choice | ||
41 | prompt "Endianness selection" | ||
42 | default CPU_BIG_ENDIAN | ||
43 | help | ||
44 | microblaze architectures can be configured for either little or | ||
45 | big endian formats. Be sure to select the appropriate mode. | ||
46 | |||
47 | config CPU_BIG_ENDIAN | ||
48 | bool "Big endian" | ||
49 | |||
50 | config CPU_LITTLE_ENDIAN | ||
51 | bool "Little endian" | ||
52 | |||
53 | endchoice | ||
54 | |||
39 | config SWAP | 55 | config SWAP |
40 | def_bool n | 56 | def_bool n |
41 | 57 | ||
diff --git a/arch/microblaze/Makefile b/arch/microblaze/Makefile index 740f2b82a182..1f6c486826a0 100644 --- a/arch/microblaze/Makefile +++ b/arch/microblaze/Makefile | |||
@@ -35,6 +35,8 @@ endif | |||
35 | CPUFLAGS-$(CONFIG_XILINX_MICROBLAZE0_USE_DIV) += -mno-xl-soft-div | 35 | CPUFLAGS-$(CONFIG_XILINX_MICROBLAZE0_USE_DIV) += -mno-xl-soft-div |
36 | CPUFLAGS-$(CONFIG_XILINX_MICROBLAZE0_USE_BARREL) += -mxl-barrel-shift | 36 | CPUFLAGS-$(CONFIG_XILINX_MICROBLAZE0_USE_BARREL) += -mxl-barrel-shift |
37 | CPUFLAGS-$(CONFIG_XILINX_MICROBLAZE0_USE_PCMP_INSTR) += -mxl-pattern-compare | 37 | CPUFLAGS-$(CONFIG_XILINX_MICROBLAZE0_USE_PCMP_INSTR) += -mxl-pattern-compare |
38 | CPUFLAGS-$(CONFIG_BIG_ENDIAN) += -mbig-endian | ||
39 | CPUFLAGS-$(CONFIG_LITTLE_ENDIAN) += -mlittle-endian | ||
38 | 40 | ||
39 | CPUFLAGS-1 += $(call cc-option,-mcpu=v$(CPU_VER)) | 41 | CPUFLAGS-1 += $(call cc-option,-mcpu=v$(CPU_VER)) |
40 | 42 | ||