summaryrefslogtreecommitdiff
path: root/drivers/remoteproc/remoteproc_internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/remoteproc/remoteproc_internal.h')
-rw-r--r--drivers/remoteproc/remoteproc_internal.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/remoteproc/remoteproc_internal.h b/drivers/remoteproc/remoteproc_internal.h
index bf1fb7bba1a3..d4dbb8d1d80c 100644
--- a/drivers/remoteproc/remoteproc_internal.h
+++ b/drivers/remoteproc/remoteproc_internal.h
@@ -39,6 +39,21 @@ struct rproc_vdev_data {
struct fw_rsc_vdev *rsc;
};
+static inline bool rproc_has_feature(struct rproc *rproc, unsigned int feature)
+{
+ return test_bit(feature, rproc->features);
+}
+
+static inline int rproc_set_feature(struct rproc *rproc, unsigned int feature)
+{
+ if (feature >= RPROC_MAX_FEATURES)
+ return -EINVAL;
+
+ set_bit(feature, rproc->features);
+
+ return 0;
+}
+
/* from remoteproc_core.c */
void rproc_release(struct kref *kref);
int rproc_of_parse_firmware(struct device *dev, int index,