diff options
Diffstat (limited to 'include/linux/remoteproc.h')
-rw-r--r-- | include/linux/remoteproc.h | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h index f1ffabb978d3..131b53957b9f 100644 --- a/include/linux/remoteproc.h +++ b/include/linux/remoteproc.h @@ -36,7 +36,6 @@ #define REMOTEPROC_H #include <linux/types.h> -#include <linux/kref.h> #include <linux/klist.h> #include <linux/mutex.h> #include <linux/virtio.h> @@ -369,8 +368,8 @@ enum rproc_state { * @firmware: name of firmware file to be loaded * @priv: private data which belongs to the platform-specific rproc module * @ops: platform-specific start/stop rproc handlers - * @dev: underlying device - * @refcount: refcount of users that have a valid pointer to this rproc + * @dev: virtual device for refcounting and common remoteproc behavior + * @fw_ops: firmware-specific handlers * @power: refcount of users who need this rproc powered up * @state: state of the device * @lock: lock which protects concurrent manipulations of the rproc @@ -383,6 +382,7 @@ enum rproc_state { * @bootaddr: address of first instruction to boot rproc with (optional) * @rvdevs: list of remote virtio devices * @notifyids: idr for dynamically assigning rproc-wide unique notify ids + * @index: index of this rproc device */ struct rproc { struct klist_node node; @@ -391,8 +391,8 @@ struct rproc { const char *firmware; void *priv; const struct rproc_ops *ops; - struct device *dev; - struct kref refcount; + struct device dev; + const struct rproc_fw_ops *fw_ops; atomic_t power; unsigned int state; struct mutex lock; @@ -405,6 +405,7 @@ struct rproc { u32 bootaddr; struct list_head rvdevs; struct idr notifyids; + int index; }; /* we currently support only two vrings per rvdev */ @@ -450,15 +451,12 @@ struct rproc_vdev { unsigned long gfeatures; }; -struct rproc *rproc_get_by_name(const char *name); -void rproc_put(struct rproc *rproc); - struct rproc *rproc_alloc(struct device *dev, const char *name, const struct rproc_ops *ops, const char *firmware, int len); -void rproc_free(struct rproc *rproc); -int rproc_register(struct rproc *rproc); -int rproc_unregister(struct rproc *rproc); +void rproc_put(struct rproc *rproc); +int rproc_add(struct rproc *rproc); +int rproc_del(struct rproc *rproc); int rproc_boot(struct rproc *rproc); void rproc_shutdown(struct rproc *rproc); |