All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/3] remoteproc: add empty remoteproc API functions in header
@ 2016-11-22 17:02 Stanimir Varbanov
  0 siblings, 0 replies; only message in thread
From: Stanimir Varbanov @ 2016-11-22 17:02 UTC (permalink / raw)
  To: Ohad Ben-Cohen, Bjorn Andersson
  Cc: Andy Gross, linux-remoteproc, Stephen Boyd, linux-kernel,
	linux-arm-msm, Stanimir Varbanov

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(+)

diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h
index 930023b7c825..a727cb3c9e3d 100644
--- a/include/linux/remoteproc.h
+++ b/include/linux/remoteproc.h
@@ -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 */
-- 
2.7.4

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-11-22 17:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-22 17:02 [PATCH 2/3] remoteproc: add empty remoteproc API functions in header Stanimir Varbanov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.