hptiop.txt 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. HIGHPOINT ROCKETRAID 3xxx RAID DRIVER (hptiop)
  2. Controller Register Map
  3. -------------------------
  4. 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. I/O Request Workflow
  18. ----------------------
  19. All queued requests are handled via inbound/outbound queue port.
  20. A request packet can be allocated in either IOP or host memory.
  21. To send a request to the controller:
  22. - Get a free request packet by reading the inbound queue port or
  23. allocate a free request in host DMA coherent memory.
  24. The value returned from the inbound queue port is an offset
  25. relative to the IOP BAR0.
  26. Requests allocated in host memory must be aligned on 32-bytes boundary.
  27. - Fill the packet.
  28. - Post the packet to IOP by writing it to inbound queue. For requests
  29. allocated in IOP memory, write the offset to inbound queue port. For
  30. requests allocated in host memory, write (0x80000000|(bus_addr>>5))
  31. to the inbound queue port.
  32. - The IOP process the request. When the request is completed, it
  33. will be put into outbound queue. An outbound interrupt will be
  34. generated.
  35. For requests allocated in IOP memory, the request offset is posted to
  36. outbound queue.
  37. For requests allocated in host memory, (0x80000000|(bus_addr>>5))
  38. is posted to the outbound queue. If IOP_REQUEST_FLAG_OUTPUT_CONTEXT
  39. flag is set in the request, the low 32-bit context value will be
  40. posted instead.
  41. - The host read the outbound queue and complete the request.
  42. For requests allocated in IOP memory, the host driver free the request
  43. by writing it to the outbound queue.
  44. Non-queued requests (reset/flush etc) can be sent via inbound message
  45. register 0. An outbound message with the same value indicates the completion
  46. of an inbound message.
  47. User-level Interface
  48. ---------------------
  49. The driver exposes following sysfs attributes:
  50. NAME R/W Description
  51. driver-version R driver version string
  52. firmware-version R firmware version string
  53. The driver registers char device "hptiop" to communicate with HighPoint RAID
  54. management software. Its ioctl routine acts as a general binary interface
  55. between the IOP firmware and HighPoint RAID management software. New management
  56. functions can be implemented in application/firmware without modification
  57. in driver code.
  58. -----------------------------------------------------------------------------
  59. Copyright (C) 2006 HighPoint Technologies, Inc. All Rights Reserved.
  60. This file is distributed in the hope that it will be useful,
  61. but WITHOUT ANY WARRANTY; without even the implied warranty of
  62. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  63. GNU General Public License for more details.
  64. linux@highpoint-tech.com
  65. http://www.highpoint-tech.com