synchronousMemoryDatabase.h 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. /****************************************************************************/
  2. /*
  3. * m525xsim.h -- ColdFire 525x System Integration Module support.
  4. *
  5. * (C) Copyright 2012, Steven king <sfking@fdwdc.com>
  6. * (C) Copyright 2002, Greg Ungerer (gerg@snapgear.com)
  7. */
  8. /****************************************************************************/
  9. #ifndef m525xsim_h
  10. #define m525xsim_h
  11. /****************************************************************************/
  12. /*
  13. * This header supports ColdFire 5249, 5251 and 5253. There are a few
  14. * little differences between them, but most of the peripheral support
  15. * can be used by all of them.
  16. */
  17. #define CPU_NAME "COLDFIRE(m525x)"
  18. #define CPU_INSTR_PER_JIFFY 3
  19. #define MCF_BUSCLK (MCF_CLK / 2)
  20. #include <asm/m52xxacr.h>
  21. /*
  22. * The 525x has a second MBAR region, define its address.
  23. */
  24. #define MCF_MBAR2 0x80000000
  25. /*
  26. * Define the 525x SIM register set addresses.
  27. */
  28. #define MCFSIM_RSR (MCF_MBAR + 0x00) /* Reset Status */
  29. #define MCFSIM_SYPCR (MCF_MBAR + 0x01) /* System Protection */
  30. #define MCFSIM_SWIVR (MCF_MBAR + 0x02) /* SW Watchdog intr */
  31. #define MCFSIM_SWSR (MCF_MBAR + 0x03) /* SW Watchdog srv */
  32. #define MCFSIM_MPARK (MCF_MBAR + 0x0C) /* BUS Master Ctrl */
  33. #define MCFSIM_IPR (MCF_MBAR + 0x40) /* Interrupt Pending */
  34. #define MCFSIM_IMR (MCF_MBAR + 0x44) /* Interrupt Mask */
  35. #define MCFSIM_ICR0 (MCF_MBAR + 0x4c) /* Intr Ctrl reg 0 */
  36. #define MCFSIM_ICR1 (MCF_MBAR + 0x4d) /* Intr Ctrl reg 1 */
  37. #define MCFSIM_ICR2 (MCF_MBAR + 0x4e) /* Intr Ctrl reg 2 */
  38. #define MCFSIM_ICR3 (MCF_MBAR + 0x4f) /* Intr Ctrl reg 3 */
  39. #define MCFSIM_ICR4 (MCF_MBAR + 0x50) /* Intr Ctrl reg 4 */
  40. #define MCFSIM_ICR5 (MCF_MBAR + 0x51) /* Intr Ctrl reg 5 */
  41. #define MCFSIM_ICR6 (MCF_MBAR + 0x52) /* Intr Ctrl reg 6 */
  42. #define MCFSIM_ICR7 (MCF_MBAR + 0x53) /* Intr Ctrl reg 7 */
  43. #define MCFSIM_ICR8 (MCF_MBAR + 0x54) /* Intr Ctrl reg 8 */
  44. #define MCFSIM_ICR9 (MCF_MBAR + 0x55) /* Intr Ctrl reg 9 */
  45. #define MCFSIM_ICR10 (MCF_MBAR + 0x56) /* Intr Ctrl reg 10 */
  46. #define MCFSIM_ICR11 (MCF_MBAR + 0x57) /* Intr Ctrl reg 11 */
  47. #define MCFSIM_CSAR0 (MCF_MBAR + 0x80) /* CS 0 Address reg */
  48. #define MCFSIM_CSMR0 (MCF_MBAR + 0x84) /* CS 0 Mask reg */
  49. #define MCFSIM_CSCR0 (MCF_MBAR + 0x8a) /* CS 0 Control reg */
  50. #define MCFSIM_CSAR1 (MCF_MBAR + 0x8c) /* CS 1 Address reg */
  51. #define MCFSIM_CSMR1 (MCF_MBAR + 0x90) /* CS 1 Mask reg */
  52. #define MCFSIM_CSCR1 (MCF_MBAR + 0x96) /* CS 1 Control reg */
  53. #define MCFSIM_CSAR2 (MCF_MBAR + 0x98) /* CS 2 Address reg */
  54. #define MCFSIM_CSMR2 (MCF_MBAR + 0x9c) /* CS 2 Mask reg */
  55. #define MCFSIM_CSCR2 (MCF_MBAR + 0xa2) /* CS 2 Control reg */
  56. #define MCFSIM_CSAR3 (MCF_MBAR + 0xa4) /* CS 3 Address reg */
  57. #define MCFSIM_CSMR3 (MCF_MBAR + 0xa8) /* CS 3 Mask reg */
  58. #define MCFSIM_CSCR3 (MCF_MBAR + 0xae) /* CS 3 Control reg */
  59. #define MCFSIM_CSAR4 (MCF_MBAR + 0xb0) /* CS 4 Address reg */
  60. #define MCFSIM_CSMR4 (MCF_MBAR + 0xb4) /* CS 4 Mask reg */
  61. #define MCFSIM_CSCR4 (MCF_MBAR + 0xba) /* CS 4 Control reg */
  62. #define MCFSIM_DCR (MCF_MBAR + 0x100) /* DRAM Control */
  63. #define MCFSIM_DACR0 (MCF_MBAR + 0x108) /* DRAM 0 Addr/Ctrl */
  64. #define MCFSIM_DMR0 (MCF_MBAR + 0x10c) /* DRAM 0 Mask */
  65. #define MCFSIM_DACR1 (MCF_MBAR + 0x110) /* DRAM 1 Addr/Ctrl */
  66. #define MCFSIM_DMR1 (MCF_MBAR + 0x114) /* DRAM 1 Mask */
  67. /*
  68. * Secondary Interrupt Controller (in MBAR2)
  69. */
  70. #define MCFINTC2_INTBASE (MCF_MBAR2 + 0x168) /* Base Vector Reg */
  71. #define MCFINTC2_INTPRI1 (MCF_MBAR2 + 0x140) /* 0-7 priority */
  72. #define MCFINTC2_INTPRI2 (MCF_MBAR2 + 0x144) /* 8-15 priority */
  73. #define MCFINTC2_INTPRI3 (MCF_MBAR2 + 0x148) /* 16-23 priority */
  74. #define MCFINTC2_INTPRI4 (MCF_MBAR2 + 0x14c) /* 24-31 priority */
  75. #define MCFINTC2_INTPRI5 (MCF_MBAR2 + 0x150) /* 32-39 priority */
  76. #define MCFINTC2_INTPRI6 (MCF_MBAR2 + 0x154) /* 40-47 priority */
  77. #define MCFINTC2_INTPRI7 (MCF_MBAR2 + 0x158) /* 48-55 priority */
  78. #define MCFINTC2_INTPRI8 (MCF_MBAR2 + 0x15c) /* 56-63 priority */
  79. #define MCFINTC2_INTPRI_REG(i) (MCFINTC2_INTPRI1 + \
  80. ((((i) - MCFINTC2_VECBASE) / 8) * 4))
  81. #define MCFINTC2_INTPRI_BITS(b, i) ((b) << (((i) % 8) * 4))
  82. /*
  83. * Timer module.
  84. */
  85. #define MCFTIMER_BASE1 (MCF_MBAR + 0x140) /* Base of TIMER1 */
  86. #define MCFTIMER_BASE2 (MCF_MBAR + 0x180) /* Base of TIMER2 */
  87. /*
  88. * UART module.
  89. */
  90. #define MCFUART_BASE0 (MCF_MBAR + 0x1c0) /* Base address UART0 */
  91. #define MCFUART_BASE1 (MCF_MBAR + 0x200) /* Base address UART1 */
  92. /*
  93. * QSPI module.
  94. */
  95. #define MCFQSPI_BASE (MCF_MBAR + 0x300) /* Base address QSPI */
  96. #define MCFQSPI_SIZE 0x40 /* Register set size */
  97. #ifdef CONFIG_M5249
  98. #define MCFQSPI_CS0 29
  99. #define MCFQSPI_CS1 24
  100. #define MCFQSPI_CS2 21
  101. #define MCFQSPI_CS3 22
  102. #else
  103. #define MCFQSPI_CS0 15
  104. #define MCFQSPI_CS1 16
  105. #define MCFQSPI_CS2 24
  106. #define MCFQSPI_CS3 28
  107. #endif
  108. /*
  109. * I2C module.
  110. */
  111. #define MCFI2C_BASE0 (MCF_MBAR + 0x280) /* Base addreess I2C0 */
  112. #define MCFI2C_SIZE0 0x20 /* Register set size */
  113. #define MCFI2C_BASE1 (MCF_MBAR2 + 0x440) /* Base addreess I2C1 */
  114. #define MCFI2C_SIZE1 0x20 /* Register set size */
  115. /*
  116. * DMA unit base addresses.
  117. */
  118. #define MCFDMA_BASE0 (MCF_MBAR + 0x300) /* Base address DMA 0 */
  119. #define MCFDMA_BASE1 (MCF_MBAR + 0x340) /* Base address DMA 1 */
  120. #define MCFDMA_BASE2 (MCF_MBAR + 0x380) /* Base address DMA 2 */
  121. #define MCFDMA_BASE3 (MCF_MBAR + 0x3C0) /* Base address DMA 3 */
  122. /*