aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap/omap-pm-noop.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/plat-omap/omap-pm-noop.c')
-rw-r--r--arch/arm/plat-omap/omap-pm-noop.c61
1 files changed, 48 insertions, 13 deletions
diff --git a/arch/arm/plat-omap/omap-pm-noop.c b/arch/arm/plat-omap/omap-pm-noop.c
index 186bca82cfab..e129ce80c53b 100644
--- a/arch/arm/plat-omap/omap-pm-noop.c
+++ b/arch/arm/plat-omap/omap-pm-noop.c
@@ -34,11 +34,11 @@ struct omap_opp *l3_opps;
34 * Device-driver-originated constraints (via board-*.c files) 34 * Device-driver-originated constraints (via board-*.c files)
35 */ 35 */
36 36
37void omap_pm_set_max_mpu_wakeup_lat(struct device *dev, long t) 37int omap_pm_set_max_mpu_wakeup_lat(struct device *dev, long t)
38{ 38{
39 if (!dev || t < -1) { 39 if (!dev || t < -1) {
40 WARN_ON(1); 40 WARN(1, "OMAP PM: %s: invalid parameter(s)", __func__);
41 return; 41 return -EINVAL;
42 }; 42 };
43 43
44 if (t == -1) 44 if (t == -1)
@@ -58,14 +58,16 @@ void omap_pm_set_max_mpu_wakeup_lat(struct device *dev, long t)
58 * 58 *
59 * TI CDP code can call constraint_set here. 59 * TI CDP code can call constraint_set here.
60 */ 60 */
61
62 return 0;
61} 63}
62 64
63void omap_pm_set_min_bus_tput(struct device *dev, u8 agent_id, unsigned long r) 65int omap_pm_set_min_bus_tput(struct device *dev, u8 agent_id, unsigned long r)
64{ 66{
65 if (!dev || (agent_id != OCP_INITIATOR_AGENT && 67 if (!dev || (agent_id != OCP_INITIATOR_AGENT &&
66 agent_id != OCP_TARGET_AGENT)) { 68 agent_id != OCP_TARGET_AGENT)) {
67 WARN_ON(1); 69 WARN(1, "OMAP PM: %s: invalid parameter(s)", __func__);
68 return; 70 return -EINVAL;
69 }; 71 };
70 72
71 if (r == 0) 73 if (r == 0)
@@ -83,13 +85,16 @@ void omap_pm_set_min_bus_tput(struct device *dev, u8 agent_id, unsigned long r)
83 * 85 *
84 * TI CDP code can call constraint_set here on the VDD2 OPP. 86 * TI CDP code can call constraint_set here on the VDD2 OPP.
85 */ 87 */
88
89 return 0;
86} 90}
87 91
88void omap_pm_set_max_dev_wakeup_lat(struct device *dev, long t) 92int omap_pm_set_max_dev_wakeup_lat(struct device *req_dev, struct device *dev,
93 long t)
89{ 94{
90 if (!dev || t < -1) { 95 if (!req_dev || !dev || t < -1) {
91 WARN_ON(1); 96 WARN(1, "OMAP PM: %s: invalid parameter(s)", __func__);
92 return; 97 return -EINVAL;
93 }; 98 };
94 99
95 if (t == -1) 100 if (t == -1)
@@ -111,13 +116,15 @@ void omap_pm_set_max_dev_wakeup_lat(struct device *dev, long t)
111 * 116 *
112 * TI CDP code can call constraint_set here. 117 * TI CDP code can call constraint_set here.
113 */ 118 */
119
120 return 0;
114} 121}
115 122
116void omap_pm_set_max_sdma_lat(struct device *dev, long t) 123int omap_pm_set_max_sdma_lat(struct device *dev, long t)
117{ 124{
118 if (!dev || t < -1) { 125 if (!dev || t < -1) {
119 WARN_ON(1); 126 WARN(1, "OMAP PM: %s: invalid parameter(s)", __func__);
120 return; 127 return -EINVAL;
121 }; 128 };
122 129
123 if (t == -1) 130 if (t == -1)
@@ -139,8 +146,36 @@ void omap_pm_set_max_sdma_lat(struct device *dev, long t)
139 * TI CDP code can call constraint_set here. 146 * TI CDP code can call constraint_set here.
140 */ 147 */
141 148
149 return 0;
142} 150}
143 151
152int omap_pm_set_min_clk_rate(struct device *dev, struct clk *c, long r)
153{
154 if (!dev || !c || r < 0) {
155 WARN(1, "OMAP PM: %s: invalid parameter(s)", __func__);
156 return -EINVAL;
157 }
158
159 if (r == 0)
160 pr_debug("OMAP PM: remove min clk rate constraint: "
161 "dev %s\n", dev_name(dev));
162 else
163 pr_debug("OMAP PM: add min clk rate constraint: "
164 "dev %s, rate = %ld Hz\n", dev_name(dev), r);
165
166 /*
167 * Code in a real implementation should keep track of these
168 * constraints on the clock, and determine the highest minimum
169 * clock rate. It should iterate over each OPP and determine
170 * whether the OPP will result in a clock rate that would
171 * satisfy this constraint (and any other PM constraint in effect
172 * at that time). Once it finds the lowest-voltage OPP that
173 * meets those conditions, it should switch to it, or return
174 * an error if the code is not capable of doing so.
175 */
176
177 return 0;
178}
144 179
145/* 180/*
146 * DSP Bridge-specific constraints 181 * DSP Bridge-specific constraints