aboutsummaryrefslogtreecommitdiffstats
path: root/roms/u-boot/board/xilinx/microblaze-generic/config.mk
diff options
context:
space:
mode:
Diffstat (limited to 'roms/u-boot/board/xilinx/microblaze-generic/config.mk')
-rw-r--r--roms/u-boot/board/xilinx/microblaze-generic/config.mk18
1 files changed, 18 insertions, 0 deletions
diff --git a/roms/u-boot/board/xilinx/microblaze-generic/config.mk b/roms/u-boot/board/xilinx/microblaze-generic/config.mk
new file mode 100644
index 000000000..a9539776d
--- /dev/null
+++ b/roms/u-boot/board/xilinx/microblaze-generic/config.mk
@@ -0,0 +1,18 @@
+# SPDX-License-Identifier: GPL-2.0+
+#
+# (C) Copyright 2007 - 2016 Michal Simek
+#
+# Michal SIMEK <monstr@monstr.eu>
+
+CPU_VER := $(shell echo $(CONFIG_XILINX_MICROBLAZE0_HW_VER))
+
+# USE_HW_MUL can be 0, 1, or 2, defining a hierarchy of HW Mul support.
+CPUFLAGS-$(subst 1,,$(CONFIG_XILINX_MICROBLAZE0_USE_HW_MUL)) += -mxl-multiply-high
+CPUFLAGS-$(CONFIG_XILINX_MICROBLAZE0_USE_HW_MUL) += -mno-xl-soft-mul
+CPUFLAGS-$(CONFIG_XILINX_MICROBLAZE0_USE_DIV) += -mno-xl-soft-div
+CPUFLAGS-$(CONFIG_XILINX_MICROBLAZE0_USE_BARREL) += -mxl-barrel-shift
+CPUFLAGS-$(CONFIG_XILINX_MICROBLAZE0_USE_PCMP_INSTR) += -mxl-pattern-compare
+
+CPUFLAGS-1 += $(call cc-option,-mcpu=v$(CPU_VER))
+
+PLATFORM_CPPFLAGS += $(CPUFLAGS-1) $(CPUFLAGS-2)