immap_8220.h 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  1. /*
  2. * MPC8220 Internal Memory Map
  3. * Copyright (c) 2004 TsiChung Liew (Tsi-Chung.Liew@freescale.com)
  4. *
  5. * The Internal Memory Map of the 8220.
  6. *
  7. */
  8. #ifndef __IMMAP_MPC8220__
  9. #define __IMMAP_MPC8220__
  10. /*
  11. * System configuration registers.
  12. */
  13. typedef struct sys_conf {
  14. u16 mbar; /* 0x00 */
  15. u16 res1;
  16. u16 res2; /* 0x04 */
  17. u16 sdramds;
  18. u32 res3[6]; /* 0x08 */
  19. u32 cscfg[6]; /* 0x20 */
  20. u32 res4[2]; /* 0x38 */
  21. u8 res5[3]; /* 0x40 */
  22. u8 rstctrl;
  23. u8 res6[3]; /* 0x44 */
  24. u8 rststat;
  25. u32 res7[2]; /* 0x48 */
  26. u32 jtagid; /* 0x50 */
  27. } sysconf8220_t;
  28. /*
  29. * Memory controller registers.
  30. */
  31. typedef struct mem_ctlr {
  32. ushort mode; /* 0x100 */
  33. ushort res1;
  34. u32 ctrl; /* 0x104 */
  35. u32 cfg1; /* 0x108 */
  36. u32 cfg2; /* 0x10c */
  37. } memctl8220_t;
  38. /*
  39. * XLB Arbitration registers
  40. */
  41. typedef struct xlb_arb
  42. {
  43. uint res1[16]; /* 0x200 */
  44. uint config; /* 0x240 */
  45. uint version; /* 0x244 */
  46. uint status; /* 0x248 */
  47. uint intEnable; /* 0x24c */
  48. uint addrCap; /* 0x250 */
  49. uint busSigCap; /* 0x254 */
  50. uint addrTenTimeOut; /* 0x258 */
  51. uint dataTenTimeOut; /* 0x25c */
  52. uint busActTimeOut; /* 0x260 */
  53. uint mastPriEn; /* 0x264 */
  54. uint mastPriority; /* 0x268 */
  55. uint baseAddr; /* 0x26c */
  56. } xlbarb8220_t;
  57. /*
  58. * Flexbus registers
  59. */
  60. typedef struct flexbus
  61. {
  62. ushort csar0; /* 0x00 */
  63. ushort res1;
  64. uint csmr0; /* 0x04 */
  65. uint cscr0; /* 0x08 */
  66. ushort csar1; /* 0x0c */
  67. ushort res2;
  68. uint csmr1; /* 0x10 */
  69. uint cscr1; /* 0x14 */
  70. ushort csar2; /* 0x18 */
  71. ushort res3;
  72. uint csmr2; /* 0x1c */
  73. uint cscr2; /* 0x20 */
  74. ushort csar3; /* 0x24 */
  75. ushort res4;
  76. uint csmr3; /* 0x28 */
  77. uint cscr3; /* 0x2c */
  78. ushort csar4; /* 0x30 */
  79. ushort res5;
  80. uint csmr4; /* 0x34 */
  81. uint cscr4; /* 0x38 */
  82. ushort csar5; /* 0x3c */
  83. ushort res6;
  84. uint csmr5; /* 0x40 */
  85. uint cscr5; /* 0x44 */
  86. } flexbus8220_t;
  87. /*
  88. * GPIO registers
  89. */
  90. typedef struct gpio
  91. {
  92. u32 out; /* 0x00 */
  93. u32 obs; /* 0x04 */
  94. u32 obc; /* 0x08 */
  95. u32 obt; /* 0x0c */
  96. u32 en; /* 0x10 */
  97. u32 ebs; /* 0x14 */
  98. u32 ebc; /* 0x18 */
  99. u32 ebt; /* 0x1c */
  100. u32 mc; /* 0x20 */
  101. u32 st; /* 0x24 */
  102. u32 intr; /* 0x28 */
  103. } gpio8220_t;
  104. /*
  105. * General Purpose Timer registers
  106. */
  107. typedef struct gptimer
  108. {
  109. u8 OCPW;
  110. u8 OctIct;
  111. u8 Control;
  112. u8 Mode;
  113. u16 Prescl; /* Prescale */
  114. u16 Count; /* Count */
  115. u16 PwmWid; /* PWM Width */
  116. u8 PwmOp; /* Output Polarity */
  117. u8 PwmLd; /* Immediate Update */
  118. u16 Capture; /* Capture internal counter */
  119. u8 OvfPin; /* Ovf and Pin */
  120. u8 Int; /* Interrupts */
  121. } gptmr8220_t;
  122. /*
  123. * PSC registers
  124. */
  125. typedef struct psc
  126. {
  127. u32 mr1_2; /* 0x00 Mode reg 1 & 2 */
  128. u32 sr_csr; /* 0x04 Status/Clock Select reg */
  129. u32 cr; /* 0x08 Command reg */
  130. u8 xmitbuf[4]; /* 0x0c Receive/Transmit Buffer */
  131. u32 ipcr_acr; /* 0x10 Input Port Change/Auxiliary Control reg */
  132. u32 isr_imr; /* 0x14 Interrupt Status/Mask reg */
  133. u32 ctur; /* 0x18 Counter Timer Upper reg */
  134. u32 ctlr; /* 0x1c Counter Timer Lower reg */
  135. u32 rsvd1[4]; /* 0x20 ... 0x2c */
  136. u32 ivr; /* 0x30 Interrupt Vector reg */
  137. u32 ipr; /* 0x34 Input Port reg */
  138. u32 opsetr; /* 0x38 Output Port Set reg */
  139. u32 opresetr; /* 0x3c Output Port Reset reg */
  140. u32 sicr; /* 0x40 PSC/IrDA control reg */
  141. u32 ircr1; /* 0x44 IrDA control reg 1*/
  142. u32 ircr2; /* 0x48 IrDA control reg 2*/
  143. u32 irsdr; /* 0x4c IrDA SIR Divide reg */
  144. u32 irmdr; /* 0x50 IrDA MIR Divide reg */
  145. u32 irfdr; /* 0x54 PSC IrDA FIR Divide reg */
  146. u32 rfnum; /* 0x58 RX-FIFO counter */
  147. u32 txnum; /* 0x5c TX-FIFO counter */
  148. u32 rfdata; /* 0x60 RX-FIFO data */
  149. u32 rfstat; /* 0x64 RX-FIFO status */
  150. u32 rfcntl; /* 0x68 RX-FIFO control */
  151. u32 rfalarm; /* 0x6c RX-FIFO alarm */
  152. u32 rfrptr; /* 0x70 RX-FIFO read pointer */
  153. u32 rfwptr; /* 0x74 RX-FIFO write pointer */
  154. u32 rflfrptr; /* 0x78 RX-FIFO last read frame pointer */
  155. u32 rflfwptr; /* 0x7c RX-FIFO last write frame pointer */
  156. u32 tfdata; /* 0x80 TX-FIFO data */
  157. u32 tfstat; /* 0x84 TX-FIFO status */
  158. u32 tfcntl; /* 0x88 TX-FIFO control */
  159. u32 tfalarm; /* 0x8c TX-FIFO alarm */
  160. u32 tfrptr; /* 0x90 TX-FIFO read pointer */
  161. u32 tfwptr; /* 0x94 TX-FIFO write pointer */
  162. u32 tflfrptr; /* 0x98 TX-FIFO last read frame pointer */
  163. u32 tflfwptr; /* 0x9c TX-FIFO last write frame pointer */
  164. } psc8220_t;
  165. /*
  166. * Interrupt Controller registers
  167. */
  168. typedef struct interrupt_controller {
  169. } intctl8220_t;
  170. /* Fast controllers
  171. */
  172. /*
  173. * I2C registers
  174. */
  175. typedef struct i2c
  176. {
  177. u8 adr; /* 0x00 */
  178. u8 res1[3];
  179. u8 fdr; /* 0x04 */
  180. u8 res2[3];
  181. u8 cr; /* 0x08 */
  182. u8 res3[3];
  183. u8 sr; /* 0x0C */
  184. u8 res4[3];
  185. u8 dr; /* 0x10 */
  186. u8 res5[3];
  187. u32 reserved0; /* 0x14 */
  188. u32 reserved1; /* 0x18 */
  189. u32 reserved2; /* 0x1c */
  190. u8 icr; /* 0x20 */
  191. u8 res6[3];
  192. } i2c8220_t;
  193. /*
  194. * Port Configuration Registers
  195. */
  196. typedef struct pcfg
  197. {
  198. uint pcfg0; /* 0x00 */
  199. uint pcfg1; /* 0x04 */
  200. uint pcfg2; /* 0x08 */
  201. uint pcfg3; /* 0x0c */
  202. } pcfg8220_t;
  203. /* ...and the whole thing wrapped up....
  204. */
  205. typedef struct immap {
  206. sysconf8220_t im_sysconf; /* System Configuration */
  207. memctl8220_t im_memctl; /* Memory Controller */
  208. xlbarb8220_t im_xlbarb; /* XLB Arbitration */
  209. psc8220_t im_psc; /* PSC controller */
  210. flexbus8220_t im_fb; /* FlexBus Controller */
  211. i2c8220_t im_i2c; /* I2C control/status */
  212. pcfg8220_t im_pcfg; /* Port configuration */
  213. } immap_t;
  214. #endif /* __IMMAP_MPC8220__ */