Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2deb41b2 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'rproc-v4.16' of git://github.com/andersson/remoteproc

Pull remoteproc updates from Bjorn Andersson:
 "This contains a few bug fixes and a cleanup up of the resource-table
  handling in the framework, which removes the need for drivers with no
  resource table to provide a fake one"

* tag 'rproc-v4.16' of git://github.com/andersson/remoteproc:
  remoteproc: Reset table_ptr on stop
  remoteproc: Drop dangling find_rsc_table dummies
  remoteproc: Move resource table load logic to find
  remoteproc: Don't handle empty resource table
  remoteproc: Merge rproc_ops and rproc_fw_ops
  remoteproc: Clone rproc_ops in rproc_alloc()
  remoteproc: Cache resource table size
  remoteproc: Remove depricated crash completion
  virtio_remoteproc: correct put_device virtio_device.dev
parents 67fb3b92 0a8b81cb
Loading
Loading
Loading
Loading
+1 −7
Original line number Diff line number Diff line
@@ -85,11 +85,6 @@ static int adsp_load(struct rproc *rproc, const struct firmware *fw)
			     adsp->mem_region, adsp->mem_phys, adsp->mem_size);
}

static const struct rproc_fw_ops adsp_fw_ops = {
	.find_rsc_table = qcom_mdt_find_rsc_table,
	.load = adsp_load,
};

static int adsp_start(struct rproc *rproc)
{
	struct qcom_adsp *adsp = (struct qcom_adsp *)rproc->priv;
@@ -182,6 +177,7 @@ static const struct rproc_ops adsp_ops = {
	.start = adsp_start,
	.stop = adsp_stop,
	.da_to_va = adsp_da_to_va,
	.load = adsp_load,
};

static irqreturn_t adsp_wdog_interrupt(int irq, void *dev)
@@ -344,8 +340,6 @@ static int adsp_probe(struct platform_device *pdev)
		return -ENOMEM;
	}

	rproc->fw_ops = &adsp_fw_ops;

	adsp = (struct qcom_adsp *)rproc->priv;
	adsp->dev = &pdev->dev;
	adsp->rproc = rproc;
+0 −19
Original line number Diff line number Diff line
@@ -32,25 +32,6 @@

static BLOCKING_NOTIFIER_HEAD(ssr_notifiers);

/**
 * qcom_mdt_find_rsc_table() - provide dummy resource table for remoteproc
 * @rproc:	remoteproc handle
 * @fw:		firmware header
 * @tablesz:	outgoing size of the table
 *
 * Returns a dummy table.
 */
struct resource_table *qcom_mdt_find_rsc_table(struct rproc *rproc,
					       const struct firmware *fw,
					       int *tablesz)
{
	static struct resource_table table = { .ver = 1, };

	*tablesz = sizeof(table);
	return &table;
}
EXPORT_SYMBOL_GPL(qcom_mdt_find_rsc_table);

static int glink_subdev_probe(struct rproc_subdev *subdev)
{
	struct qcom_rproc_glink *glink = to_glink_subdev(subdev);
+0 −4
Original line number Diff line number Diff line
@@ -27,10 +27,6 @@ struct qcom_rproc_ssr {
	const char *name;
};

struct resource_table *qcom_mdt_find_rsc_table(struct rproc *rproc,
					       const struct firmware *fw,
					       int *tablesz);

void qcom_add_glink_subdev(struct rproc *rproc, struct qcom_rproc_glink *glink);
void qcom_remove_glink_subdev(struct rproc *rproc, struct qcom_rproc_glink *glink);

+1 −17
Original line number Diff line number Diff line
@@ -303,16 +303,6 @@ static void q6v5_clk_disable(struct device *dev,
		clk_disable_unprepare(clks[i]);
}

static struct resource_table *q6v5_find_rsc_table(struct rproc *rproc,
						  const struct firmware *fw,
						  int *tablesz)
{
	static struct resource_table table = { .ver = 1, };

	*tablesz = sizeof(table);
	return &table;
}

static int q6v5_xfer_mem_ownership(struct q6v5 *qproc, int *current_perm,
				   bool remote_owner, phys_addr_t addr,
				   size_t size)
@@ -342,11 +332,6 @@ static int q6v5_load(struct rproc *rproc, const struct firmware *fw)
	return 0;
}

static const struct rproc_fw_ops q6v5_fw_ops = {
	.find_rsc_table = q6v5_find_rsc_table,
	.load = q6v5_load,
};

static int q6v5_rmb_pbl_wait(struct q6v5 *qproc, int ms)
{
	unsigned long timeout;
@@ -931,6 +916,7 @@ static const struct rproc_ops q6v5_ops = {
	.start = q6v5_start,
	.stop = q6v5_stop,
	.da_to_va = q6v5_da_to_va,
	.load = q6v5_load,
};

static irqreturn_t q6v5_wdog_interrupt(int irq, void *dev)
@@ -1150,8 +1136,6 @@ static int q6v5_probe(struct platform_device *pdev)
		return -ENOMEM;
	}

	rproc->fw_ops = &q6v5_fw_ops;

	qproc = (struct q6v5 *)rproc->priv;
	qproc->dev = &pdev->dev;
	qproc->rproc = rproc;
+1 −7
Original line number Diff line number Diff line
@@ -156,11 +156,6 @@ static int wcnss_load(struct rproc *rproc, const struct firmware *fw)
			     wcnss->mem_region, wcnss->mem_phys, wcnss->mem_size);
}

static const struct rproc_fw_ops wcnss_fw_ops = {
	.find_rsc_table = qcom_mdt_find_rsc_table,
	.load = wcnss_load,
};

static void wcnss_indicate_nv_download(struct qcom_wcnss *wcnss)
{
	u32 val;
@@ -313,6 +308,7 @@ static const struct rproc_ops wcnss_ops = {
	.start = wcnss_start,
	.stop = wcnss_stop,
	.da_to_va = wcnss_da_to_va,
	.load = wcnss_load,
};

static irqreturn_t wcnss_wdog_interrupt(int irq, void *dev)
@@ -492,8 +488,6 @@ static int wcnss_probe(struct platform_device *pdev)
		return -ENOMEM;
	}

	rproc->fw_ops = &wcnss_fw_ops;

	wcnss = (struct qcom_wcnss *)rproc->priv;
	wcnss->dev = &pdev->dev;
	wcnss->rproc = rproc;
Loading