dpmc.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. * include/asm-blackfin/dpmc.h - Miscellaneous IOCTL commands for Dynamic Power
  3. * Management Controller Driver.
  4. * Copyright (C) 2004-2008 Analog Device Inc.
  5. *
  6. */
  7. #ifndef _BLACKFIN_DPMC_H_
  8. #define _BLACKFIN_DPMC_H_
  9. #ifdef __KERNEL__
  10. #ifndef __ASSEMBLY__
  11. void sleep_mode(u32 sic_iwr0, u32 sic_iwr1, u32 sic_iwr2);
  12. void hibernate_mode(u32 sic_iwr0, u32 sic_iwr1, u32 sic_iwr2);
  13. void sleep_deeper(u32 sic_iwr0, u32 sic_iwr1, u32 sic_iwr2);
  14. void do_hibernate(int wakeup);
  15. void set_dram_srfs(void);
  16. void unset_dram_srfs(void);
  17. #define VRPAIR(vlev, freq) (((vlev) << 16) | ((freq) >> 16))
  18. struct bfin_dpmc_platform_data {
  19. const unsigned int *tuple_tab;
  20. unsigned short tabsize;
  21. unsigned short vr_settling_time; /* in us */
  22. };
  23. #else
  24. #define PM_PUSH(x) \
  25. R0 = [P0 + (x - SRAM_BASE_ADDRESS)];\
  26. [--SP] = R0;\
  27. #define PM_POP(x) \
  28. R0 = [SP++];\
  29. [P0 + (x - SRAM_BASE_ADDRESS)] = R0;\
  30. #define PM_SYS_PUSH(x) \
  31. R0 = [P0 + (x - PLL_CTL)];\
  32. [--SP] = R0;\
  33. #define PM_SYS_POP(x) \
  34. R0 = [SP++];\
  35. [P0 + (x - PLL_CTL)] = R0;\
  36. #define PM_SYS_PUSH16(x) \
  37. R0 = w[P0 + (x - PLL_CTL)];\
  38. [--SP] = R0;\
  39. #define PM_SYS_POP16(x) \
  40. R0 = [SP++];\
  41. w[P0 + (x - PLL_CTL)] = R0;\
  42. #endif
  43. #endif /* __KERNEL__ */
  44. #endif /*_BLACKFIN_DPMC_H_*/