pm.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * TI DaVinci platform support for power management.
  4. *
  5. * Copyright (C) 2009 Texas Instruments, Inc. https://www.ti.com/
  6. */
  7. #ifndef _MACH_DAVINCI_PM_H
  8. #define _MACH_DAVINCI_PM_H
  9. /*
  10. * Caution: Assembly code in sleep.S makes assumtion on the order
  11. * of the members of this structure.
  12. */
  13. struct davinci_pm_config {
  14. void __iomem *ddr2_ctlr_base;
  15. void __iomem *ddrpsc_reg_base;
  16. int ddrpsc_num;
  17. void __iomem *ddrpll_reg_base;
  18. void __iomem *deepsleep_reg;
  19. void __iomem *cpupll_reg_base;
  20. /*
  21. * Note on SLEEPCOUNT:
  22. * The SLEEPCOUNT feature is mainly intended for cases in which
  23. * the internal oscillator is used. The internal oscillator is
  24. * fully disabled in deep sleep mode. When you exist deep sleep
  25. * mode, the oscillator will be turned on and will generate very
  26. * small oscillations which will not be detected by the deep sleep
  27. * counter. Eventually those oscillations will grow to an amplitude
  28. * large enough to start incrementing the deep sleep counter.
  29. * In this case recommendation from hardware engineers is that the
  30. * SLEEPCOUNT be set to 4096. This means that 4096 valid clock cycles
  31. * must be detected before the clock is passed to the rest of the
  32. * system.
  33. * In the case that the internal oscillator is not used and the
  34. * clock is generated externally, the SLEEPCOUNT value can be very
  35. * small since the clock input is assumed to be stable before SoC
  36. * is taken out of deepsleep mode. A value of 128 would be more than
  37. * adequate.
  38. */
  39. int sleepcount;
  40. };
  41. extern unsigned int davinci_cpu_suspend_sz;
  42. extern void davinci_cpu_suspend(struct davinci_pm_config *);
  43. #endif