summary refs log tree commit diff
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-02-23 09:38:10 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2017-02-23 09:38:10 -0800
commita3919caaa27a5fde1cbda46e394bb17953e104a1 (patch)
tree9b4e8ec6df45722380c4255ac019a260757ae1cb /include
parent15192b029509316af4977d2cd389c1eb11183d13 (diff)
parent01625cc5e65f420dbea57f7de6b9552a0f807a84 (diff)
downloadlinux-a3919caaa27a5fde1cbda46e394bb17953e104a1.tar.gz
Merge tag 'rproc-v4.11' of git://github.com/andersson/remoteproc
Pull remoteproc updates from Bjorn Andersson:
 "This introduces support for booting the dedicated sensor core in the
  Qualcomm MSM8996, updates the Qualcomm ADSP and Hexagon drivers to
  utilize SMD subdevice helpers for properly handle shutdowns and
  restarts of the remoteproc, add virtio support to the ST remoteproc
  and refactor the Qualcomm Hexagon driver to handle variations between
  platforms.

  The support code for parsing, loading and authenticating Qualcomm
  firmware files (MDT) is refactored and move to drivers/soc/qcom, to
  allow for non-remoteproc drivers to utilize this.

  Finally it brings some cleanups to the remoteproc core"

* tag 'rproc-v4.11' of git://github.com/andersson/remoteproc: (27 commits)
  remoteproc: qcom: mdt_loader: Use signed type for offset
  remoteproc: st: add virtio communication support
  remoteproc: st: correct probe error management
  remoteproc: Modify the function names
  remoteproc: Reduce asynchronous request_firmware to auto-boot only
  remoteproc: Drop qcom_scm_pas_supported() from adsp_probe()
  MAINTAINERS: Add missing rpmsg include path
  remoteproc: qcom: Use common SMD edge handler
  remoteproc: qcom: wcnss: Make SMD handling common
  remoteproc: Move qcom_mdt_loader into drivers/soc/qcom
  remoteproc: qcom: mdt_loader: Refactor MDT loader
  remoteproc: qcom: mdt_loader: Don't overwrite firmware object
  remoteproc: qcom: Extract non-mdt related helper
  remoteproc: qcom: q6v5: Decouple driver from MDT loader
  remoteproc: qcom: q6v5: Remove mss supply from 8916
  remoteproc: qcom: fix initializers for qcom_mss_reg_res array
  remoteproc: Drop firmware_loading_complete
  remoteproc: Add RPROC_DELETED state
  remoteproc: Move rproc_delete_debug_dir() to rproc_del()
  remoteproc: qcom: Add SLPI rproc support to load and boot slpi proc.
  ...
Diffstat (limited to 'include')
-rw-r--r--include/linux/remoteproc.h6
-rw-r--r--include/linux/soc/qcom/mdt_loader.h18
2 files changed, 21 insertions, 3 deletions
diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h
index 8265d351c9f0..81da49564ff4 100644
--- a/include/linux/remoteproc.h
+++ b/include/linux/remoteproc.h
@@ -346,6 +346,7 @@ struct rproc_ops {
  *			a message.
  * @RPROC_RUNNING:	device is up and running
  * @RPROC_CRASHED:	device has crashed; need to start recovery
+ * @RPROC_DELETED:	device is deleted
  * @RPROC_LAST:		just keep this one at the end
  *
  * Please note that the values of these states are used as indices
@@ -359,7 +360,8 @@ enum rproc_state {
 	RPROC_SUSPENDED	= 1,
 	RPROC_RUNNING	= 2,
 	RPROC_CRASHED	= 3,
-	RPROC_LAST	= 4,
+	RPROC_DELETED	= 4,
+	RPROC_LAST	= 5,
 };
 
 /**
@@ -397,7 +399,6 @@ enum rproc_crash_type {
  * @num_traces: number of trace buffers
  * @carveouts: list of physically contiguous memory allocations
  * @mappings: list of iommu mappings we initiated, needed on shutdown
- * @firmware_loading_complete: marks e/o asynchronous firmware loading
  * @bootaddr: address of first instruction to boot rproc with (optional)
  * @rvdevs: list of remote virtio devices
  * @subdevs: list of subdevices, to following the running state
@@ -429,7 +430,6 @@ struct rproc {
 	int num_traces;
 	struct list_head carveouts;
 	struct list_head mappings;
-	struct completion firmware_loading_complete;
 	u32 bootaddr;
 	struct list_head rvdevs;
 	struct list_head subdevs;
diff --git a/include/linux/soc/qcom/mdt_loader.h b/include/linux/soc/qcom/mdt_loader.h
new file mode 100644
index 000000000000..f423001db3a9
--- /dev/null
+++ b/include/linux/soc/qcom/mdt_loader.h
@@ -0,0 +1,18 @@
+#ifndef __QCOM_MDT_LOADER_H__
+#define __QCOM_MDT_LOADER_H__
+
+#include <linux/types.h>
+
+#define QCOM_MDT_TYPE_MASK	(7 << 24)
+#define QCOM_MDT_TYPE_HASH	(2 << 24)
+#define QCOM_MDT_RELOCATABLE	BIT(27)
+
+struct device;
+struct firmware;
+
+ssize_t qcom_mdt_get_size(const struct firmware *fw);
+int qcom_mdt_load(struct device *dev, const struct firmware *fw,
+		  const char *fw_name, int pas_id, void *mem_region,
+		  phys_addr_t mem_phys, size_t mem_size);
+
+#endif