armada100.h 4.8 KB

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