cpu.h 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. /*
  2. * (C) Copyright 2010
  3. * Marvell Semiconductor <www.marvell.com>
  4. * Written-by: Prafulla Wadaskar <prafulla@marvell.com>, Contributor: Mahavir Jain <mjain@marvell.com>
  5. *
  6. * See file CREDITS for list of people who contributed to this
  7. * project.
  8. *
  9. * This program is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU General Public License as
  11. * published by the Free Software Foundation; either version 2 of
  12. * the License, or (at your option) any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public License
  20. * along with this program; if not, write to the Free Software
  21. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  22. * MA 02110-1301 USA
  23. */
  24. #ifndef _ARMADA100CPU_H
  25. #define _ARMADA100CPU_H
  26. #include <asm/io.h>
  27. #include <asm/system.h>
  28. /*
  29. * Main Power Management (MPMU) Registers
  30. * Refer Datasheet Appendix A.8
  31. */
  32. struct armd1mpmu_registers {
  33. u8 pad0[0x08 - 0x00];
  34. u32 fccr; /*0x0008*/
  35. u32 pocr; /*0x000c*/
  36. u32 posr; /*0x0010*/
  37. u32 succr; /*0x0014*/
  38. u8 pad1[0x030 - 0x014 - 4];
  39. u32 gpcr; /*0x0030*/
  40. u8 pad2[0x200 - 0x030 - 4];
  41. u32 wdtpcr; /*0x0200*/
  42. u8 pad3[0x1000 - 0x200 - 4];
  43. u32 apcr; /*0x1000*/
  44. u32 apsr; /*0x1004*/
  45. u8 pad4[0x1020 - 0x1004 - 4];
  46. u32 aprr; /*0x1020*/
  47. u32 acgr; /*0x1024*/
  48. u32 arsr; /*0x1028*/
  49. };
  50. /*
  51. * Application Subsystem Power Management
  52. * Refer Datasheet Appendix A.9
  53. */
  54. struct armd1apmu_registers {
  55. u32 pcr; /* 0x000 */
  56. u32 ccr; /* 0x004 */
  57. u32 pad1;
  58. u32 ccsr; /* 0x00C */
  59. u32 fc_timer; /* 0x010 */
  60. u32 pad2;
  61. u32 ideal_cfg; /* 0x018 */
  62. u8 pad3[0x04C - 0x018 - 4];
  63. u32 lcdcrc; /* 0x04C */
  64. u32 cciccrc; /* 0x050 */
  65. u32 sd1crc; /* 0x054 */
  66. u32 sd2crc; /* 0x058 */
  67. u32 usbcrc; /* 0x05C */
  68. u32 nfccrc; /* 0x060 */
  69. u32 dmacrc; /* 0x064 */
  70. u32 pad4;
  71. u32 buscrc; /* 0x06C */
  72. u8 pad5[0x07C - 0x06C - 4];
  73. u32 wake_clr; /* 0x07C */
  74. u8 pad6[0x090 - 0x07C - 4];
  75. u32 core_status; /* 0x090 */
  76. u32 rfsc; /* 0x094 */
  77. u32 imr; /* 0x098 */
  78. u32 irwc; /* 0x09C */
  79. u32 isr; /* 0x0A0 */
  80. u8 pad7[0x0B0 - 0x0A0 - 4];
  81. u32 mhst; /* 0x0B0 */
  82. u32 msr; /* 0x0B4 */
  83. u8 pad8[0x0C0 - 0x0B4 - 4];
  84. u32 msst; /* 0x0C0 */
  85. u32 pllss; /* 0x0C4 */
  86. u32 smb; /* 0x0C8 */
  87. u32 gccrc; /* 0x0CC */
  88. u8 pad9[0x0D4 - 0x0CC - 4];
  89. u32 smccrc; /* 0x0D4 */
  90. u32 pad10;
  91. u32 xdcrc; /* 0x0DC */
  92. u32 sd3crc; /* 0x0E0 */
  93. u32 sd4crc; /* 0x0E4 */
  94. u8 pad11[0x0F0 - 0x0E4 - 4];
  95. u32 cfcrc; /* 0x0F0 */
  96. u32 mspcrc; /* 0x0F4 */
  97. u32 cmucrc; /* 0x0F8 */
  98. u32 fecrc; /* 0x0FC */
  99. u32 pciecrc; /* 0x100 */
  100. u32 epdcrc; /* 0x104 */
  101. };
  102. /*
  103. * APB1 Clock Reset/Control Registers
  104. * Refer Datasheet Appendix A.10
  105. */
  106. struct armd1apb1_registers {
  107. u32 uart1; /*0x000*/
  108. u32 uart2; /*0x004*/
  109. u32 gpio; /*0x008*/
  110. u32 pwm1; /*0x00c*/
  111. u32 pwm2; /*0x010*/
  112. u32 pwm3; /*0x014*/
  113. u32 pwm4; /*0x018*/
  114. u8 pad0[0x028 - 0x018 - 4];
  115. u32 rtc; /*0x028*/
  116. u32 twsi0; /*0x02c*/
  117. u32 kpc; /*0x030*/
  118. u32 timers; /*0x034*/
  119. u8 pad1[0x03c - 0x034 - 4];
  120. u32 aib; /*0x03c*/
  121. u32 sw_jtag; /*0x040*/
  122. u32 timer1; /*0x044*/
  123. u32 onewire; /*0x048*/
  124. u8 pad2[0x050 - 0x048 - 4];
  125. u32 asfar; /*0x050 AIB Secure First Access Reg*/
  126. u32 assar; /*0x054 AIB Secure Second Access Reg*/
  127. u8 pad3[0x06c - 0x054 - 4];
  128. u32 twsi1; /*0x06c*/
  129. u32 uart3; /*0x070*/
  130. u8 pad4[0x07c - 0x070 - 4];
  131. u32 timer2; /*0x07C*/
  132. u8 pad5[0x084 - 0x07c - 4];
  133. u32 ac97; /*0x084*/
  134. };
  135. /*
  136. * APB2 Clock Reset/Control Registers
  137. * Refer Datasheet Appendix A.11
  138. */
  139. struct armd1apb2_registers {
  140. u32 pad1[0x01C - 0x000];
  141. u32 ssp1_clkrst; /* 0x01C */
  142. u32 ssp2_clkrst; /* 0x020 */
  143. u32 pad2[0x04C - 0x020 - 4];
  144. u32 ssp3_clkrst; /* 0x04C */
  145. u32 pad3[0x058 - 0x04C - 4];
  146. u32 ssp4_clkrst; /* 0x058 */
  147. u32 ssp5_clkrst; /* 0x05C */
  148. };
  149. /*
  150. * CPU Interface Registers
  151. * Refer Datasheet Appendix A.2
  152. */
  153. struct armd1cpu_registers {
  154. u32 chip_id; /* Chip Id Reg */
  155. u32 pad;
  156. u32 cpu_conf; /* CPU Conf Reg */
  157. u32 pad1;
  158. u32 cpu_sram_spd; /* CPU SRAM Speed Reg */
  159. u32 pad2;
  160. u32 cpu_l2c_spd; /* CPU L2cache Speed Conf */
  161. u32 mcb_conf; /* MCB Conf Reg */
  162. u32 sys_boot_ctl; /* Sytem Boot Control */
  163. };
  164. /*
  165. * Functions
  166. */
  167. u32 armd1_sdram_base(int);
  168. u32 armd1_sdram_size(int);
  169. #endif /* _ARMADA100CPU_H */