Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Simple VME FMC Carrier SVEC
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
14
Issues
14
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 VME FMC Carrier SVEC
Commits
23f81be6
Commit
23f81be6
authored
Feb 08, 2021
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sw: get version compatibility from git
Signed-off-by:
Federico Vaga
<
federico.vaga@cern.ch
>
parent
aa1ec6f4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
4 deletions
+14
-4
svec.h
software/include/uapi/linux/svec.h
+0
-1
Kbuild
software/kernel/Kbuild
+4
-1
svec-core-fpga.c
software/kernel/svec-core-fpga.c
+10
-2
No files found.
software/include/uapi/linux/svec.h
View file @
23f81be6
...
...
@@ -21,7 +21,6 @@
#define SVEC_META_BOM_END_MASK 0xFFFF0000
#define SVEC_META_BOM_VER_MASK 0x0000FFFF
#define SVEC_META_VERSION_MASK 0xFFFF0000
#define SVEC_META_VERSION_1_4 0x01040000
#ifndef BIT
#define BIT(_b) (1 << _b)
...
...
software/kernel/Kbuild
View file @
23f81be6
...
...
@@ -8,9 +8,12 @@ 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)
SVEC_META_VERSION_COMPAT := $(shell printf "0x%02x%02x0000" $(VER_MAJ) $(VER_MIN))
ccflags-y += -DADDITIONAL_VERSIONS="$(SUBMODULE_VERSIONS)"
ccflags-y += -DVERSION=\"$(VERSION)\"
ccflags-y += -DSVEC_META_VERSION_COMPAT=$(SVEC_META_VERSION_COMPAT)
ccflags-y += -Wall -Werror
ccflags-y += -I$(VMEBRIDGE_ABS)/include
...
...
software/kernel/svec-core-fpga.c
View file @
23f81be6
...
...
@@ -18,6 +18,11 @@
#include "svec.h"
#include "svec-core-fpga.h"
static
int
version_ignore
=
0
;
module_param
(
version_ignore
,
int
,
0644
);
MODULE_PARM_DESC
(
version_ignore
,
"Ignore the version declared in the FPGA and force the driver to load all components (default 0)"
);
enum
svec_fpga_irq_lines
{
SVEC_FPGA_IRQ_FMC_I2C
=
0
,
SVEC_FPGA_IRQ_SPI
,
...
...
@@ -830,12 +835,15 @@ static bool svec_fpga_is_valid(struct svec_dev *svec_dev,
return
false
;
}
if
((
meta
->
version
&
SVEC_META_VERSION_MASK
)
!=
SVEC_META_VERSION_1_4
)
{
if
(
!
version_ignore
&&
(
meta
->
version
&
SVEC_META_VERSION_MASK
)
!=
SVEC_META_VERSION_COMPAT
)
{
dev_err
(
&
svec_dev
->
dev
,
"Unknow version: %08x
\n
"
,
meta
->
version
);
"Unknow version: %08x, expected: %08x
\n
"
,
meta
->
version
,
SVEC_META_VERSION_COMPAT
);
return
false
;
}
return
true
;
}
...
...
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