Commit 493405a4 authored by Federico Vaga's avatar Federico Vaga

sw:drv: fix GN412x HW bug in FCL

Programming cards in parallel does not work quite well. At best the
GN412x chip reports errors on all plugged cards. In other cases it
freezes the PC.

With this patch I am going to serialize the FCL access. Like this
cards will be programmed one after the other.

I do not know the origin of the bug, but it must be in the GN412x chip.
Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent 8970d3aa
...@@ -29,6 +29,8 @@ static char *spec_fw_name_45t = "spec-golden-45T.bin"; ...@@ -29,6 +29,8 @@ static char *spec_fw_name_45t = "spec-golden-45T.bin";
static char *spec_fw_name_100t = "spec-golden-100T.bin"; static char *spec_fw_name_100t = "spec-golden-100T.bin";
static char *spec_fw_name_150t = "spec-golden-150T.bin"; static char *spec_fw_name_150t = "spec-golden-150T.bin";
static DEFINE_MUTEX(gn412x_fcl_lock);
char *spec_fw_name = ""; char *spec_fw_name = "";
module_param_named(fw_name, spec_fw_name, charp, 0444); module_param_named(fw_name, spec_fw_name, charp, 0444);
...@@ -577,7 +579,9 @@ static int spec_fw_load(struct spec_gn412x *spec_gn412x, const char *name) ...@@ -577,7 +579,9 @@ static int spec_fw_load(struct spec_gn412x *spec_gn412x, const char *name)
spec_bootsel_set(spec_gn412x, SPEC_FPGA_SELECT_GN4124_FPGA); spec_bootsel_set(spec_gn412x, SPEC_FPGA_SELECT_GN4124_FPGA);
mutex_lock(&gn412x_fcl_lock);
err = compat_spec_fw_load(spec_gn412x, name); err = compat_spec_fw_load(spec_gn412x, name);
mutex_unlock(&gn412x_fcl_lock);
if (err) if (err)
goto out; goto out;
......
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