index 16ad66683ad0a719b4ff91ae195eda82ee9fb7e2..c1ce8ee4411f24b54825b49fe98d54154b68e08d 100644 (file)
/**
* 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)
* @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);
* @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;
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;
};
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)
{