MC68332.h 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. /* include/asm-m68knommu/MC68332.h: '332 control registers
  2. *
  3. * Copyright (C) 1998 Kenneth Albanowski <kjahds@kjahds.com>,
  4. *
  5. */
  6. #ifndef _MC68332_H_
  7. #define _MC68332_H_
  8. #define BYTE_REF(addr) (*((volatile unsigned char*)addr))
  9. #define WORD_REF(addr) (*((volatile unsigned short*)addr))
  10. #define PORTE_ADDR 0xfffa11
  11. #define PORTE BYTE_REF(PORTE_ADDR)
  12. #define DDRE_ADDR 0xfffa15
  13. #define DDRE BYTE_REF(DDRE_ADDR)
  14. #define PEPAR_ADDR 0xfffa17
  15. #define PEPAR BYTE_REF(PEPAR_ADDR)
  16. #define PORTF_ADDR 0xfffa19
  17. #define PORTF BYTE_REF(PORTF_ADDR)
  18. #define DDRF_ADDR 0xfffa1d
  19. #define DDRF BYTE_REF(DDRF_ADDR)
  20. #define PFPAR_ADDR 0xfffa1f
  21. #define PFPAR BYTE_REF(PFPAR_ADDR)
  22. #define PORTQS_ADDR 0xfffc15
  23. #define PORTQS BYTE_REF(PORTQS_ADDR)
  24. #define DDRQS_ADDR 0xfffc17
  25. #define DDRQS BYTE_REF(DDRQS_ADDR)
  26. #define PQSPAR_ADDR 0xfffc16
  27. #define PQSPAR BYTE_REF(PQSPAR_ADDR)
  28. #define CSPAR0_ADDR 0xFFFA44
  29. #define CSPAR0 WORD_REF(CSPAR0_ADDR)
  30. #define CSPAR1_ADDR 0xFFFA46
  31. #define CSPAR1 WORD_REF(CSPAR1_ADDR)
  32. #define CSARBT_ADDR 0xFFFA48
  33. #define CSARBT WORD_REF(CSARBT_ADDR)
  34. #define CSOPBT_ADDR 0xFFFA4A
  35. #define CSOPBT WORD_REF(CSOPBT_ADDR)
  36. #define CSBAR0_ADDR 0xFFFA4C
  37. #define CSBAR0 WORD_REF(CSBAR0_ADDR)
  38. #define CSOR0_ADDR 0xFFFA4E
  39. #define CSOR0 WORD_REF(CSOR0_ADDR)
  40. #define CSBAR1_ADDR 0xFFFA50
  41. #define CSBAR1 WORD_REF(CSBAR1_ADDR)
  42. #define CSOR1_ADDR 0xFFFA52
  43. #define CSOR1 WORD_REF(CSOR1_ADDR)
  44. #define CSBAR2_ADDR 0xFFFA54
  45. #define CSBAR2 WORD_REF(CSBAR2_ADDR)
  46. #define CSOR2_ADDR 0xFFFA56
  47. #define CSOR2 WORD_REF(CSOR2_ADDR)
  48. #define CSBAR3_ADDR 0xFFFA58
  49. #define CSBAR3 WORD_REF(CSBAR3_ADDR)
  50. #define CSOR3_ADDR 0xFFFA5A
  51. #define CSOR3 WORD_REF(CSOR3_ADDR)
  52. #define CSBAR4_ADDR 0xFFFA5C
  53. #define CSBAR4 WORD_REF(CSBAR4_ADDR)
  54. #define CSOR4_ADDR 0xFFFA5E
  55. #define CSOR4 WORD_REF(CSOR4_ADDR)
  56. #define CSBAR5_ADDR 0xFFFA60
  57. #define CSBAR5 WORD_REF(CSBAR5_ADDR)
  58. #define CSOR5_ADDR 0xFFFA62
  59. #define CSOR5 WORD_REF(CSOR5_ADDR)
  60. #define CSBAR6_ADDR 0xFFFA64
  61. #define CSBAR6 WORD_REF(CSBAR6_ADDR)
  62. #define CSOR6_ADDR 0xFFFA66
  63. #define CSOR6 WORD_REF(CSOR6_ADDR)
  64. #define CSBAR7_ADDR 0xFFFA68
  65. #define CSBAR7 WORD_REF(CSBAR7_ADDR)
  66. #define CSOR7_ADDR 0xFFFA6A
  67. #define CSOR7 WORD_REF(CSOR7_ADDR)
  68. #define CSBAR8_ADDR 0xFFFA6C
  69. #define CSBAR8 WORD_REF(CSBAR8_ADDR)
  70. #define CSOR8_ADDR 0xFFFA6E
  71. #define CSOR8 WORD_REF(CSOR8_ADDR)
  72. #define CSBAR9_ADDR 0xFFFA70
  73. #define CSBAR9 WORD_REF(CSBAR9_ADDR)
  74. #define CSOR9_ADDR 0xFFFA72
  75. #define CSOR9 WORD_REF(CSOR9_ADDR)
  76. #define CSBAR10_ADDR 0xFFFA74
  77. #define CSBAR10 WORD_REF(CSBAR10_ADDR)
  78. #define CSOR10_ADDR 0xFFFA76
  79. #define CSOR10 WORD_REF(CSOR10_ADDR)
  80. #define CSOR_MODE_ASYNC 0x0000
  81. #define CSOR_MODE_SYNC 0x8000
  82. #define CSOR_MODE_MASK 0x8000
  83. #define CSOR_BYTE_DISABLE 0x0000
  84. #define CSOR_BYTE_UPPER 0x4000
  85. #define CSOR_BYTE_LOWER 0x2000
  86. #define CSOR_BYTE_BOTH 0x6000
  87. #define CSOR_BYTE_MASK 0x6000
  88. #define CSOR_RW_RSVD 0x0000
  89. #define CSOR_RW_READ 0x0800
  90. #define CSOR_RW_WRITE 0x1000
  91. #define CSOR_RW_BOTH 0x1800
  92. #define CSOR_RW_MASK 0x1800
  93. #define CSOR_STROBE_DS 0x0400
  94. #define CSOR_STROBE_AS 0x0000
  95. #define CSOR_STROBE_MASK 0x0400
  96. #define CSOR_DSACK_WAIT(x) (wait << 6)
  97. #define CSOR_DSACK_FTERM (14 << 6)
  98. #define CSOR_DSACK_EXTERNAL (15 << 6)
  99. #define CSOR_DSACK_MASK 0x03c0
  100. #define CSOR_SPACE_CPU 0x0000
  101. #define CSOR_SPACE_USER 0x0010
  102. #define CSOR_SPACE_SU 0x0020
  103. #define CSOR_SPACE_BOTH 0x0030
  104. #define CSOR_SPACE_MASK 0x0030
  105. #define CSOR_IPL_ALL 0x0000
  106. #define CSOR_IPL_PRIORITY(x) (x << 1)
  107. #define CSOR_IPL_MASK 0x000e
  108. #define CSOR_AVEC_ON 0x0001
  109. #define CSOR_AVEC_OFF 0x0000
  110. #define CSOR_AVEC_MASK 0x0001
  111. #define CSBAR_ADDR(x) ((addr >> 11) << 3)
  112. #define CSBAR_ADDR_MASK 0xfff8
  113. #define CSBAR_BLKSIZE_2K 0x0000
  114. #define CSBAR_BLKSIZE_8K 0x0001
  115. #define CSBAR_BLKSIZE_16K 0x0002
  116. #define CSBAR_BLKSIZE_64K 0x0003
  117. #define CSBAR_BLKSIZE_128K 0x0004
  118. #define CSBAR_BLKSIZE_256K 0x0005
  119. #define CSBAR_BLKSIZE_512K 0x0006
  120. #define CSBAR_BLKSIZE_1M 0x0007
  121. #define CSBAR_BLKSIZE_MASK 0x0007
  122. #define CSPAR_DISC 0
  123. #define CSPAR_ALT 1
  124. #define CSPAR_CS8 2
  125. #define CSPAR_CS16 3
  126. #define CSPAR_MASK 3
  127. #define CSPAR0_CSBOOT(x) (x << 0)
  128. #define CSPAR0_CS0(x) (x << 2)
  129. #define CSPAR0_CS1(x) (x << 4)
  130. #define CSPAR0_CS2(x) (x << 6)
  131. #define CSPAR0_CS3(x) (x << 8)
  132. #define CSPAR0_CS4(x) (x << 10)
  133. #define CSPAR0_CS5(x) (x << 12)
  134. #define CSPAR1_CS6(x) (x << 0)
  135. #define CSPAR1_CS7(x) (x << 2)
  136. #define CSPAR1_CS8(x) (x << 4)
  137. #define CSPAR1_CS9(x) (x << 6)
  138. #define CSPAR1_CS10(x) (x << 8)
  139. #endif