Commit f3495a41 authored by Federico Vaga's avatar Federico Vaga

drv: add udev rule to program FPGA at boot

Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent 62d25bcd
# SPDX-FileCopyrightText: 2023 CERN (home.cern)
#
# SPDX-License-Identifier: LGPL-2.1-or-later
ACTION=="add", SUBSYSTEMS=="pci", SUBSYSTEM=="vme", DRIVERS=="vme_bridge", ENV{DEVTYPE}=="slot", GOTO="svec-fmc-carrier-start"
GOTO="svec-fmc-carrier-end"
LABEL="svec-fmc-carrier-start"
# Skip flashing if the card is not a SVEC
IMPORT{program}="/usr/local/bin/fechw udev module --slot VME.$number --type FMC-SVEC-A24"
ENV{MODULE_SLOT}=="", GOTO="svec-fmc-carrier-end"
IMPORT{program}="/usr/local/bin/fechw udev fpu --slot VME.$number --type FPGA --role Application"
ENV{MODULE_SLOT}!="", ENV{FPU_SLOT}!="", ENV{FPU_FW_NAME}!="", RUN+="/usr/local/bin/svec-flasher -f $env{FPU_SLOT} /lib/firmware/cern/$env{FPU_FW_NAME}"
ENV{MODULE_SLOT}!="", ENV{FPU_SLOT}!="", ENV{FPU_FW_NAME}!="", RUN+="/usr/local/bin/vme-scan --slot $number"
LABEL="svec-fmc-carrier-end"
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