diff options
author | Miguel Vadillo <vadillo@ti.com> | 2011-06-30 18:40:19 -0500 |
---|---|---|
committer | Iliyan Malchev <malchev@google.com> | 2011-07-20 17:34:33 -0700 |
commit | dbf3f62c5761f298cce9991b30a60dd08f76656f (patch) | |
tree | e04b5ee1b359493eee0f869727b9c8b18db462d8 /include/linux/remoteproc.h | |
parent | 5efcea64f6ec141bad475535572765678a9b2631 (diff) | |
download | kernel_samsung_tuna-dbf3f62c5761f298cce9991b30a60dd08f76656f.zip kernel_samsung_tuna-dbf3f62c5761f298cce9991b30a60dd08f76656f.tar.gz kernel_samsung_tuna-dbf3f62c5761f298cce9991b30a60dd08f76656f.tar.bz2 |
remoteproc: add constraints framework
Add constraints api to remoteproc framework
supporting:
- Latency (Using pm_qos framework)
- Frequency
- Bandwidth
Each of them should be provided by the specific
architecture if supported.
Change-Id: Icddd9a8ee3c6c781e1a30817a2db8716428089ad
Signed-off-by: Miguel Vadillo <vadillo@ti.com>
Signed-off-by: Fernando Guzman Lugo <fernando.lugo@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
Diffstat (limited to 'include/linux/remoteproc.h')
-rw-r--r-- | include/linux/remoteproc.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h index 2dc9ec1..9fe9f0b 100644 --- a/include/linux/remoteproc.h +++ b/include/linux/remoteproc.h @@ -37,6 +37,7 @@ #include <linux/completion.h> #include <linux/workqueue.h> #include <linux/notifier.h> +#include <linux/pm_qos_params.h> /** * The following enums and structures define the binary format of the images @@ -108,6 +109,12 @@ struct rproc_mem_entry { u32 size; }; +enum rproc_constraint { + RPROC_CONSTRAINT_SCALE, + RPROC_CONSTRAINT_LATENCY, + RPROC_CONSTRAINT_BANDWIDTH, +}; + struct rproc; struct rproc_ops { @@ -117,6 +124,9 @@ struct rproc_ops { int (*resume)(struct rproc *rproc); int (*iommu_init)(struct rproc *, int (*)(struct rproc *, u64, u32)); int (*iommu_exit)(struct rproc *); + int (*set_lat)(struct rproc *rproc, long v); + int (*set_bw)(struct rproc *rproc, long v); + int (*scale)(struct rproc *rproc, long v); }; /* @@ -217,6 +227,7 @@ struct rproc { struct blocking_notifier_head nb_resume; struct mutex pm_lock; #endif + struct pm_qos_request_list *qos_request; }; struct rproc *rproc_get(const char *); @@ -234,5 +245,6 @@ extern const struct dev_pm_ops rproc_gen_pm_ops; #else #define GENERIC_RPROC_PM_OPS NULL #endif +int rproc_set_constraints(struct rproc *, enum rproc_constraint type, long v); #endif /* REMOTEPROC_H */ |