Commit bccad6f3 authored by Federico Vaga's avatar Federico Vaga

Merge branch 'release/v2.1.2' into master

parents a0f9a0b3 8abbfd3a
......@@ -6,6 +6,12 @@
Changelog
=========
2.1.2 - 2020-11-09
==================
Fixed
-----
- sw: automatize version validation
2.1.1 - 2020-11-09
==================
Fixed
......
......@@ -37,7 +37,6 @@
#define SPEC_META_BOM_END_MASK 0xFFFF0000
#define SPEC_META_BOM_VER_MASK 0x0000FFFF
#define SPEC_META_VERSION_MASK 0xFFFF0000
#define SPEC_META_VERSION_2_0 0x02000000
/**
* struct spec_meta_id Metadata
......
......@@ -7,8 +7,12 @@ endif
endif
# add versions of used submodules
VER_MAJ := $(shell echo $(subst v,,$(VERSION)) | cut -d '.' -f 1)
VER_MIN := $(shell echo $(subst v,,$(VERSION)) | cut -d '.' -f 2)
SPEC_META_VERSION_COMPAT := $(shell printf "0x%02x%02x0000" $(VER_MAJ) $(VER_MIN))
ccflags-y += -DADDITIONAL_VERSIONS="$(SUBMODULE_VERSIONS)"
ccflags-y += -DVERSION=\"$(VERSION)\"
ccflags-y += -DSPEC_META_VERSION_COMPAT=$(SPEC_META_VERSION_COMPAT)
ccflags-y += -Wall -Werror
ccflags-y += -I$(FPGA_MGR_ABS)/include
......
......@@ -1165,9 +1165,10 @@ static bool spec_fpga_is_valid(struct spec_gn412x *spec_gn412x,
return false;
}
if ((meta->version & SPEC_META_VERSION_MASK) != SPEC_META_VERSION_2_0) {
if ((meta->version & SPEC_META_VERSION_MASK) != SPEC_META_VERSION_COMPAT) {
dev_err(&spec_gn412x->pdev->dev,
"Unknow version: %08x\n", meta->version);
"Unknow version: %08x, expected: %08x\n",
meta->version, SPEC_META_VERSION_COMPAT);
return false;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment