hptiop.txt 3.7 KB

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