Commit 48a395b2 authored by Federico Vaga's avatar Federico Vaga

sw:drv: remove useless REPROGRAMMED bit

Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent aae86210
...@@ -970,7 +970,6 @@ int svec_fpga_exit(struct svec_dev *svec_dev) ...@@ -970,7 +970,6 @@ int svec_fpga_exit(struct svec_dev *svec_dev)
return 0; return 0;
/* this function must run before re-flashing */ /* this function must run before re-flashing */
BUG_ON(svec_dev->flags & SVEC_DEV_FLAGS_REPROGRAMMED);
svec_fpga_app_exit(svec_fpga); svec_fpga_app_exit(svec_fpga);
svec_fmc_exit(svec_fpga); svec_fmc_exit(svec_fpga);
svec_fpga_devices_exit(svec_fpga); svec_fpga_devices_exit(svec_fpga);
......
...@@ -95,10 +95,6 @@ static ssize_t svec_dbg_fw_write(struct file *file, ...@@ -95,10 +95,6 @@ static ssize_t svec_dbg_fw_write(struct file *file,
if (err) if (err)
return -EFAULT; return -EFAULT;
spin_lock(&svec_dev->lock);
svec_dev->flags |= SVEC_DEV_FLAGS_REPROGRAMMED;
spin_unlock(&svec_dev->lock);
err = svec_fw_load(svec_dev, buf_l); err = svec_fw_load(svec_dev, buf_l);
if (err) if (err)
dev_err(&svec_dev->dev, dev_err(&svec_dev->dev,
...@@ -638,14 +634,6 @@ static int svec_remove(struct device *dev, unsigned int ndev) ...@@ -638,14 +634,6 @@ static int svec_remove(struct device *dev, unsigned int ndev)
fpga_mgr_unregister(svec->mgr); fpga_mgr_unregister(svec->mgr);
fpga_mgr_free(svec->mgr); fpga_mgr_free(svec->mgr);
svec_vme_exit(svec); svec_vme_exit(svec);
if ((svec->flags & SVEC_DEV_FLAGS_REPROGRAMMED) == 0) {
/*
* If FPGA is REPROGRAMMED then there is
* no device to disable
*/
vme_disable_device(to_vme_dev(svec->dev.parent));
}
device_unregister(&svec->dev); device_unregister(&svec->dev);
kfree(svec); kfree(svec);
......
...@@ -106,7 +106,6 @@ static inline struct svec_fpga *to_svec_fpga(struct device *_dev) ...@@ -106,7 +106,6 @@ static inline struct svec_fpga *to_svec_fpga(struct device *_dev)
} }
#define SVEC_DEV_FLAGS_REPROGRAMMED BIT(0)
/** /**
* struct svec_dev - SVEC instance * struct svec_dev - SVEC instance
* It describes a SVEC device instance. * It describes a SVEC device instance.
......
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