summaryrefslogtreecommitdiff
path: root/include/linux/remoteproc.h
diff options
context:
space:
mode:
authorDave Gerlach <d-gerlach@ti.com>2015-05-22 23:45:27 +0300
committerOhad Ben-Cohen <ohad@wizery.com>2015-06-16 21:12:52 +0300
commitfec47d863587c272d6fbf4e50066209c953d5e60 (patch)
tree69d0df993b81d611cb3f878c66c8cb8a21ae8a1a /include/linux/remoteproc.h
parent172e6ab1caffcd2dd2910b44d88d096f2c6985fa (diff)
downloadlinux-fec47d863587c272d6fbf4e50066209c953d5e60.tar.xz
remoteproc: introduce rproc_get_by_phandle API
Allow users of remoteproc the ability to get a handle to an rproc by passing a phandle supplied in the user's device tree node. This is useful in situations that require manual booting of the rproc. This patch uses the code removed by commit 40e575b1d0b3 ("remoteproc: remove the get_by_name/put API") for the ref counting but is modified to use a simple list and locking mechanism and has rproc_get_by_name replaced with an rproc_get_by_phandle API. Signed-off-by: Dave Gerlach <d-gerlach@ti.com> Signed-off-by: Suman Anna <s-anna@ti.com> [fix order of Signed-off-by tags] Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Diffstat (limited to 'include/linux/remoteproc.h')
-rw-r--r--include/linux/remoteproc.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h
index 78b8a9b9d40a..56739e5df1e6 100644
--- a/include/linux/remoteproc.h
+++ b/include/linux/remoteproc.h
@@ -36,11 +36,11 @@
#define REMOTEPROC_H
#include <linux/types.h>
-#include <linux/klist.h>
#include <linux/mutex.h>
#include <linux/virtio.h>
#include <linux/completion.h>
#include <linux/idr.h>
+#include <linux/of.h>
/**
* struct resource_table - firmware resource table header
@@ -375,7 +375,7 @@ enum rproc_crash_type {
/**
* struct rproc - represents a physical remote processor device
- * @node: klist node of this rproc object
+ * @node: list node of this rproc object
* @domain: iommu domain
* @name: human readable name of the rproc
* @firmware: name of firmware file to be loaded
@@ -407,7 +407,7 @@ enum rproc_crash_type {
* @has_iommu: flag to indicate if remote processor is behind an MMU
*/
struct rproc {
- struct klist_node node;
+ struct list_head node;
struct iommu_domain *domain;
const char *name;
const char *firmware;
@@ -481,6 +481,7 @@ struct rproc_vdev {
u32 rsc_offset;
};
+struct rproc *rproc_get_by_phandle(phandle phandle);
struct rproc *rproc_alloc(struct device *dev, const char *name,
const struct rproc_ops *ops,
const char *firmware, int len);