aboutsummaryrefslogtreecommitdiff
path: root/arch/mips/loongson64/Platform
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/loongson64/Platform')
-rw-r--r--arch/mips/loongson64/Platform23
1 files changed, 23 insertions, 0 deletions
diff --git a/arch/mips/loongson64/Platform b/arch/mips/loongson64/Platform
new file mode 100644
index 000000000..473404cae
--- /dev/null
+++ b/arch/mips/loongson64/Platform
@@ -0,0 +1,23 @@
+#
+# Loongson Processors' Support
+#
+
+
+cflags-$(CONFIG_CPU_LOONGSON64) += -Wa,--trap
+
+ifdef CONFIG_CPU_LOONGSON64
+cflags-$(CONFIG_CC_IS_GCC) += -march=loongson3a
+cflags-$(CONFIG_CC_IS_CLANG) += -march=mips64r2
+endif
+
+# Some -march= flags enable MMI instructions, and GCC complains about that
+# support being enabled alongside -msoft-float. Thus explicitly disable MMI.
+cflags-y += $(call cc-option,-mno-loongson-mmi)
+
+#
+# Loongson Machines' Support
+#
+
+cflags-$(CONFIG_MACH_LOONGSON64) += -I$(srctree)/arch/mips/include/asm/mach-loongson64
+cflags-$(CONFIG_CC_HAS_MNO_BRANCH_LIKELY) += -mno-branch-likely
+load-$(CONFIG_CPU_LOONGSON64) += 0xffffffff80200000