psc_defs.h 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /*
  2. * Copyright (C) 2011
  3. * Heiko Schocher, DENX Software Engineering, hs@denx.de.
  4. *
  5. * See file CREDITS for list of people who contributed to this
  6. * project.
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public License as
  10. * published by the Free Software Foundation; either version 2 of
  11. * the License, or (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  21. * MA 02111-1307 USA
  22. */
  23. #ifndef _DV_PSC_DEFS_H_
  24. #define _DV_PSC_DEFS_H_
  25. /*
  26. * Power/Sleep Ctrl Register structure
  27. * See sprufb3.pdf, Chapter 7
  28. */
  29. struct dv_psc_regs {
  30. unsigned int pid; /* 0x000 */
  31. unsigned char rsvd0[16]; /* 0x004 */
  32. unsigned char rsvd1[4]; /* 0x014 */
  33. unsigned int inteval; /* 0x018 */
  34. unsigned char rsvd2[36]; /* 0x01C */
  35. unsigned int merrpr0; /* 0x040 */
  36. unsigned int merrpr1; /* 0x044 */
  37. unsigned char rsvd3[8]; /* 0x048 */
  38. unsigned int merrcr0; /* 0x050 */
  39. unsigned int merrcr1; /* 0x054 */
  40. unsigned char rsvd4[8]; /* 0x058 */
  41. unsigned int perrpr; /* 0x060 */
  42. unsigned char rsvd5[4]; /* 0x064 */
  43. unsigned int perrcr; /* 0x068 */
  44. unsigned char rsvd6[4]; /* 0x06C */
  45. unsigned int epcpr; /* 0x070 */
  46. unsigned char rsvd7[4]; /* 0x074 */
  47. unsigned int epccr; /* 0x078 */
  48. unsigned char rsvd8[144]; /* 0x07C */
  49. unsigned char rsvd9[20]; /* 0x10C */
  50. unsigned int ptcmd; /* 0x120 */
  51. unsigned char rsvd10[4]; /* 0x124 */
  52. unsigned int ptstat; /* 0x128 */
  53. unsigned char rsvd11[212]; /* 0x12C */
  54. unsigned int pdstat0; /* 0x200 */
  55. unsigned int pdstat1; /* 0x204 */
  56. unsigned char rsvd12[248]; /* 0x208 */
  57. unsigned int pdctl0; /* 0x300 */
  58. unsigned int pdctl1; /* 0x304 */
  59. unsigned char rsvd13[536]; /* 0x308 */
  60. unsigned int mckout0; /* 0x520 */
  61. unsigned int mckout1; /* 0x524 */
  62. unsigned char rsvd14[728]; /* 0x528 */
  63. unsigned int mdstat[52]; /* 0x800 */
  64. unsigned char rsvd15[304]; /* 0x8D0 */
  65. unsigned int mdctl[52]; /* 0xA00 */
  66. };
  67. /* PSC constants */
  68. #define EMURSTIE_MASK (0x00000200)
  69. #define PD0 (0)
  70. #define PSC_ENABLE (0x3)
  71. #define PSC_DISABLE (0x2)
  72. #define PSC_SYNCRESET (0x1)
  73. #define PSC_SWRSTDISABLE (0x0)
  74. #define PSC_GOSTAT (1 << 0)
  75. #define PSC_MD_STATE_MSK (0x1f)
  76. #define PSC_CMD_GO (1 << 0)
  77. #define dv_psc_regs ((struct dv_psc_regs *)DAVINCI_PWR_SLEEP_CNTRL_BASE)
  78. #endif /* _DV_PSC_DEFS_H_ */