pci-st40.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. /*
  2. * Copyright (C) 2001 David J. Mckay (david.mckay@st.com)
  3. *
  4. * May be copied or modified under the terms of the GNU General Public
  5. * License. See linux/COPYING for more information.
  6. *
  7. * Defintions for the ST40 PCI hardware.
  8. */
  9. #ifndef __PCI_ST40_H__
  10. #define __PCI_ST40_H__
  11. #define ST40PCI_VCR_STATUS 0x00
  12. #define ST40PCI_VCR_VERSION 0x08
  13. #define ST40PCI_CR 0x10
  14. #define CR_SOFT_RESET (1<<12)
  15. #define CR_PFCS (1<<11)
  16. #define CR_PFE (1<<9)
  17. #define CR_BMAM (1<<6)
  18. #define CR_HOST (1<<5)
  19. #define CR_CLKEN (1<<4)
  20. #define CR_SOCS (1<<3)
  21. #define CR_IOCS (1<<2)
  22. #define CR_RSTCTL (1<<1)
  23. #define CR_CFINT (1<<0)
  24. #define CR_LOCK_MASK 0x5a000000
  25. #define ST40PCI_LSR0 0X14
  26. #define ST40PCI_LAR0 0x1c
  27. #define ST40PCI_INT 0x24
  28. #define INT_MNLTDIM (1<<15)
  29. #define INT_TTADI (1<<14)
  30. #define INT_TMTO (1<<9)
  31. #define INT_MDEI (1<<8)
  32. #define INT_APEDI (1<<7)
  33. #define INT_SDI (1<<6)
  34. #define INT_DPEITW (1<<5)
  35. #define INT_PEDITR (1<<4)
  36. #define INT_TADIM (1<<3)
  37. #define INT_MADIM (1<<2)
  38. #define INT_MWPDI (1<<1)
  39. #define INT_MRDPEI (1<<0)
  40. #define ST40PCI_INTM 0x28
  41. #define ST40PCI_AIR 0x2c
  42. #define ST40PCI_CIR 0x30
  43. #define CIR_PIOTEM (1<<31)
  44. #define CIR_RWTET (1<<26)
  45. #define ST40PCI_AINT 0x40
  46. #define AINT_MBI (1<<13)
  47. #define AINT_TBTOI (1<<12)
  48. #define AINT_MBTOI (1<<11)
  49. #define AINT_TAI (1<<3)
  50. #define AINT_MAI (1<<2)
  51. #define AINT_RDPEI (1<<1)
  52. #define AINT_WDPE (1<<0)
  53. #define ST40PCI_AINTM 0x44
  54. #define ST40PCI_BMIR 0x48
  55. #define ST40PCI_PAR 0x4c
  56. #define ST40PCI_MBR 0x50
  57. #define ST40PCI_IOBR 0x54
  58. #define ST40PCI_PINT 0x58
  59. #define ST40PCI_PINTM 0x5c
  60. #define ST40PCI_MBMR 0x70
  61. #define ST40PCI_IOBMR 0x74
  62. #define ST40PCI_PDR 0x78
  63. /* H8 specific registers start here */
  64. #define ST40PCI_WCBAR 0x7c
  65. #define ST40PCI_LOCCFG_UNLOCK 0x34
  66. #define ST40PCI_RBAR0 0x100
  67. #define ST40PCI_RSR0 0x104
  68. #define ST40PCI_RLAR0 0x108
  69. #define ST40PCI_RBAR1 0x110
  70. #define ST40PCI_RSR1 0x114
  71. #define ST40PCI_RLAR1 0x118
  72. #define ST40PCI_RBAR2 0x120
  73. #define ST40PCI_RSR2 0x124
  74. #define ST40PCI_RLAR2 0x128
  75. #define ST40PCI_RBAR3 0x130
  76. #define ST40PCI_RSR3 0x134
  77. #define ST40PCI_RLAR3 0x138
  78. #define ST40PCI_RBAR4 0x140
  79. #define ST40PCI_RSR4 0x144
  80. #define ST40PCI_RLAR4 0x148
  81. #define ST40PCI_RBAR5 0x150
  82. #define ST40PCI_RSR5 0x154
  83. #define ST40PCI_RLAR5 0x158
  84. #define ST40PCI_RBAR6 0x160
  85. #define ST40PCI_RSR6 0x164
  86. #define ST40PCI_RLAR6 0x168
  87. #define ST40PCI_RBAR7 0x170
  88. #define ST40PCI_RSR7 0x174
  89. #define ST40PCI_RLAR7 0x178
  90. #define ST40PCI_RBAR(n) (0x100+(0x10*(n)))
  91. #define ST40PCI_RSR(n) (0x104+(0x10*(n)))
  92. #define ST40PCI_RLAR(n) (0x108+(0x10*(n)))
  93. #define ST40PCI_PERF 0x80
  94. #define PERF_MASTER_WRITE_POSTING (1<<4)
  95. /* H8 specific registers end here */
  96. /* These are configs space registers */
  97. #define ST40PCI_CSR_VID 0x10000
  98. #define ST40PCI_CSR_DID 0x10002
  99. #define ST40PCI_CSR_CMD 0x10004
  100. #define ST40PCI_CSR_STATUS 0x10006
  101. #define ST40PCI_CSR_MBAR0 0x10010
  102. #define ST40PCI_CSR_TRDY 0x10040
  103. #define ST40PCI_CSR_RETRY 0x10041
  104. #define ST40PCI_CSR_MIT 0x1000d
  105. #define ST40_IO_ADDR 0xb6000000
  106. #endif /* __PCI_ST40_H__ */