Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Simple PCIe FMC carrier SPEC
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
50
Issues
50
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Simple PCIe FMC carrier SPEC
Commits
012a5839
Commit
012a5839
authored
Nov 09, 2020
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sw: extract the latest minimum compatible version
Signed-off-by:
Federico Vaga
<
federico.vaga@cern.ch
>
parent
26cb83f6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
3 deletions
+7
-3
spec.h
software/include/uapi/linux/spec.h
+0
-1
Kbuild
software/kernel/Kbuild
+4
-0
spec-core-fpga.c
software/kernel/spec-core-fpga.c
+3
-2
No files found.
software/include/uapi/linux/spec.h
View file @
012a5839
...
@@ -37,7 +37,6 @@
...
@@ -37,7 +37,6 @@
#define SPEC_META_BOM_END_MASK 0xFFFF0000
#define SPEC_META_BOM_END_MASK 0xFFFF0000
#define SPEC_META_BOM_VER_MASK 0x0000FFFF
#define SPEC_META_BOM_VER_MASK 0x0000FFFF
#define SPEC_META_VERSION_MASK 0xFFFF0000
#define SPEC_META_VERSION_MASK 0xFFFF0000
#define SPEC_META_VERSION_2_0 0x02010000
/**
/**
* struct spec_meta_id Metadata
* struct spec_meta_id Metadata
...
...
software/kernel/Kbuild
View file @
012a5839
...
@@ -7,8 +7,12 @@ endif
...
@@ -7,8 +7,12 @@ endif
endif
endif
# add versions of used submodules
# 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 += -DADDITIONAL_VERSIONS="$(SUBMODULE_VERSIONS)"
ccflags-y += -DVERSION=\"$(VERSION)\"
ccflags-y += -DVERSION=\"$(VERSION)\"
ccflags-y += -DSPEC_META_VERSION_COMPAT=$(SPEC_META_VERSION_COMPAT)
ccflags-y += -Wall -Werror
ccflags-y += -Wall -Werror
ccflags-y += -I$(FPGA_MGR_ABS)/include
ccflags-y += -I$(FPGA_MGR_ABS)/include
...
...
software/kernel/spec-core-fpga.c
View file @
012a5839
...
@@ -1165,9 +1165,10 @@ static bool spec_fpga_is_valid(struct spec_gn412x *spec_gn412x,
...
@@ -1165,9 +1165,10 @@ static bool spec_fpga_is_valid(struct spec_gn412x *spec_gn412x,
return
false
;
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
,
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
;
return
false
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment