diff options
author | Subramaniam Chanderashekarapuram <subramaniam.ca@ti.com> | 2012-06-18 17:34:42 -0500 |
---|---|---|
committer | Andy Green <andy.green@linaro.org> | 2012-09-07 13:05:37 +0800 |
commit | 46773688add33caceda39062fc1cc358b4c93331 (patch) | |
tree | 2f3ab7f8bd59218b557c32a78177741a52484085 /drivers | |
parent | 6df8c18a506729978b162fab6a554b7d288c1572 (diff) |
rpmsg: resmgr: omap: use pm qos api for memory throughput
The rpmsg resmgr driver expects the bandwidth API (for memory
throughput requests) to be defined by the device platform data.
This is no longer required since the pm_qos API would be used
for requesting memory throughput.
The patch removes the mach specific calls for throughput and
invokes the pm_qos APIs from the omap rpmsg resmgr driver for
all resources that support/require memory throughput on the
L3 bus.
Change-Id: I02c4ee51bdca99c62b02d0f2b7b5559098c63089
Signed-off-by: Subramaniam Chanderashekarapuram <subramaniam.ca@ti.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/rpmsg/omap_rpmsg_resmgr.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/rpmsg/omap_rpmsg_resmgr.c b/drivers/rpmsg/omap_rpmsg_resmgr.c index 541380ddbd09..c856eeee73f7 100644 --- a/drivers/rpmsg/omap_rpmsg_resmgr.c +++ b/drivers/rpmsg/omap_rpmsg_resmgr.c @@ -56,6 +56,7 @@ struct rprm_regulator_depot { struct rprm_gen_device_handle { struct device *dev; struct dev_pm_qos_request req; + struct pm_qos_request bw_req; }; /* pointer to the constraint ops exported by omap mach module */ @@ -497,6 +498,9 @@ _enable_device_exclusive(void **handle, struct device **pdev, const char *name) if (ret < 0) goto err_handle_free; + pm_qos_add_request(&rprm_handle->bw_req, PM_QOS_MEMORY_THROUGHPUT, + PM_QOS_MEMORY_THROUGHPUT_DEFAULT_VALUE); + ret = pm_runtime_get_sync(dev); if (ret) { /* @@ -519,6 +523,7 @@ _enable_device_exclusive(void **handle, struct device **pdev, const char *name) return 0; err_qos_free: + pm_qos_remove_request(&rprm_handle->bw_req); dev_pm_qos_remove_request(&rprm_handle->req); err_handle_free: kfree(rprm_handle); @@ -531,6 +536,7 @@ static int _device_release(void *handle) struct device *dev = obj->dev; dev_pm_qos_remove_request(&obj->req); + pm_qos_remove_request(&obj->bw_req); kfree(obj); return pm_runtime_put_sync(dev); @@ -559,10 +565,9 @@ static int _device_bandwidth(struct device *rdev, void *handle, { struct rprm_gen_device_handle *obj = handle; - if (!mach_ops || !mach_ops->set_min_bus_tput) - return -ENOSYS; + pm_qos_update_request(&obj->bw_req, val); - return mach_ops->set_min_bus_tput(rdev, obj->dev, val); + return 0; } static int rprm_iva_request(void **handle, void *data, size_t len) |