@@ -486,6 +486,7 @@ struct rproc_vdev {
u32 rsc_offset;
};
+#if IS_ENABLED(CONFIG_REMOTEPROC)
struct rproc *rproc_get_by_phandle(phandle phandle);
struct rproc *rproc_alloc(struct device *dev, const char *name,
const struct rproc_ops *ops,
@@ -510,5 +511,28 @@ static inline struct rproc *vdev_to_rproc(struct virtio_device *vdev)
return rvdev->rproc;
}
+#else
+static inline struct rproc *
+rproc_get_by_phandle(phandle phandle) { return ERR_PTR(-ENODEV); }
+static inline struct rproc *rproc_alloc(struct device *dev, const char *name,
+ const struct rproc_ops *ops,
+ const char *firmware, int len)
+{ return ERR_PTR(-ENODEV); }
+static inline void rproc_put(struct rproc *rproc) {}
+static inline int rproc_add(struct rproc *rproc) { return -ENODEV; }
+static inline int rproc_del(struct rproc *rproc) { return -ENODEV; }
+static inline void rproc_free(struct rproc *rproc) {}
+
+static inline int rproc_boot(struct rproc *rproc) { return -ENODEV; }
+static inline void rproc_shutdown(struct rproc *rproc) {}
+static inline void
+rproc_report_crash(struct rproc *rproc, enum rproc_crash_type type) {}
+
+static inline struct rproc_vdev *vdev_to_rvdev(struct virtio_device *vdev)
+{ return NULL; }
+
+static inline struct rproc *vdev_to_rproc(struct virtio_device *vdev)
+{ return NULL; }
+#endif
#endif /* REMOTEPROC_H */
With this addition in place the drivers which uses remote processor APIs will be able to be compile tested on different architectures with COMPILE_TEST Kconfig option. Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org> --- include/linux/remoteproc.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+)