summaryrefslogtreecommitdiff
path: root/drivers/rpmsg/omap_rpmsg_resmgr.c
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 /drivers/rpmsg/omap_rpmsg_resmgr.c
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 'drivers/rpmsg/omap_rpmsg_resmgr.c')
-rw-r--r--drivers/rpmsg/omap_rpmsg_resmgr.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/rpmsg/omap_rpmsg_resmgr.c b/drivers/rpmsg/omap_rpmsg_resmgr.c
index c856eeee73f7..a0e712430db4 100644
--- a/drivers/rpmsg/omap_rpmsg_resmgr.c
+++ b/drivers/rpmsg/omap_rpmsg_resmgr.c
@@ -570,6 +570,21 @@ static int _device_bandwidth(struct device *rdev, void *handle,
return 0;
}
+static unsigned long _get_max_freq(void *handle)
+{
+ struct rprm_gen_device_handle *obj = handle;
+ struct opp *opp;
+ unsigned long maxfreq = ULONG_MAX;
+
+ rcu_read_lock();
+ opp = opp_find_freq_floor(obj->dev, &maxfreq);
+ if (IS_ERR(opp))
+ maxfreq = 0;
+ rcu_read_unlock();
+
+ return maxfreq;
+}
+
static int rprm_iva_request(void **handle, void *data, size_t len)
{
static struct device *dev;
@@ -664,6 +679,7 @@ static struct rprm_res_ops iva_ops = {
.latency = _device_latency,
.bandwidth = _device_bandwidth,
.scale = _device_scale,
+ .get_max_freq = _get_max_freq,
};
static struct rprm_res_ops iva_seq0_ops = {
@@ -682,6 +698,7 @@ static struct rprm_res_ops fdif_ops = {
.latency = _device_latency,
.bandwidth = _device_bandwidth,
.scale = _device_scale,
+ .get_max_freq = _get_max_freq,
};
static struct rprm_res_ops sl2if_ops = {
@@ -694,6 +711,7 @@ static struct rprm_res_ops iss_ops = {
.release = rprm_iss_release,
.latency = _device_latency,
.bandwidth = _device_bandwidth,
+ .get_max_freq = _get_max_freq,
};
static struct rprm_res omap_res[] = {