Merge branch 'xen/xenbus' into upstream/xen
[pandora-kernel.git] / arch / arm / mach-davinci / include / mach / pm.h
1 /*
2  * TI DaVinci platform support for power management.
3  *
4  * Copyright (C) 2009 Texas Instruments, Inc. http://www.ti.com/
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License as
8  * published by the Free Software Foundation version 2.
9  *
10  * This program is distributed "as is" WITHOUT ANY WARRANTY of any
11  * kind, whether express or implied; without even the implied warranty
12  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  */
15 #ifndef _MACH_DAVINCI_PM_H
16 #define _MACH_DAVINCI_PM_H
17
18 /*
19  * Caution: Assembly code in sleep.S makes assumtion on the order
20  * of the members of this structure.
21  */
22 struct davinci_pm_config {
23         void __iomem *ddr2_ctlr_base;
24         void __iomem *ddrpsc_reg_base;
25         int ddrpsc_num;
26         void __iomem *ddrpll_reg_base;
27         void __iomem *deepsleep_reg;
28         void __iomem *cpupll_reg_base;
29         /*
30          * Note on SLEEPCOUNT:
31          * The SLEEPCOUNT feature is mainly intended for cases in which
32          * the internal oscillator is used. The internal oscillator is
33          * fully disabled in deep sleep mode.  When you exist deep sleep
34          * mode, the oscillator will be turned on and will generate very
35          * small oscillations which will not be detected by the deep sleep
36          * counter.  Eventually those oscillations will grow to an amplitude
37          * large enough to start incrementing the deep sleep counter.
38          * In this case recommendation from hardware engineers is that the
39          * SLEEPCOUNT be set to 4096.  This means that 4096 valid clock cycles
40          * must be detected before the clock is passed to the rest of the
41          * system.
42          * In the case that the internal oscillator is not used and the
43          * clock is generated externally, the SLEEPCOUNT value can be very
44          * small since the clock input is assumed to be stable before SoC
45          * is taken out of deepsleep mode.  A value of 128 would be more than
46          * adequate.
47          */
48         int sleepcount;
49 };
50
51 extern unsigned int davinci_cpu_suspend_sz;
52 extern void davinci_cpu_suspend(struct davinci_pm_config *);
53
54 #endif