hptiop.txt 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. HIGHPOINT ROCKETRAID 3xxx/4xxx ADAPTER DRIVER (hptiop)
  2. Controller Register Map
  3. -------------------------
  4. For RR44xx Intel IOP based adapters, the controller IOP is accessed via PCI BAR0 and BAR2:
  5. BAR0 offset Register
  6. 0x11C5C Link Interface IRQ Set
  7. 0x11C60 Link Interface IRQ Clear
  8. BAR2 offset Register
  9. 0x10 Inbound Message Register 0
  10. 0x14 Inbound Message Register 1
  11. 0x18 Outbound Message Register 0
  12. 0x1C Outbound Message Register 1
  13. 0x20 Inbound Doorbell Register
  14. 0x24 Inbound Interrupt Status Register
  15. 0x28 Inbound Interrupt Mask Register
  16. 0x30 Outbound Interrupt Status Register
  17. 0x34 Outbound Interrupt Mask Register
  18. 0x40 Inbound Queue Port
  19. 0x44 Outbound Queue Port
  20. For Intel IOP based adapters, the controller IOP is accessed via PCI BAR0:
  21. BAR0 offset Register
  22. 0x10 Inbound Message Register 0
  23. 0x14 Inbound Message Register 1
  24. 0x18 Outbound Message Register 0
  25. 0x1C Outbound Message Register 1
  26. 0x20 Inbound Doorbell Register
  27. 0x24 Inbound Interrupt Status Register
  28. 0x28 Inbound Interrupt Mask Register
  29. 0x30 Outbound Interrupt Status Register
  30. 0x34 Outbound Interrupt Mask Register
  31. 0x40 Inbound Queue Port
  32. 0x44 Outbound Queue Port
  33. For Marvell IOP based adapters, the IOP is accessed via PCI BAR0 and BAR1:
  34. BAR0 offset Register
  35. 0x20400 Inbound Doorbell Register
  36. 0x20404 Inbound Interrupt Mask Register
  37. 0x20408 Outbound Doorbell Register
  38. 0x2040C Outbound Interrupt Mask Register
  39. BAR1 offset Register
  40. 0x0 Inbound Queue Head Pointer
  41. 0x4 Inbound Queue Tail Pointer
  42. 0x8 Outbound Queue Head Pointer
  43. 0xC Outbound Queue Tail Pointer
  44. 0x10 Inbound Message Register
  45. 0x14 Outbound Message Register
  46. 0x40-0x1040 Inbound Queue
  47. 0x1040-0x2040 Outbound Queue
  48. I/O Request Workflow
  49. ----------------------
  50. All queued requests are handled via inbound/outbound queue port.
  51. A request packet can be allocated in either IOP or host memory.
  52. To send a request to the controller:
  53. - Get a free request packet by reading the inbound queue port or
  54. allocate a free request in host DMA coherent memory.
  55. The value returned from the inbound queue port is an offset
  56. relative to the IOP BAR0.
  57. Requests allocated in host memory must be aligned on 32-bytes boundary.
  58. - Fill the packet.
  59. - Post the packet to IOP by writing it to inbound queue. For requests
  60. allocated in IOP memory, write the offset to inbound queue port. For
  61. requests allocated in host memory, write (0x80000000|(bus_addr>>5))
  62. to the inbound queue port.
  63. - The IOP process the request. When the request is completed, it
  64. will be put into outbound queue. An outbound interrupt will be
  65. generated.
  66. For requests allocated in IOP memory, the request offset is posted to
  67. outbound queue.
  68. For requests allocated in host memory, (0x80000000|(bus_addr>>5))
  69. is posted to the outbound queue. If IOP_REQUEST_FLAG_OUTPUT_CONTEXT
  70. flag is set in the request, the low 32-bit context value will be
  71. posted instead.
  72. - The host read the outbound queue and complete the request.
  73. For requests allocated in IOP memory, the host driver free the request
  74. by writing it to the outbound queue.
  75. Non-queued requests (reset/flush etc) can be sent via inbound message
  76. register 0. An outbound message with the same value indicates the completion
  77. of an inbound message.
  78. User-level Interface
  79. ---------------------
  80. The driver exposes following sysfs attributes:
  81. NAME R/W Description
  82. driver-version R driver version string
  83. firmware-version R firmware version string
  84. -----------------------------------------------------------------------------
  85. Copyright (C) 2006-2009 HighPoint Technologies, Inc. All Rights Reserved.
  86. This file is distributed in the hope that it will be useful,
  87. but WITHOUT ANY WARRANTY; without even the implied warranty of
  88. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  89. GNU General Public License for more details.
  90. linux@highpoint-tech.com
  91. http://www.highpoint-tech.com