memoryCall.h 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. #ifndef _M32700UT_M32700UT_PLD_H
  2. #define _M32700UT_M32700UT_PLD_H
  3. /*
  4. * include/asm-m32r/m32700ut/m32700ut_pld.h
  5. *
  6. * Definitions for Programmable Logic Device(PLD) on M32700UT board.
  7. *
  8. * Copyright (c) 2002 Takeo Takahashi
  9. *
  10. * This file is subject to the terms and conditions of the GNU General
  11. * Public License. See the file "COPYING" in the main directory of
  12. * this archive for more details.
  13. */
  14. #if defined(CONFIG_PLAT_M32700UT) || defined(CONFIG_PLAT_USRV)
  15. #define PLD_PLAT_BASE 0x04c00000
  16. #else
  17. #error "no platform configuration"
  18. #endif
  19. #ifndef __ASSEMBLY__
  20. /*
  21. * C functions use non-cache address.
  22. */
  23. #define PLD_BASE (PLD_PLAT_BASE /* + NONCACHE_OFFSET */)
  24. #define __reg8 (volatile unsigned char *)
  25. #define __reg16 (volatile unsigned short *)
  26. #define __reg32 (volatile unsigned int *)
  27. #else
  28. #define PLD_BASE (PLD_PLAT_BASE + NONCACHE_OFFSET)
  29. #define __reg8
  30. #define __reg16
  31. #define __reg32
  32. #endif /* __ASSEMBLY__ */
  33. /* CFC */
  34. #define PLD_CFRSTCR __reg16(PLD_BASE + 0x0000)
  35. #define PLD_CFSTS __reg16(PLD_BASE + 0x0002)
  36. #define PLD_CFIMASK __reg16(PLD_BASE + 0x0004)
  37. #define PLD_CFBUFCR __reg16(PLD_BASE + 0x0006)
  38. #define PLD_CFVENCR __reg16(PLD_BASE + 0x0008)
  39. #define PLD_CFCR0 __reg16(PLD_BASE + 0x000a)
  40. #define PLD_CFCR1 __reg16(PLD_BASE + 0x000c)
  41. #define PLD_IDERSTCR __reg16(PLD_BASE + 0x0010)
  42. /* MMC */
  43. #define PLD_MMCCR __reg16(PLD_BASE + 0x4000)
  44. #define PLD_MMCMOD __reg16(PLD_BASE + 0x4002)
  45. #define PLD_MMCSTS __reg16(PLD_BASE + 0x4006)
  46. #define PLD_MMCBAUR __reg16(PLD_BASE + 0x400a)
  47. #define PLD_MMCCMDBCUT __reg16(PLD_BASE + 0x400c)
  48. #define PLD_MMCCDTBCUT __reg16(PLD_BASE + 0x400e)
  49. #define PLD_MMCDET __reg16(PLD_BASE + 0x4010)
  50. #define PLD_MMCWP __reg16(PLD_BASE + 0x4012)
  51. #define PLD_MMCWDATA __reg16(PLD_BASE + 0x5000)
  52. #define PLD_MMCRDATA __reg16(PLD_BASE + 0x6000)
  53. #define PLD_MMCCMDDATA __reg16(PLD_BASE + 0x7000)
  54. #define PLD_MMCRSPDATA __reg16(PLD_BASE + 0x7006)
  55. /* ICU
  56. * ICUISTS: status register
  57. * ICUIREQ0: request register
  58. * ICUIREQ1: request register
  59. * ICUCR3: control register for CFIREQ# interrupt
  60. * ICUCR4: control register for CFC Card insert interrupt
  61. * ICUCR5: control register for CFC Card eject interrupt
  62. * ICUCR6: control register for external interrupt
  63. * ICUCR11: control register for MMC Card insert/eject interrupt
  64. * ICUCR13: control register for SC error interrupt
  65. * ICUCR14: control register for SC receive interrupt
  66. * ICUCR15: control register for SC send interrupt
  67. * ICUCR16: control register for SIO0 receive interrupt
  68. * ICUCR17: control register for SIO0 send interrupt
  69. */
  70. #if !defined(CONFIG_PLAT_USRV)
  71. #define PLD_IRQ_INT0 (M32700UT_PLD_IRQ_BASE + 0) /* None */
  72. #define PLD_IRQ_INT1 (M32700UT_PLD_IRQ_BASE + 1) /* reserved */
  73. #define PLD_IRQ_INT2 (M32700UT_PLD_IRQ_BASE + 2) /* reserved */
  74. #define PLD_IRQ_CFIREQ (M32700UT_PLD_IRQ_BASE + 3) /* CF IREQ */
  75. #define PLD_IRQ_CFC_INSERT (M32700UT_PLD_IRQ_BASE + 4) /* CF Insert */
  76. #define PLD_IRQ_CFC_EJECT (M32700UT_PLD_IRQ_BASE + 5) /* CF Eject */
  77. #define PLD_IRQ_EXINT (M32700UT_PLD_IRQ_BASE + 6) /* EXINT */
  78. #define PLD_IRQ_INT7 (M32700UT_PLD_IRQ_BASE + 7) /* reserved */
  79. #define PLD_IRQ_INT8 (M32700UT_PLD_IRQ_BASE + 8) /* reserved */
  80. #define PLD_IRQ_INT9 (M32700UT_PLD_IRQ_BASE + 9) /* reserved */
  81. #define PLD_IRQ_INT10 (M32700UT_PLD_IRQ_BASE + 10) /* reserved */
  82. #define PLD_IRQ_MMCCARD (M32700UT_PLD_IRQ_BASE + 11) /* MMC Insert/Eject */
  83. #define PLD_IRQ_INT12 (M32700UT_PLD_IRQ_BASE + 12) /* reserved */
  84. #define PLD_IRQ_SC_ERROR (M32700UT_PLD_IRQ_BASE + 13) /* SC error */
  85. #define PLD_IRQ_SC_RCV (M32700UT_PLD_IRQ_BASE + 14) /* SC receive */
  86. #define PLD_IRQ_SC_SND (M32700UT_PLD_IRQ_BASE + 15) /* SC send */
  87. #define PLD_IRQ_SIO0_RCV (M32700UT_PLD_IRQ_BASE + 16) /* SIO receive */
  88. #define PLD_IRQ_SIO0_SND (M32700UT_PLD_IRQ_BASE + 17) /* SIO send */
  89. #define PLD_IRQ_INT18 (M32700UT_PLD_IRQ_BASE + 18) /* reserved */
  90. #define PLD_IRQ_INT19 (M32700UT_PLD_IRQ_BASE + 19) /* reserved */
  91. #define PLD_IRQ_INT20 (M32700UT_PLD_IRQ_BASE + 20) /* reserved */
  92. #define PLD_IRQ_INT21 (M32700UT_PLD_IRQ_BASE + 21) /* reserved */
  93. #define PLD_IRQ_INT22 (M32700UT_PLD_IRQ_BASE + 22) /* reserved */
  94. #define PLD_IRQ_INT23 (M32700UT_PLD_IRQ_BASE + 23) /* reserved */
  95. #define PLD_IRQ_INT24 (M32700UT_PLD_IRQ_BASE + 24) /* reserved */
  96. #define PLD_IRQ_INT25 (M32700UT_PLD_IRQ_BASE + 25) /* reserved */
  97. #define PLD_IRQ_INT26 (M32700UT_PLD_IRQ_BASE + 26) /* reserved */
  98. #define PLD_IRQ_INT27 (M32700UT_PLD_IRQ_BASE + 27) /* reserved */
  99. #define PLD_IRQ_INT28 (M32700UT_PLD_IRQ_BASE + 28) /* reserved */
  100. #define PLD_IRQ_INT29 (M32700UT_PLD_IRQ_BASE + 29) /* reserved */
  101. #define PLD_IRQ_INT30 (M32700UT_PLD_IRQ_BASE + 30) /* reserved */
  102. #define PLD_IRQ_INT31 (M32700UT_PLD_IRQ_BASE + 31) /* reserved */
  103. #else /* CONFIG_PLAT_USRV */
  104. #define PLD_IRQ_INT0 (M32700UT_PLD_IRQ_BASE + 0) /* None */
  105. #define PLD_IRQ_INT1 (M32700UT_PLD_IRQ_BASE + 1) /* reserved */
  106. #define PLD_IRQ_INT2 (M32700UT_PLD_IRQ_BASE + 2) /* reserved */
  107. #define PLD_IRQ_CF0 (M32700UT_PLD_IRQ_BASE + 3) /* CF0# */
  108. #define PLD_IRQ_CF1 (M32700UT_PLD_IRQ_BASE + 4) /* CF1# */
  109. #define PLD_IRQ_CF2 (M32700UT_PLD_IRQ_BASE + 5) /* CF2# */
  110. #define PLD_IRQ_CF3 (M32700UT_PLD_IRQ_BASE + 6) /* CF3# */
  111. #define PLD_IRQ_CF4 (M32700UT_PLD_IRQ_BASE + 7) /* CF4# */
  112. #define PLD_IRQ_INT8 (M32700UT_PLD_IRQ_BASE + 8) /* reserved */
  113. #define PLD_IRQ_INT9 (M32700UT_PLD_IRQ_BASE + 9) /* reserved */
  114. #define PLD_IRQ_INT10 (M32700UT_PLD_IRQ_BASE + 10) /* reserved */
  115. #define PLD_IRQ_INT11 (M32700UT_PLD_IRQ_BASE + 11) /* reserved */
  116. #define PLD_IRQ_UART0 (M32700UT_PLD_IRQ_BASE + 12) /* UARTIRQ0 */
  117. #define PLD_IRQ_UART1 (M32700UT_PLD_IRQ_BASE + 13) /* UARTIRQ1 */
  118. #define PLD_IRQ_INT14 (M32700UT_PLD_IRQ_BASE + 14) /* reserved */
  119. #define PLD_IRQ_INT15 (M32700UT_PLD_IRQ_BASE + 15) /* reserved */
  120. #define PLD_IRQ_SNDINT (M32700UT_PLD_IRQ_BASE + 16) /* SNDINT# */
  121. #define PLD_IRQ_INT17 (M32700UT_PLD_IRQ_BASE + 17) /* reserved */
  122. #define PLD_IRQ_INT18 (M32700UT_PLD_IRQ_BASE + 18) /* reserved */
  123. #define PLD_IRQ_INT19 (M32700UT_PLD_IRQ_BASE + 19) /* reserved */
  124. #define PLD_IRQ_INT20 (M32700UT_PLD_IRQ_BASE + 20) /* reserved */
  125. #define PLD_IRQ_INT21 (M32700UT_PLD_IRQ_BASE + 21) /* reserved */
  126. #define PLD_IRQ_INT22 (M32700UT_PLD_IRQ_BASE + 22) /* reserved */
  127. #define PLD_IRQ_INT23 (M32700UT_PLD_IRQ_BASE + 23) /* reserved */
  128. #define PLD_IRQ_INT24 (M32700UT_PLD_IRQ_BASE + 24) /* reserved */
  129. #define PLD_IRQ_INT25 (M32700UT_PLD_IRQ_BASE + 25) /* reserved */
  130. #define PLD_IRQ_INT26 (M32700UT_PLD_IRQ_BASE + 26) /* reserved */
  131. #define PLD_IRQ_INT27 (M32700UT_PLD_IRQ_BASE + 27) /* reserved */
  132. #define PLD_IRQ_INT28 (M32700UT_PLD_IRQ_BASE + 28) /* reserved */
  133. #define PLD_IRQ_INT29 (M32700UT_PLD_IRQ_BASE + 29) /* reserved */
  134. #define PLD_IRQ_INT30 (M32700UT_PLD_IRQ_BASE + 30) /* reserved */
  135. #endif /* CONFIG_PLAT_USRV */