From b8ccadd56a59912e329bcf11f06e79be10a96e95 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Wed, 19 Apr 2017 13:27:37 +0200 Subject: nios2: Add Nios2 R2 Add support for Nios2 R2 , which is a new revision of Nios2 . Note that Nios2 R2 is always little endian. Also note that Nios2 R2 is NOT binary compatible with Nios2 R1 due to the instruction opcode reencoding. Signed-off-by: Marek Vasut Signed-off-by: Khem Raj --- conf/machine/include/tune-nios2.inc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/conf/machine/include/tune-nios2.inc b/conf/machine/include/tune-nios2.inc index a526463..754fe64 100644 --- a/conf/machine/include/tune-nios2.inc +++ b/conf/machine/include/tune-nios2.inc @@ -6,8 +6,14 @@ DEFAULTTUNE ?= "nios2" TUNE_ARCH = "nios2" TUNE_PKGARCH = "${DEFAULTTUNE}" +# Nios2 R2 +TUNEVALID[r2] = "Nios2 R2 support" +TUNECONFLICTS[r2] = "bigendian" +TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "r2", " -march=r2", " -march=r1", d)}" + # Endianess TUNEVALID[bigendian] = "Enable big-endian mode" +TUNECONFLICTS[bigendian] = "r2" TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "bigendian", " -meb", " -mel", d)}" # Multiply opcodes @@ -43,7 +49,7 @@ TUNECONFLICTS[fpu-custom] = "fpu-soft fpu-customdiv" TUNECONFLICTS[fpu-customdiv] = "fpu-soft fpu-custom" # Architecture configuration -AVAILTUNES += "nios2 nios2eb" +AVAILTUNES += "nios2 nios2eb nios2r2" TUNEVALID[nios2] = "Nios2 R1 Little-Endian" TUNE_FEATURES_tune-nios2 = "nios2" @@ -52,3 +58,7 @@ PACKAGE_EXTRA_ARCHS_tune-nios2 = "${TUNE_PKGARCH}" TUNEVALID[nios2eb] = "Nios2 R1 Big-Endian" TUNE_FEATURES_tune-nios2eb = "bigendian" PACKAGE_EXTRA_ARCHS_tune-nios2eb = "${TUNE_PKGARCH}" + +TUNEVALID[nios2r2] = "Nios2 R2" +TUNE_FEATURES_tune-nios2r2 = "r2" +PACKAGE_EXTRA_ARCHS_tune-nios2r2 = "${TUNE_PKGARCH}" -- cgit v1.2.3-54-g00ecf