22 #include <linux/device.h>
29 static bool off_mode_enabled;
30 static int dummy_context_loss_counter;
39 WARN(1,
"OMAP PM: %s: invalid parameter(s)", __func__);
44 pr_debug(
"OMAP PM: remove max MPU wakeup latency constraint: dev %s\n",
47 pr_debug(
"OMAP PM: add max MPU wakeup latency constraint: dev %s, t = %ld usec\n",
68 WARN(1,
"OMAP PM: %s: invalid parameter(s)", __func__);
73 pr_debug(
"OMAP PM: remove min bus tput constraint: dev %s for agent_id %d\n",
74 dev_name(dev), agent_id);
76 pr_debug(
"OMAP PM: add min bus tput constraint: dev %s for agent_id %d: rate %ld KiB\n",
77 dev_name(dev), agent_id, r);
93 if (!req_dev || !dev || t < -1) {
94 WARN(1,
"OMAP PM: %s: invalid parameter(s)", __func__);
99 pr_debug(
"OMAP PM: remove max device latency constraint: dev %s\n",
102 pr_debug(
"OMAP PM: add max device latency constraint: dev %s, t = %ld usec\n",
123 if (!dev || t < -1) {
124 WARN(1,
"OMAP PM: %s: invalid parameter(s)", __func__);
129 pr_debug(
"OMAP PM: remove max DMA latency constraint: dev %s\n",
132 pr_debug(
"OMAP PM: add max DMA latency constraint: dev %s, t = %ld usec\n",
152 if (!dev || !c || r < 0) {
153 WARN(1,
"OMAP PM: %s: invalid parameter(s)", __func__);
158 pr_debug(
"OMAP PM: remove min clk rate constraint: dev %s\n",
161 pr_debug(
"OMAP PM: add min clk rate constraint: dev %s, rate = %ld Hz\n",
184 pr_debug(
"OMAP PM: DSP request for OPP table\n");
201 pr_debug(
"OMAP PM: DSP requests minimum VDD1 OPP to be %d\n", opp_id);
221 pr_debug(
"OMAP PM: DSP requests current DSP OPP ID\n");
243 pr_debug(
"OMAP PM: CPUFreq request for frequency table\n");
261 pr_debug(
"OMAP PM: CPUFreq requests CPU frequency to be set to %lu\n",
276 pr_debug(
"OMAP PM: CPUFreq requests current CPU frequency\n");
293 off_mode_enabled =
true;
304 off_mode_enabled =
false;
311 #ifdef CONFIG_ARCH_OMAP2PLUS
324 WARN_ONCE(off_mode_enabled,
"omap_pm: using dummy context loss counter; device %s should be converted to omap_device",
327 count = dummy_context_loss_counter;
329 if (off_mode_enabled) {
337 dummy_context_loss_counter =
count;
341 pr_debug(
"OMAP PM: context loss count for dev %s = %d\n",
342 dev_name(dev), count);
351 return dummy_context_loss_counter;