liquidLevelDataOperation.h 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. /****************************************************************************/
  2. /*
  3. * m532xsim.h -- ColdFire 5329 registers
  4. */
  5. /****************************************************************************/
  6. #ifndef m532xsim_h
  7. #define m532xsim_h
  8. /****************************************************************************/
  9. #define CPU_NAME "COLDFIRE(m532x)"
  10. #define CPU_INSTR_PER_JIFFY 3
  11. #define MCF_BUSCLK (MCF_CLK / 3)
  12. #include <asm/m53xxacr.h>
  13. #define MCFINT_VECBASE 64
  14. #define MCFINT_UART0 26 /* Interrupt number for UART0 */
  15. #define MCFINT_UART1 27 /* Interrupt number for UART1 */
  16. #define MCFINT_UART2 28 /* Interrupt number for UART2 */
  17. #define MCFINT_QSPI 31 /* Interrupt number for QSPI */
  18. #define MCFINT_FECRX0 36 /* Interrupt number for FEC */
  19. #define MCFINT_FECTX0 40 /* Interrupt number for FEC */
  20. #define MCFINT_FECENTC0 42 /* Interrupt number for FEC */
  21. #define MCF_IRQ_UART0 (MCFINT_VECBASE + MCFINT_UART0)
  22. #define MCF_IRQ_UART1 (MCFINT_VECBASE + MCFINT_UART1)
  23. #define MCF_IRQ_UART2 (MCFINT_VECBASE + MCFINT_UART2)
  24. #define MCF_IRQ_FECRX0 (MCFINT_VECBASE + MCFINT_FECRX0)
  25. #define MCF_IRQ_FECTX0 (MCFINT_VECBASE + MCFINT_FECTX0)
  26. #define MCF_IRQ_FECENTC0 (MCFINT_VECBASE + MCFINT_FECENTC0)
  27. #define MCF_IRQ_QSPI (MCFINT_VECBASE + MCFINT_QSPI)
  28. #define MCF_WTM_WCR 0xFC098000
  29. /*
  30. * Define the 532x SIM register set addresses.
  31. */
  32. #define MCFSIM_IPRL 0xFC048004
  33. #define MCFSIM_IPRH 0xFC048000
  34. #define MCFSIM_IPR MCFSIM_IPRL
  35. #define MCFSIM_IMRL 0xFC04800C
  36. #define MCFSIM_IMRH 0xFC048008
  37. #define MCFSIM_IMR MCFSIM_IMRL
  38. #define MCFSIM_ICR0 0xFC048040
  39. #define MCFSIM_ICR1 0xFC048041
  40. #define MCFSIM_ICR2 0xFC048042
  41. #define MCFSIM_ICR3 0xFC048043
  42. #define MCFSIM_ICR4 0xFC048044
  43. #define MCFSIM_ICR5 0xFC048045
  44. #define MCFSIM_ICR6 0xFC048046
  45. #define MCFSIM_ICR7 0xFC048047
  46. #define MCFSIM_ICR8 0xFC048048
  47. #define MCFSIM_ICR9 0xFC048049
  48. #define MCFSIM_ICR10 0xFC04804A
  49. #define MCFSIM_ICR11 0xFC04804B
  50. /*
  51. * Some symbol defines for the above...
  52. */
  53. #define MCFSIM_SWDICR MCFSIM_ICR0 /* Watchdog timer ICR */
  54. #define MCFSIM_TIMER1ICR MCFSIM_ICR1 /* Timer 1 ICR */
  55. #define MCFSIM_TIMER2ICR MCFSIM_ICR2 /* Timer 2 ICR */
  56. #define MCFSIM_UART1ICR MCFSIM_ICR4 /* UART 1 ICR */
  57. #define MCFSIM_UART2ICR MCFSIM_ICR5 /* UART 2 ICR */
  58. #define MCFSIM_DMA0ICR MCFSIM_ICR6 /* DMA 0 ICR */
  59. #define MCFSIM_DMA1ICR MCFSIM_ICR7 /* DMA 1 ICR */
  60. #define MCFSIM_DMA2ICR MCFSIM_ICR8 /* DMA 2 ICR */
  61. #define MCFSIM_DMA3ICR MCFSIM_ICR9 /* DMA 3 ICR */
  62. #define MCFINTC0_SIMR 0xFC04801C
  63. #define MCFINTC0_CIMR 0xFC04801D
  64. #define MCFINTC0_ICR0 0xFC048040
  65. #define MCFINTC1_SIMR 0xFC04C01C
  66. #define MCFINTC1_CIMR 0xFC04C01D
  67. #define MCFINTC1_ICR0 0xFC04C040
  68. #define MCFINTC2_SIMR (0)
  69. #define MCFINTC2_CIMR (0)
  70. #define MCFINTC2_ICR0 (0)
  71. #define MCFSIM_ICR_TIMER1 (0xFC048040+32)
  72. #define MCFSIM_ICR_TIMER2 (0xFC048040+33)
  73. /*
  74. * Define system peripheral IRQ usage.
  75. */
  76. #define MCF_IRQ_TIMER (64 + 32) /* Timer0 */
  77. #define MCF_IRQ_PROFILER (64 + 33) /* Timer1 */
  78. /*
  79. * UART module.
  80. */
  81. #define MCFUART_BASE0 0xFC060000 /* Base address of UART1 */
  82. #define MCFUART_BASE1 0xFC064000 /* Base address of UART2 */
  83. #define MCFUART_BASE2 0xFC068000 /* Base address of UART3 */
  84. /*
  85. * FEC module.
  86. */
  87. #define MCFFEC_BASE0 0xFC030000 /* Base address of FEC0 */
  88. #define MCFFEC_SIZE0 0x800 /* Size of FEC0 region */
  89. /*
  90. * QSPI module.
  91. */
  92. #define MCFQSPI_BASE 0xFC058000 /* Base address of QSPI */
  93. #define MCFQSPI_SIZE 0x40 /* Size of QSPI region */
  94. #define MCFQSPI_CS0 84
  95. #define MCFQSPI_CS1 85
  96. #define MCFQSPI_CS2 86
  97. /*
  98. * Timer module.
  99. */
  100. #define MCFTIMER_BASE1 0xFC070000 /* Base address of TIMER1 */
  101. #define MCFTIMER_BASE2 0xFC074000 /* Base address of TIMER2 */
  102. #define MCFTIMER_BASE3 0xFC078000 /* Base address of TIMER3 */
  103. #define MCFTIMER_BASE4 0xFC07C000 /* Base address of TIMER4 */
  104. /*********************************************************************
  105. *
  106. * Reset Controller Module
  107. *
  108. *********************************************************************/
  109. #define MCF_RCR 0xFC0A0000
  110. #define MCF_RSR 0xFC0A0001
  111. #define MCF_RCR_SWRESET 0x80 /* Software reset bit */
  112. #define MCF_RCR_FRCSTOUT 0x40 /* Force external reset */
  113. /*
  114. * Power Management
  115. */
  116. #define MCFPM_WCR 0xfc040013
  117. #define MCFPM_PPMSR0 0xfc04002c
  118. #define MCFPM_PPMCR0 0xfc04002d
  119. #define MCFPM_PPMSR1 0xfc04002e
  120. #define MCFPM_PPMCR1 0xfc04002f
  121. #define MCFPM_PPMHR0 0xfc040030
  122. #define MCFPM_PPMLR0 0xfc040034
  123. #define MCFPM_PPMHR1 0xfc040038
  124. #define MCFPM_LPCR 0xec090007
  125. /*
  126. * The M5329EVB board needs a help getting its devices initialized
  127. * at kernel start time if dBUG doesn't set it up (for example
  128. * it is not used), so we need to do it manually.
  129. */
  130. #ifdef __ASSEMBLER__
  131. .macro m5329EVB_setup
  132. movel #0xFC098000, %a7
  133. movel #0x0, (%a7)
  134. #define CORE_SRAM 0x80000000
  135. #define CORE_SRAM_SIZE 0x8000
  136. movel #CORE_SRAM, %d0
  137. addl #0x221, %d0
  138. movec %d0,%RAMBAR1
  139. movel #CORE_SRAM, %sp
  140. addl #CORE_SRAM_SIZE, %sp
  141. jsr sysinit
  142. .endm
  143. #define PLATFORM_SETUP m5329EVB_setup
  144. #endif /* __ASSEMBLER__ */
  145. /*********************************************************************
  146. *