Commit 63beeae3 authored by Federico Vaga's avatar Federico Vaga

sw:drv: add module parameter to ignore the FPGA configuration version

Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent f6f34d31
......@@ -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)``
......
......@@ -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);
......
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