Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
omap-pm.h
Go to the documentation of this file.
1 /*
2  * omap-pm.h - OMAP power management interface
3  *
4  * Copyright (C) 2008-2010 Texas Instruments, Inc.
5  * Copyright (C) 2008-2010 Nokia Corporation
6  * Paul Walmsley
7  *
8  * Interface developed by (in alphabetical order): Karthik Dasu, Jouni
9  * Högander, Tony Lindgren, Rajendra Nayak, Sakari Poussa,
10  * Veeramanikandan Raju, Anand Sawant, Igor Stoppa, Paul Walmsley,
11  * Richard Woodruff
12  */
13 
14 #ifndef ASM_ARM_ARCH_OMAP_OMAP_PM_H
15 #define ASM_ARM_ARCH_OMAP_OMAP_PM_H
16 
17 #include <linux/device.h>
18 #include <linux/cpufreq.h>
19 #include <linux/clk.h>
20 #include <linux/opp.h>
21 
22 /*
23  * agent_id values for use with omap_pm_set_min_bus_tput():
24  *
25  * OCP_INITIATOR_AGENT is only valid for devices that can act as
26  * initiators -- it represents the device's L3 interconnect
27  * connection. OCP_TARGET_AGENT represents the device's L4
28  * interconnect connection.
29  */
30 #define OCP_TARGET_AGENT 1
31 #define OCP_INITIATOR_AGENT 2
32 
44 
51 int __init omap_pm_if_init(void);
52 
59 void omap_pm_if_exit(void);
60 
61 /*
62  * Device-driver-originated constraints (via board-*.c files, platform_data)
63  */
64 
65 
100 int omap_pm_set_max_mpu_wakeup_lat(struct device *dev, long t);
101 
102 
132 int omap_pm_set_min_bus_tput(struct device *dev, u8 agent_id, unsigned long r);
133 
134 
161 int omap_pm_set_max_dev_wakeup_lat(struct device *req_dev, struct device *dev,
162  long t);
163 
164 
192 int omap_pm_set_max_sdma_lat(struct device *dev, long t);
193 
194 
253 int omap_pm_set_min_clk_rate(struct device *dev, struct clk *c, long r);
254 
255 /*
256  * DSP Bridge-specific constraints
257  */
258 
266 const struct omap_opp *omap_pm_dsp_get_opp_table(void);
267 
277 void omap_pm_dsp_set_min_opp(u8 opp_id);
278 
289 u8 omap_pm_dsp_get_opp(void);
290 
291 
292 /*
293  * CPUFreq-originated constraint
294  *
295  * In the future, this should be handled by custom OPP clocktype
296  * functions.
297  */
298 
307 
317 void omap_pm_cpu_set_freq(unsigned long f);
318 
324 unsigned long omap_pm_cpu_get_freq(void);
325 
326 
327 /*
328  * Device context loss tracking
329  */
330 
348 
349 void omap_pm_enable_off_mode(void);
350 void omap_pm_disable_off_mode(void);
351 
352 #endif