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
63beeae3
Commit
63beeae3
authored
Nov 12, 2020
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sw:drv: add module parameter to ignore the FPGA configuration version
Signed-off-by:
Federico Vaga
<
federico.vaga@cern.ch
>
parent
f6f34d31
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletion
+12
-1
sw-driver.rst
doc/sw-driver.rst
+6
-0
spec-core-fpga.c
software/kernel/spec-core-fpga.c
+6
-1
No files found.
doc/sw-driver.rst
View file @
63beeae3
...
...
@@ -241,6 +241,12 @@ attributes. Here we focus only on those.
Module Parameters
-----------------
``version_ignore`` [R]
When set to 1 (enable) at ``insmod(2)`` time, it forces the driver
to ignore the version declared in the FPGA bitstream. Particularly
usefull during development or debugging across major or minor
version. By default it is set to 0 (disable).
``user_dma_coherent_size`` [RW]
It sets the maximum size for a coherent DMA memory allocation. A
change to this value is applied on ``open(2)``
...
...
software/kernel/spec-core-fpga.c
View file @
63beeae3
...
...
@@ -26,6 +26,10 @@
#include "spec.h"
#include "spec-compat.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)"
);
static
int
user_dma_coherent_size
=
4
*
1024
*
1024
;
module_param
(
user_dma_coherent_size
,
int
,
0644
);
MODULE_PARM_DESC
(
user_dma_coherent_size
,
...
...
@@ -1165,7 +1169,8 @@ static bool spec_fpga_is_valid(struct spec_gn412x *spec_gn412x,
return
false
;
}
if
((
meta
->
version
&
SPEC_META_VERSION_MASK
)
!=
SPEC_META_VERSION_COMPAT
)
{
if
(
!
version_ignore
&&
(
meta
->
version
&
SPEC_META_VERSION_MASK
)
!=
SPEC_META_VERSION_COMPAT
)
{
dev_err
(
&
spec_gn412x
->
pdev
->
dev
,
"Unknow version: %08x, expected: %08x
\n
"
,
meta
->
version
,
SPEC_META_VERSION_COMPAT
);
...
...
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