pm.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. * Caution: Assembly code in sleep.S makes assumtion on the order
  19. * of the members of this structure.
  20. */
  21. struct davinci_pm_config {
  22. void __iomem *ddr2_ctlr_base;
  23. void __iomem *ddrpsc_reg_base;
  24. int ddrpsc_num;
  25. void __iomem *ddrpll_reg_base;
  26. void __iomem *deepsleep_reg;
  27. void __iomem *cpupll_reg_base;
  28. /*
  29. * Note on SLEEPCOUNT:
  30. * The SLEEPCOUNT feature is mainly intended for cases in which
  31. * the internal oscillator is used. The internal oscillator is
  32. * fully disabled in deep sleep mode. When you exist deep sleep
  33. * mode, the oscillator will be turned on and will generate very
  34. * small oscillations which will not be detected by the deep sleep
  35. * counter. Eventually those oscillations will grow to an amplitude
  36. * large enough to start incrementing the deep sleep counter.
  37. * In this case recommendation from hardware engineers is that the
  38. * SLEEPCOUNT be set to 4096. This means that 4096 valid clock cycles
  39. * must be detected before the clock is passed to the rest of the
  40. * system.
  41. * In the case that the internal oscillator is not used and the
  42. * clock is generated externally, the SLEEPCOUNT value can be very
  43. * small since the clock input is assumed to be stable before SoC
  44. * is taken out of deepsleep mode. A value of 128 would be more than
  45. * adequate.
  46. */
  47. int sleepcount;
  48. };
  49. extern unsigned int davinci_cpu_suspend_sz;
  50. extern void davinci_cpu_suspend(struct davinci_pm_config *);
  51. #endif