blob: a6eb4add1be6d2b7dc1b553853fd04d3d2189b5b [file] [log] [blame]
HighPoint Linux Team00f59702007-12-13 16:14:26 -08001HIGHPOINT ROCKETRAID 3xxx/4xxx ADAPTER DRIVER (hptiop)
HighPoint Linux Teamede1e6f2006-05-16 14:38:09 +08002
3Controller Register Map
4-------------------------
5
HighPoint Linux Team00f59702007-12-13 16:14:26 -08006For Intel IOP based adapters, the controller IOP is accessed via PCI BAR0:
HighPoint Linux Teamede1e6f2006-05-16 14:38:09 +08007
8 BAR0 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
HighPoint Linux Team00f59702007-12-13 16:14:26 -080021For Marvell IOP based adapters, the IOP is accessed via PCI BAR0 and BAR1:
22
23 BAR0 offset Register
24 0x20400 Inbound Doorbell Register
25 0x20404 Inbound Interrupt Mask Register
26 0x20408 Outbound Doorbell Register
27 0x2040C Outbound Interrupt Mask Register
28
29 BAR1 offset Register
30 0x0 Inbound Queue Head Pointer
31 0x4 Inbound Queue Tail Pointer
32 0x8 Outbound Queue Head Pointer
33 0xC Outbound Queue Tail Pointer
34 0x10 Inbound Message Register
35 0x14 Outbound Message Register
36 0x40-0x1040 Inbound Queue
37 0x1040-0x2040 Outbound Queue
38
HighPoint Linux Teamede1e6f2006-05-16 14:38:09 +080039
40I/O Request Workflow
41----------------------
42
43All queued requests are handled via inbound/outbound queue port.
44A request packet can be allocated in either IOP or host memory.
45
46To send a request to the controller:
47
48 - Get a free request packet by reading the inbound queue port or
49 allocate a free request in host DMA coherent memory.
50
51 The value returned from the inbound queue port is an offset
52 relative to the IOP BAR0.
53
54 Requests allocated in host memory must be aligned on 32-bytes boundary.
55
56 - Fill the packet.
57
58 - Post the packet to IOP by writing it to inbound queue. For requests
59 allocated in IOP memory, write the offset to inbound queue port. For
60 requests allocated in host memory, write (0x80000000|(bus_addr>>5))
61 to the inbound queue port.
62
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
67 For requests allocated in IOP memory, the request offset is posted to
68 outbound queue.
69
70 For requests allocated in host memory, (0x80000000|(bus_addr>>5))
71 is posted to the outbound queue. If IOP_REQUEST_FLAG_OUTPUT_CONTEXT
72 flag is set in the request, the low 32-bit context value will be
73 posted instead.
74
75 - The host read the outbound queue and complete the request.
76
77 For requests allocated in IOP memory, the host driver free the request
78 by writing it to the outbound queue.
79
80Non-queued requests (reset/flush etc) can be sent via inbound message
81register 0. An outbound message with the same value indicates the completion
82of an inbound message.
83
84
85User-level Interface
86---------------------
87
88The driver exposes following sysfs attributes:
89
90 NAME R/W Description
91 driver-version R driver version string
92 firmware-version R firmware version string
93
HighPoint Linux Teamede1e6f2006-05-16 14:38:09 +080094
95-----------------------------------------------------------------------------
HighPoint Linux Team00f59702007-12-13 16:14:26 -080096Copyright (C) 2006-2007 HighPoint Technologies, Inc. All Rights Reserved.
HighPoint Linux Teamede1e6f2006-05-16 14:38:09 +080097
98 This file is distributed in the hope that it will be useful,
99 but WITHOUT ANY WARRANTY; without even the implied warranty of
100 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
101 GNU General Public License for more details.
102
103 linux@highpoint-tech.com
104 http://www.highpoint-tech.com