Commit 7afd1ca9 authored by Federico Vaga's avatar Federico Vaga

Merge branch 'release/v1.5.1' into master

parents 3171ceaa e01743d3
......@@ -14,3 +14,5 @@ Module.symvers
GPATH
GRTAGS
GTAGS
.clangd
compile_commands.json
\ No newline at end of file
......@@ -2,6 +2,14 @@
Change Log
==========
1.5.1 - 2020-11-24
==================
Fixed
-----
- sw: NULL pointer at load time when using the SPI controller
- sw: remove old unload procedure that causes BUG_ON to be triggered
without valid reasons
1.5.0 - 2020-11-02
===================
Added
......
......@@ -318,17 +318,15 @@ static struct resource svec_fpga_spi_res[] = {
};
static struct mtd_partition svec_flash_parts[] = {
[0] = {
{
.name = "SFPGA",
.offset = 0,
.size = SZ_1M,
},
[1] = {
}, {
.name = "AFPGA",
.offset = 0x100000,
.size = 5 * SZ_1M,
},
[2] = {
}, {
.name = "AFPGA_DATA",
.offset = MTDPART_OFS_APPEND,
.size = MTDPART_SIZ_FULL,
......@@ -385,11 +383,11 @@ static inline size_t __fpga_mfd_devs_size(void)
static int svec_fpga_devices_init(struct svec_fpga *svec_fpga)
{
struct vme_dev *vdev = to_vme_dev(svec_fpga->dev.parent->parent);
struct svec_dev *svec_dev = dev_get_drvdata(&vdev->dev);
struct mfd_cell *fpga_mfd_devs;
struct irq_domain *vic_domain;
unsigned int n_mfd = 0;
int err;
struct svec_dev *svec_dev = dev_get_drvdata(svec_fpga->dev.parent);
fpga_mfd_devs = devm_kzalloc(&svec_fpga->dev,
__fpga_mfd_devs_size(),
......@@ -972,7 +970,6 @@ int svec_fpga_exit(struct svec_dev *svec_dev)
return 0;
/* this function must run before re-flashing */
BUG_ON(svec_dev->flags & SVEC_DEV_FLAGS_REPROGRAMMED);
svec_fpga_app_exit(svec_fpga);
svec_fmc_exit(svec_fpga);
svec_fpga_devices_exit(svec_fpga);
......
......@@ -95,10 +95,6 @@ static ssize_t svec_dbg_fw_write(struct file *file,
if (err)
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);
if (err)
dev_err(&svec_dev->dev,
......@@ -638,14 +634,6 @@ static int svec_remove(struct device *dev, unsigned int ndev)
fpga_mgr_unregister(svec->mgr);
fpga_mgr_free(svec->mgr);
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);
kfree(svec);
......
......@@ -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
* 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