pixis.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. /*
  2. * Copyright 2010 Freescale Semiconductor, Inc.
  3. *
  4. * See file CREDITS for list of people who contributed to this
  5. * project.
  6. *
  7. * This program is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public License as
  9. * published by the Free Software Foundation; either version 2 of
  10. * the License, or (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  20. * MA 02111-1307 USA
  21. */
  22. #ifndef __PIXIS_H_
  23. #define __PIXIS_H_ 1
  24. /* PIXIS register set. */
  25. #if defined(CONFIG_MPC8536DS)
  26. typedef struct pixis {
  27. u8 id;
  28. u8 ver;
  29. u8 pver;
  30. u8 csr;
  31. u8 rst;
  32. u8 rst2;
  33. u8 aux1;
  34. u8 spd;
  35. u8 aux2;
  36. u8 csr2;
  37. u8 watch;
  38. u8 led;
  39. u8 pwr;
  40. u8 res[3];
  41. u8 vctl;
  42. u8 vstat;
  43. u8 vcfgen0;
  44. u8 vcfgen1;
  45. u8 vcore0;
  46. u8 res1;
  47. u8 vboot;
  48. u8 vspeed[3];
  49. u8 sclk[3];
  50. u8 dclk[3];
  51. u8 i2cdacr;
  52. u8 vcoreacc[4];
  53. u8 vcorecnt[3];
  54. u8 vcoremax[2];
  55. u8 vplatacc[4];
  56. u8 vplatcnt[3];
  57. u8 vplatmax[2];
  58. u8 vtempacc[4];
  59. u8 vtempcnt[3];
  60. u8 vtempmax[2];
  61. u8 res2[4];
  62. } __attribute__ ((packed)) pixis_t;
  63. #elif defined(CONFIG_MPC8544DS)
  64. typedef struct pixis {
  65. u8 id;
  66. u8 ver;
  67. u8 pver;
  68. u8 csr;
  69. u8 rst;
  70. u8 pwr;
  71. u8 aux1;
  72. u8 spd;
  73. u8 res[8];
  74. u8 vctl;
  75. u8 vstat;
  76. u8 vcfgen0;
  77. u8 vcfgen1;
  78. u8 vcore0;
  79. u8 res1;
  80. u8 vboot;
  81. u8 vspeed[2];
  82. u8 vclkh;
  83. u8 vclkl;
  84. u8 watch;
  85. u8 led;
  86. u8 vspeed2;
  87. u8 res2[34];
  88. } __attribute__ ((packed)) pixis_t;
  89. #elif defined(CONFIG_MPC8572DS)
  90. typedef struct pixis {
  91. u8 id;
  92. u8 ver;
  93. u8 pver;
  94. u8 csr;
  95. u8 rst;
  96. u8 pwr1;
  97. u8 aux1;
  98. u8 spd;
  99. u8 aux2;
  100. u8 res[7];
  101. u8 vctl;
  102. u8 vstat;
  103. u8 vcfgen0;
  104. u8 vcfgen1;
  105. u8 vcore0;
  106. u8 res1;
  107. u8 vboot;
  108. u8 vspeed[3];
  109. u8 res2[2];
  110. u8 sclk[3];
  111. u8 dclk[3];
  112. u8 res3[2];
  113. u8 watch;
  114. u8 led;
  115. u8 res4[25];
  116. } __attribute__ ((packed)) pixis_t;
  117. #elif defined(CONFIG_MPC8610HPCD)
  118. typedef struct pixis {
  119. u8 id;
  120. u8 ver; /* also called arch */
  121. u8 pver;
  122. u8 csr;
  123. u8 rst;
  124. u8 pwr;
  125. u8 aux;
  126. u8 spd;
  127. u8 brdcfg0;
  128. u8 brdcfg1;
  129. u8 res[4];
  130. u8 led;
  131. u8 serno;
  132. u8 vctl;
  133. u8 vstat;
  134. u8 vcfgen0;
  135. u8 vcfgen1;
  136. u8 vcore0;
  137. u8 res1;
  138. u8 vboot;
  139. u8 vspeed[2];
  140. u8 res2;
  141. u8 sclk[3];
  142. u8 res3;
  143. u8 watch;
  144. u8 res4[33];
  145. } __attribute__ ((packed)) pixis_t;
  146. #elif defined(CONFIG_MPC8641HPCN)
  147. typedef struct pixis {
  148. u8 id;
  149. u8 ver;
  150. u8 pver;
  151. u8 csr;
  152. u8 rst;
  153. u8 pwr;
  154. u8 aux;
  155. u8 spd;
  156. u8 res[8];
  157. u8 vctl;
  158. u8 vstat;
  159. u8 vcfgen0;
  160. u8 vcfgen1;
  161. u8 vcore0;
  162. u8 res1;
  163. u8 vboot;
  164. u8 vspeed[2];
  165. u8 vclkh;
  166. u8 vclkl;
  167. u8 watch;
  168. u8 res3[36];
  169. } __attribute__ ((packed)) pixis_t;
  170. #else
  171. #error Need to define pixis_t for this board
  172. #endif
  173. /* Pointer to the PIXIS register set */
  174. #define pixis ((pixis_t *)PIXIS_BASE)
  175. #endif /* __PIXIS_H_ */