ssi.h 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. /*
  2. * SSI Internal Memory Map
  3. *
  4. * Copyright (C) 2004-2007 Freescale Semiconductor, Inc.
  5. * TsiChung Liew (Tsi-Chung.Liew@freescale.com)
  6. *
  7. * See file CREDITS for list of people who contributed to this
  8. * project.
  9. *
  10. * This program is free software; you can redistribute it and/or
  11. * modify it under the terms of the GNU General Public License as
  12. * published by the Free Software Foundation; either version 2 of
  13. * the License, or (at your option) any later version.
  14. *
  15. * This program is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU General Public License
  21. * along with this program; if not, write to the Free Software
  22. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  23. * MA 02111-1307 USA
  24. */
  25. #ifndef __SSI_H__
  26. #define __SSI_H__
  27. /*********************************************************************
  28. * Synchronous Serial Interface (SSI)
  29. *********************************************************************/
  30. typedef struct ssi {
  31. u32 tx0;
  32. u32 tx1;
  33. u32 rx0;
  34. u32 rx1;
  35. u32 cr;
  36. u32 isr;
  37. u32 ier;
  38. u32 tcr;
  39. u32 rcr;
  40. u32 ccr;
  41. u8 resv0[0x4];
  42. u32 fcsr;
  43. u8 resv1[0x8];
  44. u32 acr;
  45. u32 acadd;
  46. u32 acdat;
  47. u32 atag;
  48. u32 tmask;
  49. u32 rmask;
  50. } ssi_t;
  51. /*********************************************************************
  52. * Synchronous Serial Interface (SSI)
  53. *********************************************************************/
  54. /* Bit definitions and macros for SSI_CR */
  55. #define SSI_CR_CIS (0x00000200)
  56. #define SSI_CR_TCH (0x00000100)
  57. #define SSI_CR_MCE (0x00000080)
  58. #define SSI_CR_I2S_SLAVE (0x00000040)
  59. #define SSI_CR_I2S_MASTER (0x00000020)
  60. #define SSI_CR_I2S_NORMAL (0x00000000)
  61. #define SSI_CR_SYN (0x00000010)
  62. #define SSI_CR_NET (0x00000008)
  63. #define SSI_CR_RE (0x00000004)
  64. #define SSI_CR_TE (0x00000002)
  65. #define SSI_CR_SSI_EN (0x00000001)
  66. /* Bit definitions and macros for SSI_ISR */
  67. #define SSI_ISR_CMDAU (0x00040000)
  68. #define SSI_ISR_CMDDU (0x00020000)
  69. #define SSI_ISR_RXT (0x00010000)
  70. #define SSI_ISR_RDR1 (0x00008000)
  71. #define SSI_ISR_RDR0 (0x00004000)
  72. #define SSI_ISR_TDE1 (0x00002000)
  73. #define SSI_ISR_TDE0 (0x00001000)
  74. #define SSI_ISR_ROE1 (0x00000800)
  75. #define SSI_ISR_ROE0 (0x00000400)
  76. #define SSI_ISR_TUE1 (0x00000200)
  77. #define SSI_ISR_TUE0 (0x00000100)
  78. #define SSI_ISR_TFS (0x00000080)
  79. #define SSI_ISR_RFS (0x00000040)
  80. #define SSI_ISR_TLS (0x00000020)
  81. #define SSI_ISR_RLS (0x00000010)
  82. #define SSI_ISR_RFF1 (0x00000008)
  83. #define SSI_ISR_RFF0 (0x00000004)
  84. #define SSI_ISR_TFE1 (0x00000002)
  85. #define SSI_ISR_TFE0 (0x00000001)
  86. /* Bit definitions and macros for SSI_IER */
  87. #define SSI_IER_RDMAE (0x00400000)
  88. #define SSI_IER_RIE (0x00200000)
  89. #define SSI_IER_TDMAE (0x00100000)
  90. #define SSI_IER_TIE (0x00080000)
  91. #define SSI_IER_CMDAU (0x00040000)
  92. #define SSI_IER_CMDU (0x00020000)
  93. #define SSI_IER_RXT (0x00010000)
  94. #define SSI_IER_RDR1 (0x00008000)
  95. #define SSI_IER_RDR0 (0x00004000)
  96. #define SSI_IER_TDE1 (0x00002000)
  97. #define SSI_IER_TDE0 (0x00001000)
  98. #define SSI_IER_ROE1 (0x00000800)
  99. #define SSI_IER_ROE0 (0x00000400)
  100. #define SSI_IER_TUE1 (0x00000200)
  101. #define SSI_IER_TUE0 (0x00000100)
  102. #define SSI_IER_TFS (0x00000080)
  103. #define SSI_IER_RFS (0x00000040)
  104. #define SSI_IER_TLS (0x00000020)
  105. #define SSI_IER_RLS (0x00000010)
  106. #define SSI_IER_RFF1 (0x00000008)
  107. #define SSI_IER_RFF0 (0x00000004)
  108. #define SSI_IER_TFE1 (0x00000002)
  109. #define SSI_IER_TFE0 (0x00000001)
  110. /* Bit definitions and macros for SSI_TCR */
  111. #define SSI_TCR_TXBIT0 (0x00000200)
  112. #define SSI_TCR_TFEN1 (0x00000100)
  113. #define SSI_TCR_TFEN0 (0x00000080)
  114. #define SSI_TCR_TFDIR (0x00000040)
  115. #define SSI_TCR_TXDIR (0x00000020)
  116. #define SSI_TCR_TSHFD (0x00000010)
  117. #define SSI_TCR_TSCKP (0x00000008)
  118. #define SSI_TCR_TFSI (0x00000004)
  119. #define SSI_TCR_TFSL (0x00000002)
  120. #define SSI_TCR_TEFS (0x00000001)
  121. /* Bit definitions and macros for SSI_RCR */
  122. #define SSI_RCR_RXEXT (0x00000400)
  123. #define SSI_RCR_RXBIT0 (0x00000200)
  124. #define SSI_RCR_RFEN1 (0x00000100)
  125. #define SSI_RCR_RFEN0 (0x00000080)
  126. #define SSI_RCR_RSHFD (0x00000010)
  127. #define SSI_RCR_RSCKP (0x00000008)
  128. #define SSI_RCR_RFSI (0x00000004)
  129. #define SSI_RCR_RFSL (0x00000002)
  130. #define SSI_RCR_REFS (0x00000001)
  131. /* Bit definitions and macros for SSI_CCR */
  132. #define SSI_CCR_DIV2 (0x00040000)
  133. #define SSI_CCR_PSR (0x00020000)
  134. #define SSI_CCR_WL(x) (((x)&0x0000000F)<<13)
  135. #define SSI_CCR_DC(x) (((x)&0x0000001F)<<8)
  136. #define SSI_CCR_PM(x) ((x)&0x000000FF)
  137. /* Bit definitions and macros for SSI_FCSR */
  138. #define SSI_FCSR_RFCNT1(x) (((x)&0x0000000F)<<28)
  139. #define SSI_FCSR_TFCNT1(x) (((x)&0x0000000F)<<24)
  140. #define SSI_FCSR_RFWM1(x) (((x)&0x0000000F)<<20)
  141. #define SSI_FCSR_TFWM1(x) (((x)&0x0000000F)<<16)
  142. #define SSI_FCSR_RFCNT0(x) (((x)&0x0000000F)<<12)
  143. #define SSI_FCSR_TFCNT0(x) (((x)&0x0000000F)<<8)
  144. #define SSI_FCSR_RFWM0(x) (((x)&0x0000000F)<<4)
  145. #define SSI_FCSR_TFWM0(x) ((x)&0x0000000F)
  146. /* Bit definitions and macros for SSI_ACR */
  147. #define SSI_ACR_FRDIV(x) (((x)&0x0000003F)<<5)
  148. #define SSI_ACR_WR (0x00000010)
  149. #define SSI_ACR_RD (0x00000008)
  150. #define SSI_ACR_TIF (0x00000004)
  151. #define SSI_ACR_FV (0x00000002)
  152. #define SSI_ACR_AC97EN (0x00000001)
  153. /* Bit definitions and macros for SSI_ACADD */
  154. #define SSI_ACADD_SSI_ACADD(x) ((x)&0x0007FFFF)
  155. /* Bit definitions and macros for SSI_ACDAT */
  156. #define SSI_ACDAT_SSI_ACDAT(x) ((x)&0x0007FFFF)
  157. /* Bit definitions and macros for SSI_ATAG */
  158. #define SSI_ATAG_DDI_ATAG(x) ((x)&0x0000FFFF)
  159. #endif /* __SSI_H__ */