]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - rpmsg/remoteproc.git/blobdiff - include/linux/remoteproc.h
remoteproc: add infrastructure support to allow pre-loaded remoteprocs
[rpmsg/remoteproc.git] / include / linux / remoteproc.h
index 16ad66683ad0a719b4ff91ae195eda82ee9fb7e2..c1ce8ee4411f24b54825b49fe98d54154b68e08d 100644 (file)
@@ -355,6 +355,8 @@ enum rsc_handling_status {
 
 /**
  * struct rproc_ops - platform-specific device handlers
+ * @prepare:   prepare device for code loading
+ * @unprepare: unprepare device after stop
  * @start:     power on the device and boot it
  * @stop:      power off the device
  * @kick:      kick a virtqueue (virtqueue id given as a parameter)
@@ -371,6 +373,8 @@ enum rsc_handling_status {
  * @get_boot_addr:     get boot address to entry point specified in firmware
  */
 struct rproc_ops {
+       int (*prepare)(struct rproc *rproc);
+       int (*unprepare)(struct rproc *rproc);
        int (*start)(struct rproc *rproc);
        int (*stop)(struct rproc *rproc);
        void (*kick)(struct rproc *rproc, int vqid);
@@ -479,13 +483,15 @@ struct rproc_dump_segment {
  * @table_sz: size of @cached_table
  * @has_iommu: flag to indicate if remote processor is behind an MMU
  * @auto_boot: flag to indicate if remote processor should be auto-started
+ * @skip_firmware_request: flag to skip requesting the firmware
+ * @skip_load: flag to skip the loading of firmware segments
  * @dump_segments: list of segments in the firmware
  * @nb_vdev: number of vdev currently handled by rproc
  */
 struct rproc {
        struct list_head node;
        struct iommu_domain *domain;
-       const char *name;
+       char *name;
        char *firmware;
        void *priv;
        struct rproc_ops *ops;
@@ -512,6 +518,8 @@ struct rproc {
        size_t table_sz;
        bool has_iommu;
        bool auto_boot;
+       unsigned int skip_firmware_request      : 1;
+       unsigned int skip_load                  : 1;
        struct list_head dump_segments;
        int nb_vdev;
 };
@@ -618,6 +626,8 @@ int rproc_coredump_add_custom_segment(struct rproc *rproc,
                                                     struct rproc_dump_segment *segment,
                                                     void *dest),
                                      void *priv);
+int rproc_get_id(struct rproc *rproc);
+int rproc_pa_to_da(struct rproc *rproc, phys_addr_t pa, u64 *da);
 
 static inline struct rproc_vdev *vdev_to_rvdev(struct virtio_device *vdev)
 {