summaryrefslogtreecommitdiff
path: root/board/xilinx
diff options
context:
space:
mode:
authorMichal Simek <michal.simek@xilinx.com>2016-05-24 13:23:59 +0200
committerMichal Simek <michal.simek@xilinx.com>2016-06-06 11:23:27 +0200
commit4ad1096e487f6bd03ec235263259aa97ef9cb2f1 (patch)
tree6179ed27e576040b6f26708b80ecbb7ff1474f03 /board/xilinx
parent91eeb80ee7cdc7833d752bdaa45ae2a1556c72cf (diff)
downloadu-boot-imx-4ad1096e487f6bd03ec235263259aa97ef9cb2f1.zip
u-boot-imx-4ad1096e487f6bd03ec235263259aa97ef9cb2f1.tar.gz
u-boot-imx-4ad1096e487f6bd03ec235263259aa97ef9cb2f1.tar.bz2
microblaze: Add option to pass cpu version number
Toolchain can use some flags by default based on cpu version. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'board/xilinx')
-rw-r--r--board/xilinx/microblaze-generic/Kconfig4
-rw-r--r--board/xilinx/microblaze-generic/config.mk4
2 files changed, 8 insertions, 0 deletions
diff --git a/board/xilinx/microblaze-generic/Kconfig b/board/xilinx/microblaze-generic/Kconfig
index 01c157e..c8b11ca 100644
--- a/board/xilinx/microblaze-generic/Kconfig
+++ b/board/xilinx/microblaze-generic/Kconfig
@@ -25,4 +25,8 @@ config XILINX_MICROBLAZE0_USE_HW_MUL
int "USE_HW_MUL values (0=NONE, 1=MUL32, 2=MUL64)"
default 0
+config XILINX_MICROBLAZE0_HW_VER
+ string "Core version number"
+ default 7.10.d
+
endif
diff --git a/board/xilinx/microblaze-generic/config.mk b/board/xilinx/microblaze-generic/config.mk
index 4b033f7..1dee2d6 100644
--- a/board/xilinx/microblaze-generic/config.mk
+++ b/board/xilinx/microblaze-generic/config.mk
@@ -6,6 +6,8 @@
# SPDX-License-Identifier: GPL-2.0+
#
+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
@@ -13,4 +15,6 @@ 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)