These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / include / linux / remoteproc.h
index 78b8a9b..9c4e138 100644 (file)
 #define REMOTEPROC_H
 
 #include <linux/types.h>
-#include <linux/klist.h>
 #include <linux/mutex.h>
 #include <linux/virtio.h>
 #include <linux/completion.h>
 #include <linux/idr.h>
+#include <linux/of.h>
 
 /**
  * struct resource_table - firmware resource table header
@@ -330,11 +330,13 @@ struct rproc;
  * @start:     power on the device and boot it
  * @stop:      power off the device
  * @kick:      kick a virtqueue (virtqueue id given as a parameter)
+ * @da_to_va:  optional platform hook to perform address translations
  */
 struct rproc_ops {
        int (*start)(struct rproc *rproc);
        int (*stop)(struct rproc *rproc);
        void (*kick)(struct rproc *rproc, int vqid);
+       void * (*da_to_va)(struct rproc *rproc, u64 da, int len);
 };
 
 /**
@@ -375,7 +377,7 @@ enum rproc_crash_type {
 
 /**
  * struct rproc - represents a physical remote processor device
- * @node: klist node of this rproc object
+ * @node: list node of this rproc object
  * @domain: iommu domain
  * @name: human readable name of the rproc
  * @firmware: name of firmware file to be loaded
@@ -407,7 +409,7 @@ enum rproc_crash_type {
  * @has_iommu: flag to indicate if remote processor is behind an MMU
  */
 struct rproc {
-       struct klist_node node;
+       struct list_head node;
        struct iommu_domain *domain;
        const char *name;
        const char *firmware;
@@ -481,6 +483,7 @@ struct rproc_vdev {
        u32 rsc_offset;
 };
 
+struct rproc *rproc_get_by_phandle(phandle phandle);
 struct rproc *rproc_alloc(struct device *dev, const char *name,
                                const struct rproc_ops *ops,
                                const char *firmware, int len);