summaryrefslogtreecommitdiffstats
path: root/arch/nios2/Makefile
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2017-04-19 13:19:00 +0200
committerLey Foon Tan <ley.foon.tan@intel.com>2017-05-08 10:59:19 +0200
commita89988a6e00c5a099ee23619cd91dc8dc7ec9328 (patch)
treed9e64b92b35f2a147c59295f512964192cd2be41 /arch/nios2/Makefile
parentnios2: implement flush_dcache_mmap_lock/unlock (diff)
downloadlinux-a89988a6e00c5a099ee23619cd91dc8dc7ec9328.tar.xz
linux-a89988a6e00c5a099ee23619cd91dc8dc7ec9328.zip
nios2: Add NIOS2_ARCH_REVISION to select between R1 and R2
Allow user to select between Nios2 R1 and R2. Since R1 and R2 are not binary compatible, we cannot have a single kernel binary and there is no point in having DT property for discerning these two. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Ley Foon Tan <lftan@altera.com>
Diffstat (limited to 'arch/nios2/Makefile')
-rw-r--r--arch/nios2/Makefile3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/nios2/Makefile b/arch/nios2/Makefile
index e74afc12d516..38da17e4c908 100644
--- a/arch/nios2/Makefile
+++ b/arch/nios2/Makefile
@@ -22,7 +22,10 @@ export MMU
LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) $(KCFLAGS) -print-libgcc-file-name)
+KBUILD_AFLAGS += -march=r$(CONFIG_NIOS2_ARCH_REVISION)
+
KBUILD_CFLAGS += -pipe -D__linux__ -D__ELF__
+KBUILD_CFLAGS += -march=r$(CONFIG_NIOS2_ARCH_REVISION)
KBUILD_CFLAGS += $(if $(CONFIG_NIOS2_HW_MUL_SUPPORT),-mhw-mul,-mno-hw-mul)
KBUILD_CFLAGS += $(if $(CONFIG_NIOS2_HW_MULX_SUPPORT),-mhw-mulx,-mno-hw-mulx)
KBUILD_CFLAGS += $(if $(CONFIG_NIOS2_HW_DIV_SUPPORT),-mhw-div,-mno-hw-div)