From 736da552bc7e22e6233d20459c120b82738d080b Mon Sep 17 00:00:00 2001 From: Miguel Vadillo Date: Thu, 30 Jun 2011 18:51:21 -0500 Subject: omap4: remoteproc: specific constraints apis Omap4 specific implementation of constraints apis supporting: - Latency - Frequency - Bandwidth Change-Id: I7c001a54702156ed5e628867268279be3f2cc2ed Signed-off-by: Miguel Vadillo Signed-off-by: Fernando Guzman Lugo Signed-off-by: Suman Anna --- drivers/remoteproc/omap_remoteproc.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'drivers/remoteproc') diff --git a/drivers/remoteproc/omap_remoteproc.c b/drivers/remoteproc/omap_remoteproc.c index f47b447..9c2ea38 100644 --- a/drivers/remoteproc/omap_remoteproc.c +++ b/drivers/remoteproc/omap_remoteproc.c @@ -27,6 +27,9 @@ #include #include #include +#include +#include +#include "../../arch/arm/mach-omap2/dvfs.h" #define PM_SUSPEND_MBOX 0xffffff07 #define PM_SUSPEND_TIMEOUT 300 @@ -309,6 +312,22 @@ static inline int omap_rproc_stop(struct rproc *rproc) return omap_device_idle(pdev); } +static int omap_rproc_set_lat(struct rproc *rproc, long val) +{ + pm_qos_update_request(rproc->qos_request, val); + return 0; +} + +static int omap_rproc_set_l3_bw(struct rproc *rproc, long val) +{ + return omap_pm_set_min_bus_tput(rproc->dev, OCP_INITIATOR_AGENT, val); +} + +static int omap_rproc_scale(struct rproc *rproc, long val) +{ + return omap_device_scale(rproc->dev, rproc->dev, val); +} + static struct rproc_ops omap_rproc_ops = { .start = omap_rproc_start, .stop = omap_rproc_stop, @@ -317,6 +336,9 @@ static struct rproc_ops omap_rproc_ops = { #endif .iommu_init = omap_rproc_iommu_init, .iommu_exit = omap_rproc_iommu_exit, + .set_lat = omap_rproc_set_lat, + .set_bw = omap_rproc_set_l3_bw, + .scale = omap_rproc_scale, }; static int omap_rproc_probe(struct platform_device *pdev) -- cgit v1.1