ppc83xx_pci.h 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. /* Created by Tony Li <tony.li@freescale.com>
  2. * Copyright (c) 2005 freescale semiconductor
  3. *
  4. * This program is free software; you can redistribute it and/or modify it
  5. * under the terms of the GNU General Public License as published by the
  6. * Free Software Foundation; either version 2 of the License, or (at your
  7. * option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful, but
  10. * WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. * General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License along
  15. * with this program; if not, write to the Free Software Foundation, Inc.,
  16. * 675 Mass Ave, Cambridge, MA 02139, USA.
  17. */
  18. #ifndef __PPC_SYSLIB_PPC83XX_PCI_H
  19. #define __PPC_SYSLIB_PPC83XX_PCI_H
  20. typedef struct immr_clk {
  21. u32 spmr; /* system PLL mode Register */
  22. u32 occr; /* output clock control Register */
  23. u32 sccr; /* system clock control Register */
  24. u8 res0[0xF4];
  25. } immr_clk_t;
  26. /*
  27. * Sequencer
  28. */
  29. typedef struct immr_ios {
  30. u32 potar0;
  31. u8 res0[4];
  32. u32 pobar0;
  33. u8 res1[4];
  34. u32 pocmr0;
  35. u8 res2[4];
  36. u32 potar1;
  37. u8 res3[4];
  38. u32 pobar1;
  39. u8 res4[4];
  40. u32 pocmr1;
  41. u8 res5[4];
  42. u32 potar2;
  43. u8 res6[4];
  44. u32 pobar2;
  45. u8 res7[4];
  46. u32 pocmr2;
  47. u8 res8[4];
  48. u32 potar3;
  49. u8 res9[4];
  50. u32 pobar3;
  51. u8 res10[4];
  52. u32 pocmr3;
  53. u8 res11[4];
  54. u32 potar4;
  55. u8 res12[4];
  56. u32 pobar4;
  57. u8 res13[4];
  58. u32 pocmr4;
  59. u8 res14[4];
  60. u32 potar5;
  61. u8 res15[4];
  62. u32 pobar5;
  63. u8 res16[4];
  64. u32 pocmr5;
  65. u8 res17[4];
  66. u8 res18[0x60];
  67. u32 pmcr;
  68. u8 res19[4];
  69. u32 dtcr;
  70. u8 res20[4];
  71. } immr_ios_t;
  72. #define POTAR_TA_MASK 0x000fffff
  73. #define POBAR_BA_MASK 0x000fffff
  74. #define POCMR_EN 0x80000000
  75. #define POCMR_IO 0x40000000 /* 0--memory space 1--I/O space */
  76. #define POCMR_SE 0x20000000 /* streaming enable */
  77. #define POCMR_DST 0x10000000 /* 0--PCI1 1--PCI2 */
  78. #define POCMR_CM_MASK 0x000fffff
  79. /*
  80. * PCI Controller Control and Status Registers
  81. */
  82. typedef struct immr_pcictrl {
  83. u32 esr;
  84. u32 ecdr;
  85. u32 eer;
  86. u32 eatcr;
  87. u32 eacr;
  88. u32 eeacr;
  89. u32 edlcr;
  90. u32 edhcr;
  91. u32 gcr;
  92. u32 ecr;
  93. u32 gsr;
  94. u8 res0[12];
  95. u32 pitar2;
  96. u8 res1[4];
  97. u32 pibar2;
  98. u32 piebar2;
  99. u32 piwar2;
  100. u8 res2[4];
  101. u32 pitar1;
  102. u8 res3[4];
  103. u32 pibar1;
  104. u32 piebar1;
  105. u32 piwar1;
  106. u8 res4[4];
  107. u32 pitar0;
  108. u8 res5[4];
  109. u32 pibar0;
  110. u8 res6[4];
  111. u32 piwar0;
  112. u8 res7[132];
  113. } immr_pcictrl_t;
  114. #define PITAR_TA_MASK 0x000fffff
  115. #define PIBAR_MASK 0xffffffff
  116. #define PIEBAR_EBA_MASK 0x000fffff
  117. #define PIWAR_EN 0x80000000
  118. #define PIWAR_PF 0x20000000
  119. #define PIWAR_RTT_MASK 0x000f0000
  120. #define PIWAR_RTT_NO_SNOOP 0x00040000
  121. #define PIWAR_RTT_SNOOP 0x00050000
  122. #define PIWAR_WTT_MASK 0x0000f000
  123. #define PIWAR_WTT_NO_SNOOP 0x00004000
  124. #define PIWAR_WTT_SNOOP 0x00005000
  125. #define PIWAR_IWS_MASK 0x0000003F
  126. #define PIWAR_IWS_4K 0x0000000B
  127. #define PIWAR_IWS_8K 0x0000000C
  128. #define PIWAR_IWS_16K 0x0000000D
  129. #define PIWAR_IWS_32K 0x0000000E
  130. #define PIWAR_IWS_64K 0x0000000F
  131. #define PIWAR_IWS_128K 0x00000010
  132. #define PIWAR_IWS_256K 0x00000011
  133. #define PIWAR_IWS_512K 0x00000012
  134. #define PIWAR_IWS_1M 0x00000013
  135. #define PIWAR_IWS_2M 0x00000014
  136. #define PIWAR_IWS_4M 0x00000015
  137. #define PIWAR_IWS_8M 0x00000016
  138. #define PIWAR_IWS_16M 0x00000017
  139. #define PIWAR_IWS_32M 0x00000018
  140. #define PIWAR_IWS_64M 0x00000019
  141. #define PIWAR_IWS_128M 0x0000001A
  142. #define PIWAR_IWS_256M 0x0000001B
  143. #define PIWAR_IWS_512M 0x0000001C
  144. #define PIWAR_IWS_1G 0x0000001D
  145. #define PIWAR_IWS_2G 0x0000001E
  146. #endif /* __PPC_SYSLIB_PPC83XX_PCI_H */