pm.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /* linux/arch/arm/mach-s3c2410/pm.h
  2. *
  3. * Copyright (c) 2004 Simtec Electronics
  4. * Written by Ben Dooks, <ben@simtec.co.uk>
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License version 2 as
  8. * published by the Free Software Foundation.
  9. */
  10. /* s3c2410_pm_init
  11. *
  12. * called from board at initialisation time to setup the power
  13. * management
  14. */
  15. #ifdef CONFIG_PM
  16. extern __init int s3c2410_pm_init(void);
  17. #else
  18. static inline int s3c2410_pm_init(void)
  19. {
  20. return 0;
  21. }
  22. #endif
  23. /* configuration for the IRQ mask over sleep */
  24. extern unsigned long s3c_irqwake_intmask;
  25. extern unsigned long s3c_irqwake_eintmask;
  26. /* IRQ masks for IRQs allowed to go to sleep (see irq.c) */
  27. extern unsigned long s3c_irqwake_intallow;
  28. extern unsigned long s3c_irqwake_eintallow;
  29. /* Flags for PM Control */
  30. extern unsigned long s3c_pm_flags;
  31. /* from sleep.S */
  32. extern void s3c2410_cpu_suspend(unsigned long *saveblk);
  33. extern void s3c2410_cpu_resume(void);
  34. extern unsigned long s3c2410_sleep_save_phys;
  35. /* sleep save info */
  36. struct sleep_save {
  37. void __iomem *reg;
  38. unsigned long val;
  39. };
  40. #define SAVE_ITEM(x) \
  41. { .reg = (x) }
  42. extern void s3c2410_pm_do_save(struct sleep_save *ptr, int count);
  43. extern void s3c2410_pm_do_restore(struct sleep_save *ptr, int count);