summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJuan Gutierrez <jgutierrez@ti.com>2012-07-19 17:48:36 -0500
committerAndy Green <andy.green@linaro.org>2012-09-07 13:05:38 +0800
commitf37713fa4dfed356689ef21124d823591db2b4a0 (patch)
treea232cf4b5c5acbfb1e9a901855c95284e05848f6 /include
parent46773688add33caceda39062fc1cc358b4c93331 (diff)
rpmsg: resmgr: support resource-data request from rproc
Support data request from remote processor. Currently only maximum frequency query is available for ivahd, iss and fdif. Change-Id: I9bc19f2a299e5756648b0e38aae25e7ce4ac6b02 Signed-off-by: Juan Gutierrez <jgutierrez@ti.com> Signed-off-by: Paul Hunt <hunt@ti.com> Signed-off-by: Fernando Guzman Lugo <fernando.lugo@ti.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/rpmsg_resmgr.h36
1 files changed, 30 insertions, 6 deletions
diff --git a/include/linux/rpmsg_resmgr.h b/include/linux/rpmsg_resmgr.h
index f0f54db9ec9b..4374671c0869 100644
--- a/include/linux/rpmsg_resmgr.h
+++ b/include/linux/rpmsg_resmgr.h
@@ -50,6 +50,7 @@ enum rprm_action {
RPRM_RELEASE = 3,
RPRM_SET_CONSTRAINTS = 4,
RPRM_CLEAR_CONSTRAINTS = 5,
+ RPRM_REQ_DATA = 6,
};
/*
@@ -65,14 +66,24 @@ enum rprm_constraint_type {
RPRM_BANDWIDTH = 0x4,
};
+/*
+ * enum rprm_request_data_type - RPMSG request data types
+ * @RPRM_MAX_FREQ: request maximum frequency
+ *
+ */
+enum rprm_request_data_type {
+ RPRM_MAX_FREQ = 0,
+};
+
/**
* struct rprm_res_ops - resource-specific device operations
- * @start: request a resource
- * @stop: release a resource
- * @get_info: get properties of the resource into a buffer
- * @scale: set a scale constraint
- * @latency: set a latency constraint
- * @bandwidth: set a bandwidth constraint
+ * @start: request a resource
+ * @stop: release a resource
+ * @get_info: get properties of the resource into a buffer
+ * @scale: set a scale constraint
+ * @latency: set a latency constraint
+ * @bandwidth: set a bandwidth constraint
+ * @get_max_freq: get the maximum frequency of the resuource
*/
struct rprm_res_ops {
int (*request)(void **handle, void *args, size_t len);
@@ -81,6 +92,7 @@ struct rprm_res_ops {
int (*scale)(struct device *rdev, void *handle, unsigned long val);
int (*latency)(struct device *rdev, void *handle, unsigned long val);
int (*bandwidth)(struct device *rdev, void *handle, unsigned long val);
+ unsigned long (*get_max_freq)(void *handle);
};
/**
@@ -140,6 +152,18 @@ struct rprm_constraint {
} __packed;
/**
+ * struct rprm_constraint - header of a constraint action
+ * @res_id: id of the resource
+ * @type: type of requested data
+ * @data: pointer to get the requested data
+ */
+struct rprm_request_data {
+ u32 res_id;
+ u32 type;
+ char data[];
+} __packed;
+
+/**
* struct rprm_msg - header for all the actions
* @action: action requested
* @data: addition information depending on @action