2 * This file is provided under a dual BSD/GPLv2 license. When using or
3 * redistributing this file, you may do so under either license.
7 * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved.
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of version 2 of the GNU General Public License as
11 * published by the Free Software Foundation.
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
21 * The full GNU General Public License is included in this distribution
22 * in the file called LICENSE.GPL.
26 * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved.
27 * All rights reserved.
29 * Redistribution and use in source and binary forms, with or without
30 * modification, are permitted provided that the following conditions
33 * * Redistributions of source code must retain the above copyright
34 * notice, this list of conditions and the following disclaimer.
35 * * Redistributions in binary form must reproduce the above copyright
36 * notice, this list of conditions and the following disclaimer in
37 * the documentation and/or other materials provided with the
39 * * Neither the name of Intel Corporation nor the names of its
40 * contributors may be used to endorse or promote products derived
41 * from this software without specific prior written permission.
43 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
44 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
45 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
46 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
47 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
48 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
49 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
50 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
51 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
52 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
53 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
56 #ifndef _SCU_REGISTERS_H_
57 #define _SCU_REGISTERS_H_
60 * This file contains the constants and structures for the SCU memory mapped
66 #include "scu_viit_data.h"
69 /* Generate a value for an SCU register */
70 #define SCU_GEN_VALUE(name, value) \
71 (((value) << name ## _SHIFT) & (name ## _MASK))
74 * Generate a bit value for an SCU register
75 * Make sure that the register MASK is just a single bit */
76 #define SCU_GEN_BIT(name) \
77 SCU_GEN_VALUE(name, ((u32)1))
79 #define SCU_SET_BIT(name, reg_value) \
80 ((reg_value) | SCU_GEN_BIT(name))
82 #define SCU_CLEAR_BIT(name, reg_value) \
83 ((reg_value)$ ~(SCU_GEN_BIT(name)))
86 * *****************************************************************************
87 * Unions for bitfield definitions of SCU Registers
88 * SMU Post Context Port
89 * ***************************************************************************** */
90 #define SMU_POST_CONTEXT_PORT_CONTEXT_INDEX_SHIFT (0)
91 #define SMU_POST_CONTEXT_PORT_CONTEXT_INDEX_MASK (0x00000FFF)
92 #define SMU_POST_CONTEXT_PORT_LOGICAL_PORT_INDEX_SHIFT (12)
93 #define SMU_POST_CONTEXT_PORT_LOGICAL_PORT_INDEX_MASK (0x0000F000)
94 #define SMU_POST_CONTEXT_PORT_PROTOCOL_ENGINE_SHIFT (16)
95 #define SMU_POST_CONTEXT_PORT_PROTOCOL_ENGINE_MASK (0x00030000)
96 #define SMU_POST_CONTEXT_PORT_COMMAND_CONTEXT_SHIFT (18)
97 #define SMU_POST_CONTEXT_PORT_COMMAND_CONTEXT_MASK (0x00FC0000)
98 #define SMU_POST_CONTEXT_PORT_RESERVED_MASK (0xFF000000)
100 #define SMU_PCP_GEN_VAL(name, value) \
101 SCU_GEN_VALUE(SMU_POST_CONTEXT_PORT_ ## name, value)
103 /* ***************************************************************************** */
104 #define SMU_INTERRUPT_STATUS_COMPLETION_SHIFT (31)
105 #define SMU_INTERRUPT_STATUS_COMPLETION_MASK (0x80000000)
106 #define SMU_INTERRUPT_STATUS_QUEUE_SUSPEND_SHIFT (1)
107 #define SMU_INTERRUPT_STATUS_QUEUE_SUSPEND_MASK (0x00000002)
108 #define SMU_INTERRUPT_STATUS_QUEUE_ERROR_SHIFT (0)
109 #define SMU_INTERRUPT_STATUS_QUEUE_ERROR_MASK (0x00000001)
110 #define SMU_INTERRUPT_STATUS_RESERVED_MASK (0x7FFFFFFC)
112 #define SMU_ISR_GEN_BIT(name) \
113 SCU_GEN_BIT(SMU_INTERRUPT_STATUS_ ## name)
115 #define SMU_ISR_QUEUE_ERROR SMU_ISR_GEN_BIT(QUEUE_ERROR)
116 #define SMU_ISR_QUEUE_SUSPEND SMU_ISR_GEN_BIT(QUEUE_SUSPEND)
117 #define SMU_ISR_COMPLETION SMU_ISR_GEN_BIT(COMPLETION)
119 /* ***************************************************************************** */
120 #define SMU_INTERRUPT_MASK_COMPLETION_SHIFT (31)
121 #define SMU_INTERRUPT_MASK_COMPLETION_MASK (0x80000000)
122 #define SMU_INTERRUPT_MASK_QUEUE_SUSPEND_SHIFT (1)
123 #define SMU_INTERRUPT_MASK_QUEUE_SUSPEND_MASK (0x00000002)
124 #define SMU_INTERRUPT_MASK_QUEUE_ERROR_SHIFT (0)
125 #define SMU_INTERRUPT_MASK_QUEUE_ERROR_MASK (0x00000001)
126 #define SMU_INTERRUPT_MASK_RESERVED_MASK (0x7FFFFFFC)
128 #define SMU_IMR_GEN_BIT(name) \
129 SCU_GEN_BIT(SMU_INTERRUPT_MASK_ ## name)
131 #define SMU_IMR_QUEUE_ERROR SMU_IMR_GEN_BIT(QUEUE_ERROR)
132 #define SMU_IMR_QUEUE_SUSPEND SMU_IMR_GEN_BIT(QUEUE_SUSPEND)
133 #define SMU_IMR_COMPLETION SMU_IMR_GEN_BIT(COMPLETION)
135 /* ***************************************************************************** */
136 #define SMU_INTERRUPT_COALESCING_CONTROL_TIMER_SHIFT (0)
137 #define SMU_INTERRUPT_COALESCING_CONTROL_TIMER_MASK (0x0000001F)
138 #define SMU_INTERRUPT_COALESCING_CONTROL_NUMBER_SHIFT (8)
139 #define SMU_INTERRUPT_COALESCING_CONTROL_NUMBER_MASK (0x0000FF00)
140 #define SMU_INTERRUPT_COALESCING_CONTROL_RESERVED_MASK (0xFFFF00E0)
142 #define SMU_ICC_GEN_VAL(name, value) \
143 SCU_GEN_VALUE(SMU_INTERRUPT_COALESCING_CONTROL_ ## name, value)
145 /* ***************************************************************************** */
146 #define SMU_TASK_CONTEXT_RANGE_START_SHIFT (0)
147 #define SMU_TASK_CONTEXT_RANGE_START_MASK (0x00000FFF)
148 #define SMU_TASK_CONTEXT_RANGE_ENDING_SHIFT (16)
149 #define SMU_TASK_CONTEXT_RANGE_ENDING_MASK (0x0FFF0000)
150 #define SMU_TASK_CONTEXT_RANGE_ENABLE_SHIFT (31)
151 #define SMU_TASK_CONTEXT_RANGE_ENABLE_MASK (0x80000000)
152 #define SMU_TASK_CONTEXT_RANGE_RESERVED_MASK (0x7000F000)
154 #define SMU_TCR_GEN_VAL(name, value) \
155 SCU_GEN_VALUE(SMU_TASK_CONTEXT_RANGE_ ## name, value)
157 #define SMU_TCR_GEN_BIT(name, value) \
158 SCU_GEN_BIT(SMU_TASK_CONTEXT_RANGE_ ## name)
160 /* ***************************************************************************** */
162 #define SMU_COMPLETION_QUEUE_PUT_POINTER_SHIFT (0)
163 #define SMU_COMPLETION_QUEUE_PUT_POINTER_MASK (0x00003FFF)
164 #define SMU_COMPLETION_QUEUE_PUT_CYCLE_BIT_SHIFT (15)
165 #define SMU_COMPLETION_QUEUE_PUT_CYCLE_BIT_MASK (0x00008000)
166 #define SMU_COMPLETION_QUEUE_PUT_EVENT_POINTER_SHIFT (16)
167 #define SMU_COMPLETION_QUEUE_PUT_EVENT_POINTER_MASK (0x03FF0000)
168 #define SMU_COMPLETION_QUEUE_PUT_EVENT_CYCLE_BIT_SHIFT (26)
169 #define SMU_COMPLETION_QUEUE_PUT_EVENT_CYCLE_BIT_MASK (0x04000000)
170 #define SMU_COMPLETION_QUEUE_PUT_RESERVED_MASK (0xF8004000)
172 #define SMU_CQPR_GEN_VAL(name, value) \
173 SCU_GEN_VALUE(SMU_COMPLETION_QUEUE_PUT_ ## name, value)
175 #define SMU_CQPR_GEN_BIT(name) \
176 SCU_GEN_BIT(SMU_COMPLETION_QUEUE_PUT_ ## name)
178 /* ***************************************************************************** */
180 #define SMU_COMPLETION_QUEUE_GET_POINTER_SHIFT (0)
181 #define SMU_COMPLETION_QUEUE_GET_POINTER_MASK (0x00003FFF)
182 #define SMU_COMPLETION_QUEUE_GET_CYCLE_BIT_SHIFT (15)
183 #define SMU_COMPLETION_QUEUE_GET_CYCLE_BIT_MASK (0x00008000)
184 #define SMU_COMPLETION_QUEUE_GET_EVENT_POINTER_SHIFT (16)
185 #define SMU_COMPLETION_QUEUE_GET_EVENT_POINTER_MASK (0x03FF0000)
186 #define SMU_COMPLETION_QUEUE_GET_EVENT_CYCLE_BIT_SHIFT (26)
187 #define SMU_COMPLETION_QUEUE_GET_EVENT_CYCLE_BIT_MASK (0x04000000)
188 #define SMU_COMPLETION_QUEUE_GET_ENABLE_SHIFT (30)
189 #define SMU_COMPLETION_QUEUE_GET_ENABLE_MASK (0x40000000)
190 #define SMU_COMPLETION_QUEUE_GET_EVENT_ENABLE_SHIFT (31)
191 #define SMU_COMPLETION_QUEUE_GET_EVENT_ENABLE_MASK (0x80000000)
192 #define SMU_COMPLETION_QUEUE_GET_RESERVED_MASK (0x38004000)
194 #define SMU_CQGR_GEN_VAL(name, value) \
195 SCU_GEN_VALUE(SMU_COMPLETION_QUEUE_GET_ ## name, value)
197 #define SMU_CQGR_GEN_BIT(name) \
198 SCU_GEN_BIT(SMU_COMPLETION_QUEUE_GET_ ## name)
200 #define SMU_CQGR_CYCLE_BIT \
201 SMU_CQGR_GEN_BIT(CYCLE_BIT)
203 #define SMU_CQGR_EVENT_CYCLE_BIT \
204 SMU_CQGR_GEN_BIT(EVENT_CYCLE_BIT)
206 #define SMU_CQGR_GET_POINTER_SET(value) \
207 SMU_CQGR_GEN_VAL(POINTER, value)
210 /* ***************************************************************************** */
211 #define SMU_COMPLETION_QUEUE_CONTROL_QUEUE_LIMIT_SHIFT (0)
212 #define SMU_COMPLETION_QUEUE_CONTROL_QUEUE_LIMIT_MASK (0x00003FFF)
213 #define SMU_COMPLETION_QUEUE_CONTROL_EVENT_LIMIT_SHIFT (16)
214 #define SMU_COMPLETION_QUEUE_CONTROL_EVENT_LIMIT_MASK (0x03FF0000)
215 #define SMU_COMPLETION_QUEUE_CONTROL_RESERVED_MASK (0xFC00C000)
217 #define SMU_CQC_GEN_VAL(name, value) \
218 SCU_GEN_VALUE(SMU_COMPLETION_QUEUE_CONTROL_ ## name, value)
220 #define SMU_CQC_QUEUE_LIMIT_SET(value) \
221 SMU_CQC_GEN_VAL(QUEUE_LIMIT, value)
223 #define SMU_CQC_EVENT_LIMIT_SET(value) \
224 SMU_CQC_GEN_VAL(EVENT_LIMIT, value)
227 /* ***************************************************************************** */
228 #define SMU_DEVICE_CONTEXT_CAPACITY_MAX_TC_SHIFT (0)
229 #define SMU_DEVICE_CONTEXT_CAPACITY_MAX_TC_MASK (0x00000FFF)
230 #define SMU_DEVICE_CONTEXT_CAPACITY_MAX_LP_SHIFT (12)
231 #define SMU_DEVICE_CONTEXT_CAPACITY_MAX_LP_MASK (0x00007000)
232 #define SMU_DEVICE_CONTEXT_CAPACITY_MAX_RNC_SHIFT (15)
233 #define SMU_DEVICE_CONTEXT_CAPACITY_MAX_RNC_MASK (0x07FF8000)
234 #define SMU_DEVICE_CONTEXT_CAPACITY_MAX_PEG_SHIFT (27)
235 #define SMU_DEVICE_CONTEXT_CAPACITY_MAX_PEG_MASK (0x08000000)
236 #define SMU_DEVICE_CONTEXT_CAPACITY_RESERVED_MASK (0xF0000000)
238 #define SMU_DCC_GEN_VAL(name, value) \
239 SCU_GEN_VALUE(SMU_DEVICE_CONTEXT_CAPACITY_ ## name, value)
241 #define SMU_DCC_GET_MAX_PEG(value) \
243 ((value) & SMU_DEVICE_CONTEXT_CAPACITY_MAX_PEG_MASK) \
244 >> SMU_DEVICE_CONTEXT_CAPACITY_MAX_LP_SHIFT \
247 #define SMU_DCC_GET_MAX_LP(value) \
249 ((value) & SMU_DEVICE_CONTEXT_CAPACITY_MAX_LP_MASK) \
250 >> SMU_DEVICE_CONTEXT_CAPACITY_MAX_LP_SHIFT \
253 #define SMU_DCC_GET_MAX_TC(value) \
255 ((value) & SMU_DEVICE_CONTEXT_CAPACITY_MAX_TC_MASK) \
256 >> SMU_DEVICE_CONTEXT_CAPACITY_MAX_TC_SHIFT \
259 #define SMU_DCC_GET_MAX_RNC(value) \
261 ((value) & SMU_DEVICE_CONTEXT_CAPACITY_MAX_RNC_MASK) \
262 >> SMU_DEVICE_CONTEXT_CAPACITY_MAX_RNC_SHIFT \
265 /* -------------------------------------------------------------------------- */
267 #define SMU_CONTROL_STATUS_TASK_CONTEXT_RANGE_ENABLE_SHIFT (0)
268 #define SMU_CONTROL_STATUS_TASK_CONTEXT_RANGE_ENABLE_MASK (0x00000001)
269 #define SMU_CONTROL_STATUS_COMPLETION_BYTE_SWAP_ENABLE_SHIFT (1)
270 #define SMU_CONTROL_STATUS_COMPLETION_BYTE_SWAP_ENABLE_MASK (0x00000002)
271 #define SMU_CONTROL_STATUS_CONTEXT_RAM_INIT_COMPLETED_SHIFT (16)
272 #define SMU_CONTROL_STATUS_CONTEXT_RAM_INIT_COMPLETED_MASK (0x00010000)
273 #define SMU_CONTROL_STATUS_SCHEDULER_RAM_INIT_COMPLETED_SHIFT (17)
274 #define SMU_CONTROL_STATUS_SCHEDULER_RAM_INIT_COMPLETED_MASK (0x00020000)
275 #define SMU_CONTROL_STATUS_RESERVED_MASK (0xFFFCFFFC)
277 #define SMU_SMUCSR_GEN_BIT(name) \
278 SCU_GEN_BIT(SMU_CONTROL_STATUS_ ## name)
280 #define SMU_SMUCSR_SCHEDULER_RAM_INIT_COMPLETED \
281 (SMU_SMUCSR_GEN_BIT(SCHEDULER_RAM_INIT_COMPLETED))
283 #define SMU_SMUCSR_CONTEXT_RAM_INIT_COMPLETED \
284 (SMU_SMUCSR_GEN_BIT(CONTEXT_RAM_INIT_COMPLETED))
286 #define SCU_RAM_INIT_COMPLETED \
288 SMU_SMUCSR_CONTEXT_RAM_INIT_COMPLETED \
289 | SMU_SMUCSR_SCHEDULER_RAM_INIT_COMPLETED \
292 /* -------------------------------------------------------------------------- */
294 #define SMU_SOFTRESET_CONTROL_RESET_PEG0_PE0_SHIFT (0)
295 #define SMU_SOFTRESET_CONTROL_RESET_PEG0_PE0_MASK (0x00000001)
296 #define SMU_SOFTRESET_CONTROL_RESET_PEG0_PE1_SHIFT (1)
297 #define SMU_SOFTRESET_CONTROL_RESET_PEG0_PE1_MASK (0x00000002)
298 #define SMU_SOFTRESET_CONTROL_RESET_PEG0_PE2_SHIFT (2)
299 #define SMU_SOFTRESET_CONTROL_RESET_PEG0_PE2_MASK (0x00000004)
300 #define SMU_SOFTRESET_CONTROL_RESET_PEG0_PE3_SHIFT (3)
301 #define SMU_SOFTRESET_CONTROL_RESET_PEG0_PE3_MASK (0x00000008)
302 #define SMU_SOFTRESET_CONTROL_RESET_PEG1_PE0_SHIFT (8)
303 #define SMU_SOFTRESET_CONTROL_RESET_PEG1_PE0_MASK (0x00000100)
304 #define SMU_SOFTRESET_CONTROL_RESET_PEG1_PE1_SHIFT (9)
305 #define SMU_SOFTRESET_CONTROL_RESET_PEG1_PE1_MASK (0x00000200)
306 #define SMU_SOFTRESET_CONTROL_RESET_PEG1_PE2_SHIFT (10)
307 #define SMU_SOFTRESET_CONTROL_RESET_PEG1_PE2_MASK (0x00000400)
308 #define SMU_SOFTRESET_CONTROL_RESET_PEG1_PE3_SHIFT (11)
309 #define SMU_SOFTRESET_CONTROL_RESET_PEG1_PE3_MASK (0x00000800)
311 #define SMU_RESET_PROTOCOL_ENGINE(peg, pe) \
312 ((1 << (pe)) << ((peg) * 8))
314 #define SMU_RESET_PEG_PROTOCOL_ENGINES(peg) \
316 SMU_RESET_PROTOCOL_ENGINE(peg, 0) \
317 | SMU_RESET_PROTOCOL_ENGINE(peg, 1) \
318 | SMU_RESET_PROTOCOL_ENGINE(peg, 2) \
319 | SMU_RESET_PROTOCOL_ENGINE(peg, 3) \
322 #define SMU_RESET_ALL_PROTOCOL_ENGINES() \
324 SMU_RESET_PEG_PROTOCOL_ENGINES(0) \
325 | SMU_RESET_PEG_PROTOCOL_ENGINES(1) \
328 #define SMU_SOFTRESET_CONTROL_RESET_WIDE_PORT_PEG0_LP0_SHIFT (16)
329 #define SMU_SOFTRESET_CONTROL_RESET_WIDE_PORT_PEG0_LP0_MASK (0x00010000)
330 #define SMU_SOFTRESET_CONTROL_RESET_WIDE_PORT_PEG0_LP2_SHIFT (17)
331 #define SMU_SOFTRESET_CONTROL_RESET_WIDE_PORT_PEG0_LP2_MASK (0x00020000)
332 #define SMU_SOFTRESET_CONTROL_RESET_WIDE_PORT_PEG1_LP0_SHIFT (18)
333 #define SMU_SOFTRESET_CONTROL_RESET_WIDE_PORT_PEG1_LP0_MASK (0x00040000)
334 #define SMU_SOFTRESET_CONTROL_RESET_WIDE_PORT_PEG1_LP2_SHIFT (19)
335 #define SMU_SOFTRESET_CONTROL_RESET_WIDE_PORT_PEG1_LP2_MASK (0x00080000)
337 #define SMU_RESET_WIDE_PORT_QUEUE(peg, wide_port) \
338 ((1 << ((wide_port) / 2)) << ((peg) * 2) << 16)
340 #define SMU_SOFTRESET_CONTROL_RESET_PEG0_SHIFT (20)
341 #define SMU_SOFTRESET_CONTROL_RESET_PEG0_MASK (0x00100000)
342 #define SMU_SOFTRESET_CONTROL_RESET_PEG1_SHIFT (21)
343 #define SMU_SOFTRESET_CONTROL_RESET_PEG1_MASK (0x00200000)
344 #define SMU_SOFTRESET_CONTROL_RESET_SCU_SHIFT (22)
345 #define SMU_SOFTRESET_CONTROL_RESET_SCU_MASK (0x00400000)
348 * It seems to make sense that if you are going to reset the protocol
349 * engine group that you would also reset all of the protocol engines */
350 #define SMU_RESET_PROTOCOL_ENGINE_GROUP(peg) \
352 (1 << ((peg) + 20)) \
353 | SMU_RESET_WIDE_PORT_QUEUE(peg, 0) \
354 | SMU_RESET_WIDE_PORT_QUEUE(peg, 1) \
355 | SMU_RESET_PEG_PROTOCOL_ENGINES(peg) \
358 #define SMU_RESET_ALL_PROTOCOL_ENGINE_GROUPS() \
360 SMU_RESET_PROTOCOL_ENGINE_GROUP(0) \
361 | SMU_RESET_PROTOCOL_ENGINE_GROUP(1) \
364 #define SMU_RESET_SCU() (0xFFFFFFFF)
368 /* ***************************************************************************** */
369 #define SMU_TASK_CONTEXT_ASSIGNMENT_STARTING_SHIFT (0)
370 #define SMU_TASK_CONTEXT_ASSIGNMENT_STARTING_MASK (0x00000FFF)
371 #define SMU_TASK_CONTEXT_ASSIGNMENT_ENDING_SHIFT (16)
372 #define SMU_TASK_CONTEXT_ASSIGNMENT_ENDING_MASK (0x0FFF0000)
373 #define SMU_TASK_CONTEXT_ASSIGNMENT_RANGE_CHECK_ENABLE_SHIFT (31)
374 #define SMU_TASK_CONTEXT_ASSIGNMENT_RANGE_CHECK_ENABLE_MASK (0x80000000)
375 #define SMU_TASK_CONTEXT_ASSIGNMENT_RESERVED_MASK (0x7000F000)
377 #define SMU_TCA_GEN_VAL(name, value) \
378 SCU_GEN_VALUE(SMU_TASK_CONTEXT_ASSIGNMENT_ ## name, value)
380 #define SMU_TCA_GEN_BIT(name) \
381 SCU_GEN_BIT(SMU_TASK_CONTEXT_ASSIGNMENT_ ## name)
383 /* ***************************************************************************** */
384 #define SCU_SDMA_UNSOLICITED_FRAME_QUEUE_CONTROL_QUEUE_SIZE_SHIFT (0)
385 #define SCU_SDMA_UNSOLICITED_FRAME_QUEUE_CONTROL_QUEUE_SIZE_MASK (0x00000FFF)
386 #define SCU_SDMA_UNSOLICITED_FRAME_QUEUE_CONTROL_RESERVED_MASK (0xFFFFF000)
388 #define SCU_UFQC_GEN_VAL(name, value) \
389 SCU_GEN_VALUE(SCU_SDMA_UNSOLICITED_FRAME_QUEUE_CONTROL_ ## name, value)
391 #define SCU_UFQC_QUEUE_SIZE_SET(value) \
392 SCU_UFQC_GEN_VAL(QUEUE_SIZE, value)
394 /* ***************************************************************************** */
395 #define SCU_SDMA_UNSOLICITED_FRAME_QUEUE_PUT_POINTER_SHIFT (0)
396 #define SCU_SDMA_UNSOLICITED_FRAME_QUEUE_PUT_POINTER_MASK (0x00000FFF)
397 #define SCU_SDMA_UNSOLICITED_FRAME_QUEUE_PUT_CYCLE_BIT_SHIFT (12)
398 #define SCU_SDMA_UNSOLICITED_FRAME_QUEUE_PUT_CYCLE_BIT_MASK (0x00001000)
399 #define SCU_SDMA_UNSOLICITED_FRAME_QUEUE_PUT_RESERVED_MASK (0xFFFFE000)
401 #define SCU_UFQPP_GEN_VAL(name, value) \
402 SCU_GEN_VALUE(SCU_SDMA_UNSOLICITED_FRAME_QUEUE_PUT_ ## name, value)
404 #define SCU_UFQPP_GEN_BIT(name) \
405 SCU_GEN_BIT(SCU_SDMA_UNSOLICITED_FRAME_QUEUE_PUT_ ## name)
408 * *****************************************************************************
410 * ***************************************************************************** */
411 #define SCU_SDMA_UNSOLICITED_FRAME_QUEUE_GET_POINTER_SHIFT (0)
412 #define SCU_SDMA_UNSOLICITED_FRAME_QUEUE_GET_POINTER_MASK (0x00000FFF)
413 #define SCU_SDMA_UNSOLICITED_FRAME_QUEUE_GET_CYCLE_BIT_SHIFT (12)
414 #define SCU_SDMA_UNSOLICITED_FRAME_QUEUE_GET_CYCLE_BIT_MASK (12)
415 #define SCU_SDMA_UNSOLICITED_FRAME_QUEUE_GET_ENABLE_BIT_SHIFT (31)
416 #define SCU_SDMA_UNSOLICITED_FRAME_QUEUE_GET_ENABLE_BIT_MASK (0x80000000)
417 #define SCU_SDMA_UNSOLICITED_FRAME_QUEUE_GET_RESERVED_MASK (0x7FFFE000)
419 #define SCU_UFQGP_GEN_VAL(name, value) \
420 SCU_GEN_VALUE(SCU_SDMA_UNSOLICITED_FRAME_QUEUE_GET_ ## name, value)
422 #define SCU_UFQGP_GEN_BIT(name) \
423 SCU_GEN_BIT(SCU_SDMA_UNSOLICITED_FRAME_QUEUE_GET_ ## name)
425 #define SCU_UFQGP_CYCLE_BIT(value) \
426 SCU_UFQGP_GEN_BIT(CYCLE_BIT, value)
428 #define SCU_UFQGP_GET_POINTER(value) \
429 SCU_UFQGP_GEN_VALUE(POINTER, value)
431 #define SCU_UFQGP_ENABLE(value) \
432 (SCU_UFQGP_GEN_BIT(ENABLE) | value)
434 #define SCU_UFQGP_DISABLE(value) \
435 (~SCU_UFQGP_GEN_BIT(ENABLE) & value)
437 #define SCU_UFQGP_VALUE(bit, value) \
438 (SCU_UFQGP_CYCLE_BIT(bit) | SCU_UFQGP_GET_POINTER(value))
440 /* ***************************************************************************** */
441 #define SCU_PDMA_CONFIGURATION_ADDRESS_MODIFIER_SHIFT (0)
442 #define SCU_PDMA_CONFIGURATION_ADDRESS_MODIFIER_MASK (0x0000FFFF)
443 #define SCU_PDMA_CONFIGURATION_PCI_RELAXED_ORDERING_ENABLE_SHIFT (16)
444 #define SCU_PDMA_CONFIGURATION_PCI_RELAXED_ORDERING_ENABLE_MASK (0x00010000)
445 #define SCU_PDMA_CONFIGURATION_PCI_NO_SNOOP_ENABLE_SHIFT (17)
446 #define SCU_PDMA_CONFIGURATION_PCI_NO_SNOOP_ENABLE_MASK (0x00020000)
447 #define SCU_PDMA_CONFIGURATION_BIG_ENDIAN_CONTROL_BYTE_SWAP_SHIFT (18)
448 #define SCU_PDMA_CONFIGURATION_BIG_ENDIAN_CONTROL_BYTE_SWAP_MASK (0x00040000)
449 #define SCU_PDMA_CONFIGURATION_BIG_ENDIAN_CONTROL_XPI_SGL_FETCH_SHIFT (19)
450 #define SCU_PDMA_CONFIGURATION_BIG_ENDIAN_CONTROL_XPI_SGL_FETCH_MASK (0x00080000)
451 #define SCU_PDMA_CONFIGURATION_BIG_ENDIAN_CONTROL_XPI_RX_HEADER_RAM_WRITE_SHIFT (20)
452 #define SCU_PDMA_CONFIGURATION_BIG_ENDIAN_CONTROL_XPI_RX_HEADER_RAM_WRITE_MASK (0x00100000)
453 #define SCU_PDMA_CONFIGURATION_BIG_ENDIAN_CONTROL_XPI_UF_ADDRESS_FETCH_SHIFT (21)
454 #define SCU_PDMA_CONFIGURATION_BIG_ENDIAN_CONTROL_XPI_UF_ADDRESS_FETCH_MASK (0x00200000)
455 #define SCU_PDMA_CONFIGURATION_ADDRESS_MODIFIER_SELECT_SHIFT (22)
456 #define SCU_PDMA_CONFIGURATION_ADDRESS_MODIFIER_SELECT_MASK (0x00400000)
457 #define SCU_PDMA_CONFIGURATION_RESERVED_MASK (0xFF800000)
459 #define SCU_PDMACR_GEN_VALUE(name, value) \
460 SCU_GEN_VALUE(SCU_PDMA_CONFIGURATION_ ## name, value)
462 #define SCU_PDMACR_GEN_BIT(name) \
463 SCU_GEN_BIT(SCU_PDMA_CONFIGURATION_ ## name)
465 #define SCU_PDMACR_BE_GEN_BIT(name) \
466 SCU_PCMACR_GEN_BIT(BIG_ENDIAN_CONTROL_ ## name)
468 /* ***************************************************************************** */
469 #define SCU_CDMA_CONFIGURATION_PCI_RELAXED_ORDERING_ENABLE_SHIFT (8)
470 #define SCU_CDMA_CONFIGURATION_PCI_RELAXED_ORDERING_ENABLE_MASK (0x00000100)
472 #define SCU_CDMACR_GEN_BIT(name) \
473 SCU_GEN_BIT(SCU_CDMA_CONFIGURATION_ ## name)
476 * *****************************************************************************
477 * * SCU Link Layer Registers
478 * ***************************************************************************** */
479 #define SCU_LINK_LAYER_SPEED_NEGOTIATION_TIMER_VALUES_TIMEOUT_SHIFT (0)
480 #define SCU_LINK_LAYER_SPEED_NEGOTIATION_TIMER_VALUES_TIMEOUT_MASK (0x000000FF)
481 #define SCU_LINK_LAYER_SPEED_NEGOTIATION_TIMER_VALUES_LOCK_TIME_SHIFT (8)
482 #define SCU_LINK_LAYER_SPEED_NEGOTIATION_TIMER_VALUES_LOCK_TIME_MASK (0x0000FF00)
483 #define SCU_LINK_LAYER_SPEED_NEGOTIATION_TIMER_VALUES_RATE_CHANGE_DELAY_SHIFT (16)
484 #define SCU_LINK_LAYER_SPEED_NEGOTIATION_TIMER_VALUES_RATE_CHANGE_DELAY_MASK (0x00FF0000)
485 #define SCU_LINK_LAYER_SPEED_NEGOTIATION_TIMER_VALUES_DWORD_SYNC_TIMEOUT_SHIFT (24)
486 #define SCU_LINK_LAYER_SPEED_NEGOTIATION_TIMER_VALUES_DWORD_SYNC_TIMEOUT_MASK (0xFF000000)
487 #define SCU_LINK_LAYER_SPEED_NECGOIATION_TIMER_VALUES_REQUIRED_MASK (0x00000000)
488 #define SCU_LINK_LAYER_SPEED_NECGOIATION_TIMER_VALUES_DEFAULT_MASK (0x7D00676F)
489 #define SCU_LINK_LAYER_SPEED_NECGOIATION_TIMER_VALUES_RESERVED_MASK (0x00FF0000)
491 #define SCU_SAS_SPDTOV_GEN_VALUE(name, value) \
492 SCU_GEN_VALUE(SCU_LINK_LAYER_SPEED_NEGOTIATION_TIMER_VALUES_ ## name, value)
495 #define SCU_LINK_STATUS_DWORD_SYNC_AQUIRED_SHIFT (2)
496 #define SCU_LINK_STATUS_DWORD_SYNC_AQUIRED_MASK (0x00000004)
497 #define SCU_LINK_STATUS_TRANSMIT_PORT_SELECTION_DONE_SHIFT (4)
498 #define SCU_LINK_STATUS_TRANSMIT_PORT_SELECTION_DONE_MASK (0x00000010)
499 #define SCU_LINK_STATUS_RECEIVER_CREDIT_EXHAUSTED_SHIFT (5)
500 #define SCU_LINK_STATUS_RECEIVER_CREDIT_EXHAUSTED_MASK (0x00000020)
501 #define SCU_LINK_STATUS_RESERVED_MASK (0xFFFFFFCD)
503 #define SCU_SAS_LLSTA_GEN_BIT(name) \
504 SCU_GEN_BIT(SCU_LINK_STATUS_ ## name)
507 /* TODO: Where is the SATA_PSELTOV register? */
510 * *****************************************************************************
511 * * SCU SAS Maximum Arbitration Wait Time Timeout Register
512 * ***************************************************************************** */
513 #define SCU_SAS_MAX_ARBITRATION_WAIT_TIME_TIMEOUT_VALUE_SHIFT (0)
514 #define SCU_SAS_MAX_ARBITRATION_WAIT_TIME_TIMEOUT_VALUE_MASK (0x00007FFF)
515 #define SCU_SAS_MAX_ARBITRATION_WAIT_TIME_TIMEOUT_SCALE_SHIFT (15)
516 #define SCU_SAS_MAX_ARBITRATION_WAIT_TIME_TIMEOUT_SCALE_MASK (0x00008000)
518 #define SCU_SAS_MAWTTOV_GEN_VALUE(name, value) \
519 SCU_GEN_VALUE(SCU_SAS_MAX_ARBITRATION_WAIT_TIME_TIMEOUT_ ## name, value)
521 #define SCU_SAS_MAWTTOV_GEN_BIT(name) \
522 SCU_GEN_BIT(SCU_SAS_MAX_ARBITRATION_WAIT_TIME_TIMEOUT_ ## name)
526 * TODO: Where is the SAS_LNKTOV regsiter?
527 * TODO: Where is the SAS_PHYTOV register? */
529 #define SCU_SAS_TRANSMIT_IDENTIFICATION_SMP_TARGET_SHIFT (1)
530 #define SCU_SAS_TRANSMIT_IDENTIFICATION_SMP_TARGET_MASK (0x00000002)
531 #define SCU_SAS_TRANSMIT_IDENTIFICATION_STP_TARGET_SHIFT (2)
532 #define SCU_SAS_TRANSMIT_IDENTIFICATION_STP_TARGET_MASK (0x00000004)
533 #define SCU_SAS_TRANSMIT_IDENTIFICATION_SSP_TARGET_SHIFT (3)
534 #define SCU_SAS_TRANSMIT_IDENTIFICATION_SSP_TARGET_MASK (0x00000008)
535 #define SCU_SAS_TRANSMIT_IDENTIFICATION_DA_SATA_HOST_SHIFT (8)
536 #define SCU_SAS_TRANSMIT_IDENTIFICATION_DA_SATA_HOST_MASK (0x00000100)
537 #define SCU_SAS_TRANSMIT_IDENTIFICATION_SMP_INITIATOR_SHIFT (9)
538 #define SCU_SAS_TRANSMIT_IDENTIFICATION_SMP_INITIATOR_MASK (0x00000200)
539 #define SCU_SAS_TRANSMIT_IDENTIFICATION_STP_INITIATOR_SHIFT (10)
540 #define SCU_SAS_TRANSMIT_IDENTIFICATION_STP_INITIATOR_MASK (0x00000400)
541 #define SCU_SAS_TRANSMIT_IDENTIFICATION_SSP_INITIATOR_SHIFT (11)
542 #define SCU_SAS_TRANSMIT_IDENTIFICATION_SSP_INITIATOR_MASK (0x00000800)
543 #define SCU_SAS_TRANSMIT_IDENTIFICATION_REASON_CODE_SHIFT (16)
544 #define SCU_SAS_TRANSMIT_IDENTIFICATION_REASON_CODE_MASK (0x000F0000)
545 #define SCU_SAS_TRANSMIT_IDENTIFICATION_ADDRESS_FRAME_TYPE_SHIFT (24)
546 #define SCU_SAS_TRANSMIT_IDENTIFICATION_ADDRESS_FRAME_TYPE_MASK (0x0F000000)
547 #define SCU_SAS_TRANSMIT_IDENTIFICATION_DEVICE_TYPE_SHIFT (28)
548 #define SCU_SAS_TRANSMIT_IDENTIFICATION_DEVICE_TYPE_MASK (0x70000000)
549 #define SCU_SAS_TRANSMIT_IDENTIFICATION_RESERVED_MASK (0x80F0F1F1)
551 #define SCU_SAS_TIID_GEN_VAL(name, value) \
552 SCU_GEN_VALUE(SCU_SAS_TRANSMIT_IDENTIFICATION_ ## name, value)
554 #define SCU_SAS_TIID_GEN_BIT(name) \
555 SCU_GEN_BIT(SCU_SAS_TRANSMIT_IDENTIFICATION_ ## name)
557 /* SAS Identify Frame PHY Identifier Register */
558 #define SCU_LINK_LAYER_IDENTIFY_FRAME_PHY_IDENTIFIER_BREAK_REPLY_CAPABLE_SHIFT (16)
559 #define SCU_LINK_LAYER_IDENTIFY_FRAME_PHY_IDENTIFIER_BREAK_REPLY_CAPABLE_MASK (0x00010000)
560 #define SCU_LINK_LAYER_IDENTIFY_FRAME_PHY_IDENTIFIER_REQUESTED_INSIDE_ZPSDS_SHIFT (17)
561 #define SCU_LINK_LAYER_IDENTIFY_FRAME_PHY_IDENTIFIER_REQUESTED_INSIDE_ZPSDS_MASK (0x00020000)
562 #define SCU_LINK_LAYER_IDENTIFY_FRAME_PHY_IDENTIFIER_INSIDE_ZPSDS_PERSISTENT_SHIFT (18)
563 #define SCU_LINK_LAYER_IDENTIFY_FRAME_PHY_IDENTIFIER_INSIDE_ZPSDS_PERSISTENT_MASK (0x00040000)
564 #define SCU_LINK_LAYER_IDENTIFY_FRAME_PHY_IDENTIFIER_ID_SHIFT (24)
565 #define SCU_LINK_LAYER_IDENTIFY_FRAME_PHY_IDENTIFIER_ID_MASK (0xFF000000)
566 #define SCU_LINK_LAYER_IDENTIFY_FRAME_PHY_IDENTIFIER_RESERVED_MASK (0x00F800FF)
568 #define SCU_SAS_TIPID_GEN_VALUE(name, value) \
569 SCU_GEN_VALUE(SCU_LINK_LAYER_IDENTIFY_FRAME_PHY_IDENTIFIER_ ## name, value)
571 #define SCU_SAS_TIPID_GEN_BIT(name) \
572 SCU_GEN_BIT(SCU_LINK_LAYER_IDENTIFY_FRAME_PHY_IDENTIFIER_ ## name)
575 #define SCU_SAS_PHY_CONFIGURATION_TX_PARITY_CHECK_SHIFT (4)
576 #define SCU_SAS_PHY_CONFIGURATION_TX_PARITY_CHECK_MASK (0x00000010)
577 #define SCU_SAS_PHY_CONFIGURATION_TX_BAD_CRC_SHIFT (6)
578 #define SCU_SAS_PHY_CONFIGURATION_TX_BAD_CRC_MASK (0x00000040)
579 #define SCU_SAS_PHY_CONFIGURATION_DISABLE_SCRAMBLER_SHIFT (7)
580 #define SCU_SAS_PHY_CONFIGURATION_DISABLE_SCRAMBLER_MASK (0x00000080)
581 #define SCU_SAS_PHY_CONFIGURATION_DISABLE_DESCRAMBLER_SHIFT (8)
582 #define SCU_SAS_PHY_CONFIGURATION_DISABLE_DESCRAMBLER_MASK (0x00000100)
583 #define SCU_SAS_PHY_CONFIGURATION_DISABLE_CREDIT_INSERTION_SHIFT (9)
584 #define SCU_SAS_PHY_CONFIGURATION_DISABLE_CREDIT_INSERTION_MASK (0x00000200)
585 #define SCU_SAS_PHY_CONFIGURATION_SUSPEND_PROTOCOL_ENGINE_SHIFT (11)
586 #define SCU_SAS_PHY_CONFIGURATION_SUSPEND_PROTOCOL_ENGINE_MASK (0x00000800)
587 #define SCU_SAS_PHY_CONFIGURATION_SATA_SPINUP_HOLD_SHIFT (12)
588 #define SCU_SAS_PHY_CONFIGURATION_SATA_SPINUP_HOLD_MASK (0x00001000)
589 #define SCU_SAS_PHY_CONFIGURATION_TRANSMIT_PORT_SELECTION_SIGNAL_SHIFT (13)
590 #define SCU_SAS_PHY_CONFIGURATION_TRANSMIT_PORT_SELECTION_SIGNAL_MASK (0x00002000)
591 #define SCU_SAS_PHY_CONFIGURATION_HARD_RESET_SHIFT (14)
592 #define SCU_SAS_PHY_CONFIGURATION_HARD_RESET_MASK (0x00004000)
593 #define SCU_SAS_PHY_CONFIGURATION_OOB_ENABLE_SHIFT (15)
594 #define SCU_SAS_PHY_CONFIGURATION_OOB_ENABLE_MASK (0x00008000)
595 #define SCU_SAS_PHY_CONFIGURATION_ENABLE_FRAME_TX_INSERT_ALIGN_SHIFT (23)
596 #define SCU_SAS_PHY_CONFIGURATION_ENABLE_FRAME_TX_INSERT_ALIGN_MASK (0x00800000)
597 #define SCU_SAS_PHY_CONFIGURATION_FORWARD_IDENTIFY_FRAME_SHIFT (27)
598 #define SCU_SAS_PHY_CONFIGURATION_FORWARD_IDENTIFY_FRAME_MASK (0x08000000)
599 #define SCU_SAS_PHY_CONFIGURATION_DISABLE_BYTE_TRANSPOSE_STP_FRAME_SHIFT (28)
600 #define SCU_SAS_PHY_CONFIGURATION_DISABLE_BYTE_TRANSPOSE_STP_FRAME_MASK (0x10000000)
601 #define SCU_SAS_PHY_CONFIGURATION_OOB_RESET_SHIFT (29)
602 #define SCU_SAS_PHY_CONFIGURATION_OOB_RESET_MASK (0x20000000)
603 #define SCU_SAS_PHY_CONFIGURATION_THREE_IAF_ENABLE_SHIFT (30)
604 #define SCU_SAS_PHY_CONFIGURATION_THREE_IAF_ENABLE_MASK (0x40000000)
605 #define SCU_SAS_PHY_CONFIGURATION_OOB_ALIGN0_ENABLE_SHIFT (31)
606 #define SCU_SAS_PHY_CONFIGURATION_OOB_ALIGN0_ENABLE_MASK (0x80000000)
607 #define SCU_SAS_PHY_CONFIGURATION_REQUIRED_MASK (0x0100000F)
608 #define SCU_SAS_PHY_CONFIGURATION_DEFAULT_MASK (0x4180100F)
609 #define SCU_SAS_PHY_CONFIGURATION_RESERVED_MASK (0x00000000)
611 #define SCU_SAS_PCFG_GEN_BIT(name) \
612 SCU_GEN_BIT(SCU_SAS_PHY_CONFIGURATION_ ## name)
614 #define SCU_LINK_LAYER_ALIGN_INSERTION_FREQUENCY_GENERAL_SHIFT (0)
615 #define SCU_LINK_LAYER_ALIGN_INSERTION_FREQUENCY_GENERAL_MASK (0x000007FF)
616 #define SCU_LINK_LAYER_ALIGN_INSERTION_FREQUENCY_CONNECTED_SHIFT (16)
617 #define SCU_LINK_LAYER_ALIGN_INSERTION_FREQUENCY_CONNECTED_MASK (0x00ff0000)
619 #define SCU_ALIGN_INSERTION_FREQUENCY_GEN_VAL(name, value) \
620 SCU_GEN_VALUE(SCU_LINK_LAYER_ALIGN_INSERTION_FREQUENCY_##name, value)
622 #define SCU_LINK_LAYER_ENABLE_SPINUP_CONTROL_COUNT_SHIFT (0)
623 #define SCU_LINK_LAYER_ENABLE_SPINUP_CONTROL_COUNT_MASK (0x0003FFFF)
624 #define SCU_LINK_LAYER_ENABLE_SPINUP_CONTROL_ENABLE_SHIFT (31)
625 #define SCU_LINK_LAYER_ENABLE_SPINUP_CONTROL_ENABLE_MASK (0x80000000)
626 #define SCU_LINK_LAYER_ENABLE_SPINUP_CONTROL_RESERVED_MASK (0x7FFC0000)
628 #define SCU_ENSPINUP_GEN_VAL(name, value) \
629 SCU_GEN_VALUE(SCU_LINK_LAYER_ENABLE_SPINUP_CONTROL_ ## name, value)
631 #define SCU_ENSPINUP_GEN_BIT(name) \
632 SCU_GEN_BIT(SCU_LINK_LAYER_ENABLE_SPINUP_CONTROL_ ## name)
635 #define SCU_LINK_LAYER_PHY_CAPABILITIES_TXSSCTYPE_SHIFT (1)
636 #define SCU_LINK_LAYER_PHY_CAPABILITIES_TXSSCTYPE_MASK (0x00000002)
637 #define SCU_LINK_LAYER_PHY_CAPABILITIES_RLLRATE_SHIFT (4)
638 #define SCU_LINK_LAYER_PHY_CAPABILITIES_RLLRATE_MASK (0x000000F0)
639 #define SCU_LINK_LAYER_PHY_CAPABILITIES_SWO15GBPS_SHIFT (8)
640 #define SCU_LINK_LAYER_PHY_CAPABILITIES_SWO15GBPS_MASK (0x00000100)
641 #define SCU_LINK_LAYER_PHY_CAPABILITIES_SW15GBPS_SHIFT (9)
642 #define SCU_LINK_LAYER_PHY_CAPABILITIES_SW15GBPS_MASK (0x00000201)
643 #define SCU_LINK_LAYER_PHY_CAPABILITIES_SWO30GBPS_SHIFT (10)
644 #define SCU_LINK_LAYER_PHY_CAPABILITIES_SWO30GBPS_MASK (0x00000401)
645 #define SCU_LINK_LAYER_PHY_CAPABILITIES_SW30GBPS_SHIFT (11)
646 #define SCU_LINK_LAYER_PHY_CAPABILITIES_SW30GBPS_MASK (0x00000801)
647 #define SCU_LINK_LAYER_PHY_CAPABILITIES_SWO60GBPS_SHIFT (12)
648 #define SCU_LINK_LAYER_PHY_CAPABILITIES_SWO60GBPS_MASK (0x00001001)
649 #define SCU_LINK_LAYER_PHY_CAPABILITIES_SW60GBPS_SHIFT (13)
650 #define SCU_LINK_LAYER_PHY_CAPABILITIES_SW60GBPS_MASK (0x00002001)
651 #define SCU_LINK_LAYER_PHY_CAPABILITIES_EVEN_PARITY_SHIFT (31)
652 #define SCU_LINK_LAYER_PHY_CAPABILITIES_EVEN_PARITY_MASK (0x80000000)
653 #define SCU_LINK_LAYER_PHY_CAPABILITIES_DEFAULT_MASK (0x00003F01)
654 #define SCU_LINK_LAYER_PHY_CAPABILITIES_REQUIRED_MASK (0x00000001)
655 #define SCU_LINK_LAYER_PHY_CAPABILITIES_RESERVED_MASK (0x7FFFC00D)
657 #define SCU_SAS_PHYCAP_GEN_VAL(name, value) \
658 SCU_GEN_VALUE(SCU_LINK_LAYER_PHY_CAPABILITIES_ ## name, value)
660 #define SCU_SAS_PHYCAP_GEN_BIT(name) \
661 SCU_GEN_BIT(SCU_LINK_LAYER_PHY_CAPABILITIES_ ## name)
664 #define SCU_LINK_LAYER_PHY_SOURCE_ZONE_GROUP_CONTROL_VIRTUAL_EXPANDER_PHY_ZONE_GROUP_SHIFT (0)
665 #define SCU_LINK_LAYER_PHY_SOURCE_ZONE_GROUP_CONTROL_VIRTUAL_EXPANDER_PHY_ZONE_GROUP_MASK (0x000000FF)
666 #define SCU_LINK_LAYER_PHY_SOURCE_ZONE_GROUP_CONTROL_INSIDE_SOURCE_ZONE_GROUP_SHIFT (31)
667 #define SCU_LINK_LAYER_PHY_SOURCE_ZONE_GROUP_CONTROL_INSIDE_SOURCE_ZONE_GROUP_MASK (0x80000000)
668 #define SCU_LINK_LAYER_PHY_SOURCE_ZONE_GROUP_CONTROL_RESERVED_MASK (0x7FFFFF00)
670 #define SCU_PSZGCR_GEN_VAL(name, value) \
671 SCU_GEN_VALUE(SCU_LINK_LAYER_PHY_SOURCE_ZONE_GROUP_CONTROL_ ## name, value)
673 #define SCU_PSZGCR_GEN_BIT(name) \
674 SCU_GEN_BIT(SCU_LINK_LAYER_PHY_SOURCE_ZONE_GROUP_CONTROL_ ## name)
676 #define SCU_PROTOCOL_ENGINE_GROUP_VIRTUAL_ZONING_EXPANDER_CONTROL_ZONE0_LOCKED_SHIFT (1)
677 #define SCU_PROTOCOL_ENGINE_GROUP_VIRTUAL_ZONING_EXPANDER_CONTROL_ZONE0_LOCKED_MASK (0x00000002)
678 #define SCU_PROTOCOL_ENGINE_GROUP_VIRTUAL_ZONING_EXPANDER_CONTROL_ZONE0_UPDATING_SHIFT (2)
679 #define SCU_PROTOCOL_ENGINE_GROUP_VIRTUAL_ZONING_EXPANDER_CONTROL_ZONE0_UPDATING_MASK (0x00000004)
680 #define SCU_PROTOCOL_ENGINE_GROUP_VIRTUAL_ZONING_EXPANDER_CONTROL_ZONE1_LOCKED_SHIFT (4)
681 #define SCU_PROTOCOL_ENGINE_GROUP_VIRTUAL_ZONING_EXPANDER_CONTROL_ZONE1_LOCKED_MASK (0x00000010)
682 #define SCU_PROTOCOL_ENGINE_GROUP_VIRTUAL_ZONING_EXPANDER_CONTROL_ZONE1_UPDATING_SHIFT (5)
683 #define SCU_PROTOCOL_ENGINE_GROUP_VIRTUAL_ZONING_EXPANDER_CONTROL_ZONE1_UPDATING_MASK (0x00000020)
684 #define SCU_PROTOCOL_ENGINE_GROUP_VIRTUAL_ZONING_EXPANDER_CONTROL_ZPT_ASSOCIATION_PE0_SHIFT (16)
685 #define SCU_PROTOCOL_ENGINE_GROUP_VIRTUAL_ZONING_EXPANDER_CONTROL_ZPT_ASSOCIATION_PE0_MASK (0x00030000)
686 #define SCU_PROTOCOL_ENGINE_GROUP_VIRTUAL_ZONING_EXPANDER_CONTROL_AIP_ENABLE_PE0_SHIFT (19)
687 #define SCU_PROTOCOL_ENGINE_GROUP_VIRTUAL_ZONING_EXPANDER_CONTROL_AIP_ENABLE_PE0_MASK (0x00080000)
688 #define SCU_PROTOCOL_ENGINE_GROUP_VIRTUAL_ZONING_EXPANDER_CONTROL_ZPT_ASSOCIATION_PE1_SHIFT (20)
689 #define SCU_PROTOCOL_ENGINE_GROUP_VIRTUAL_ZONING_EXPANDER_CONTROL_ZPT_ASSOCIATION_PE1_MASK (0x00300000)
690 #define SCU_PROTOCOL_ENGINE_GROUP_VIRTUAL_ZONING_EXPANDER_CONTROL_AIP_ENABLE_PE1_SHIFT (23)
691 #define SCU_PROTOCOL_ENGINE_GROUP_VIRTUAL_ZONING_EXPANDER_CONTROL_AIP_ENABLE_PE1_MASK (0x00800000)
692 #define SCU_PROTOCOL_ENGINE_GROUP_VIRTUAL_ZONING_EXPANDER_CONTROL_ZPT_ASSOCIATION_PE2_SHIFT (24)
693 #define SCU_PROTOCOL_ENGINE_GROUP_VIRTUAL_ZONING_EXPANDER_CONTROL_ZPT_ASSOCIATION_PE2_MASK (0x03000000)
694 #define SCU_PROTOCOL_ENGINE_GROUP_VIRTUAL_ZONING_EXPANDER_CONTROL_AIP_ENABLE_PE2_SHIFT (27)
695 #define SCU_PROTOCOL_ENGINE_GROUP_VIRTUAL_ZONING_EXPANDER_CONTROL_AIP_ENABLE_PE2_MASK (0x08000000)
696 #define SCU_PROTOCOL_ENGINE_GROUP_VIRTUAL_ZONING_EXPANDER_CONTROL_ZPT_ASSOCIATION_PE3_SHIFT (28)
697 #define SCU_PROTOCOL_ENGINE_GROUP_VIRTUAL_ZONING_EXPANDER_CONTROL_ZPT_ASSOCIATION_PE3_MASK (0x30000000)
698 #define SCU_PROTOCOL_ENGINE_GROUP_VIRTUAL_ZONING_EXPANDER_CONTROL_AIP_ENABLE_PE3_SHIFT (31)
699 #define SCU_PROTOCOL_ENGINE_GROUP_VIRTUAL_ZONING_EXPANDER_CONTROL_AIP_ENABLE_PE3_MASK (0x80000000)
700 #define SCU_PROTOCOL_ENGINE_GROUP_VIRTUAL_ZONING_EXPANDER_CONTROL_RESERVED_MASK (0x4444FFC9)
702 #define SCU_PEG_SCUVZECR_GEN_VAL(name, val) \
703 SCU_GEN_VALUE(SCU_PROTOCOL_ENGINE_GROUP_VIRTUAL_ZONING_EXPANDER_CONTROL_ ## name, val)
705 #define SCU_PEG_SCUVZECR_GEN_BIT(name) \
706 SCU_GEN_BIT(SCU_PROTOCOL_ENGINE_GROUP_VIRTUAL_ZONING_EXPANDER_CONTROL_ ## name)
710 * *****************************************************************************
711 * * Port Task Scheduler registers shift and mask values
712 * ***************************************************************************** */
713 #define SCU_PTSG_CONTROL_IT_NEXUS_TIMEOUT_SHIFT (0)
714 #define SCU_PTSG_CONTROL_IT_NEXUS_TIMEOUT_MASK (0x0000FFFF)
715 #define SCU_PTSG_CONTROL_TASK_TIMEOUT_SHIFT (16)
716 #define SCU_PTSG_CONTROL_TASK_TIMEOUT_MASK (0x00FF0000)
717 #define SCU_PTSG_CONTROL_PTSG_ENABLE_SHIFT (24)
718 #define SCU_PTSG_CONTROL_PTSG_ENABLE_MASK (0x01000000)
719 #define SCU_PTSG_CONTROL_ETM_ENABLE_SHIFT (25)
720 #define SCU_PTSG_CONTROL_ETM_ENABLE_MASK (0x02000000)
721 #define SCU_PTSG_CONTROL_DEFAULT_MASK (0x00020002)
722 #define SCU_PTSG_CONTROL_REQUIRED_MASK (0x00000000)
723 #define SCU_PTSG_CONTROL_RESERVED_MASK (0xFC000000)
725 #define SCU_PTSGCR_GEN_VAL(name, val) \
726 SCU_GEN_VALUE(SCU_PTSG_CONTROL_ ## name, val)
728 #define SCU_PTSGCR_GEN_BIT(name) \
729 SCU_GEN_BIT(SCU_PTSG_CONTROL_ ## name)
732 /* ***************************************************************************** */
733 #define SCU_PTSG_REAL_TIME_CLOCK_SHIFT (0)
734 #define SCU_PTSG_REAL_TIME_CLOCK_MASK (0x0000FFFF)
735 #define SCU_PTSG_REAL_TIME_CLOCK_RESERVED_MASK (0xFFFF0000)
737 #define SCU_RTCR_GEN_VAL(name, val) \
738 SCU_GEN_VALUE(SCU_PTSG_ ## name, val)
741 #define SCU_PTSG_REAL_TIME_CLOCK_CONTROL_PRESCALER_VALUE_SHIFT (0)
742 #define SCU_PTSG_REAL_TIME_CLOCK_CONTROL_PRESCALER_VALUE_MASK (0x00FFFFFF)
743 #define SCU_PTSG_REAL_TIME_CLOCK_CONTROL_RESERVED_MASK (0xFF000000)
745 #define SCU_RTCCR_GEN_VAL(name, val) \
746 SCU_GEN_VALUE(SCU_PTSG_REAL_TIME_CLOCK_CONTROL_ ## name, val)
749 #define SCU_PTSG_PORT_TASK_SCHEDULER_CONTROL_SUSPEND_SHIFT (0)
750 #define SCU_PTSG_PORT_TASK_SCHEDULER_CONTROL_SUSPEND_MASK (0x00000001)
751 #define SCU_PTSG_PORT_TASK_SCHEDULER_CONTROL_ENABLE_SHIFT (1)
752 #define SCU_PTSG_PORT_TASK_SCHEDULER_CONTROL_ENABLE_MASK (0x00000002)
753 #define SCU_PTSG_PORT_TASK_SCHEDULER_CONTROL_RESERVED_MASK (0xFFFFFFFC)
755 #define SCU_PTSxCR_GEN_BIT(name) \
756 SCU_GEN_BIT(SCU_PTSG_PORT_TASK_SCHEDULER_CONTROL_ ## name)
759 #define SCU_PTSG_PORT_TASK_SCHEDULER_STATUS_NEXT_RN_VALID_SHIFT (0)
760 #define SCU_PTSG_PORT_TASK_SCHEDULER_STATUS_NEXT_RN_VALID_MASK (0x00000001)
761 #define SCU_PTSG_PORT_TASK_SCHEDULER_STATUS_ACTIVE_RNSC_LIST_VALID_SHIFT (1)
762 #define SCU_PTSG_PORT_TASK_SCHEDULER_STATUS_ACTIVE_RNSC_LIST_VALID_MASK (0x00000002)
763 #define SCU_PTSG_PORT_TASK_SCHEDULER_STATUS_PTS_SUSPENDED_SHIFT (2)
764 #define SCU_PTSG_PORT_TASK_SCHEDULER_STATUS_PTS_SUSPENDED_MASK (0x00000004)
765 #define SCU_PTSG_PORT_TASK_SCHEDULER_STATUS_RESERVED_MASK (0xFFFFFFF8)
767 #define SCU_PTSxSR_GEN_BIT(name) \
768 SCU_GEN_BIT(SCU_PTSG_PORT_TASK_SCHEDULER_STATUS_ ## name)
772 * *****************************************************************************
773 * * SGPIO Register shift and mask values
774 * ***************************************************************************** */
775 #define SCU_SGPIO_CONTROL_SGPIO_ENABLE_SHIFT (0)
776 #define SCU_SGPIO_CONTROL_SGPIO_ENABLE_MASK (0x00000001)
777 #define SCU_SGPIO_CONTROL_SGPIO_SERIAL_CLOCK_SELECT_SHIFT (1)
778 #define SCU_SGPIO_CONTROL_SGPIO_SERIAL_CLOCK_SELECT_MASK (0x00000002)
779 #define SCU_SGPIO_CONTROL_SGPIO_SERIAL_SHIFT_WIDTH_SELECT_SHIFT (2)
780 #define SCU_SGPIO_CONTROL_SGPIO_SERIAL_SHIFT_WIDTH_SELECT_MASK (0x00000004)
781 #define SCU_SGPIO_CONTROL_SGPIO_TEST_BIT_SHIFT (15)
782 #define SCU_SGPIO_CONTROL_SGPIO_TEST_BIT_MASK (0x00008000)
783 #define SCU_SGPIO_CONTROL_SGPIO_RESERVED_MASK (0xFFFF7FF8)
785 #define SCU_SGICRx_GEN_BIT(name) \
786 SCU_GEN_BIT(SCU_SGPIO_CONTROL_SGPIO_ ## name)
788 #define SCU_SGPIO_PROGRAMMABLE_BLINK_REGISTER_R0_SHIFT (0)
789 #define SCU_SGPIO_PROGRAMMABLE_BLINK_REGISTER_R0_MASK (0x0000000F)
790 #define SCU_SGPIO_PROGRAMMABLE_BLINK_REGISTER_R1_SHIFT (4)
791 #define SCU_SGPIO_PROGRAMMABLE_BLINK_REGISTER_R1_MASK (0x000000F0)
792 #define SCU_SGPIO_PROGRAMMABLE_BLINK_REGISTER_R2_SHIFT (8)
793 #define SCU_SGPIO_PROGRAMMABLE_BLINK_REGISTER_R2_MASK (0x00000F00)
794 #define SCU_SGPIO_PROGRAMMABLE_BLINK_REGISTER_R3_SHIFT (12)
795 #define SCU_SGPIO_PROGRAMMABLE_BLINK_REGISTER_R3_MASK (0x0000F000)
796 #define SCU_SGPIO_PROGRAMMABLE_BLINK_REGISTER_RESERVED_MASK (0xFFFF0000)
798 #define SCU_SGPBRx_GEN_VAL(name, value) \
799 SCU_GEN_VALUE(SCU_SGPIO_PROGRAMMABLE_BLINK_REGISTER_ ## name, value)
801 #define SCU_SGPIO_START_DRIVE_LOWER_R0_SHIFT (0)
802 #define SCU_SGPIO_START_DRIVE_LOWER_R0_MASK (0x00000003)
803 #define SCU_SGPIO_START_DRIVE_LOWER_R1_SHIFT (4)
804 #define SCU_SGPIO_START_DRIVE_LOWER_R1_MASK (0x00000030)
805 #define SCU_SGPIO_START_DRIVE_LOWER_R2_SHIFT (8)
806 #define SCU_SGPIO_START_DRIVE_LOWER_R2_MASK (0x00000300)
807 #define SCU_SGPIO_START_DRIVE_LOWER_R3_SHIFT (12)
808 #define SCU_SGPIO_START_DRIVE_LOWER_R3_MASK (0x00003000)
809 #define SCU_SGPIO_START_DRIVE_LOWER_RESERVED_MASK (0xFFFF8888)
811 #define SCU_SGSDLRx_GEN_VAL(name, value) \
812 SCU_GEN_VALUE(SCU_SGPIO_START_DRIVE_LOWER_ ## name, value)
814 #define SCU_SGPIO_START_DRIVE_UPPER_R0_SHIFT (0)
815 #define SCU_SGPIO_START_DRIVE_UPPER_R0_MASK (0x00000003)
816 #define SCU_SGPIO_START_DRIVE_UPPER_R1_SHIFT (4)
817 #define SCU_SGPIO_START_DRIVE_UPPER_R1_MASK (0x00000030)
818 #define SCU_SGPIO_START_DRIVE_UPPER_R2_SHIFT (8)
819 #define SCU_SGPIO_START_DRIVE_UPPER_R2_MASK (0x00000300)
820 #define SCU_SGPIO_START_DRIVE_UPPER_R3_SHIFT (12)
821 #define SCU_SGPIO_START_DRIVE_UPPER_R3_MASK (0x00003000)
822 #define SCU_SGPIO_START_DRIVE_UPPER_RESERVED_MASK (0xFFFF8888)
824 #define SCU_SGSDURx_GEN_VAL(name, value) \
825 SCU_GEN_VALUE(SCU_SGPIO_START_DRIVE_LOWER_ ## name, value)
827 #define SCU_SGPIO_SERIAL_INPUT_DATA_LOWER_D0_SHIFT (0)
828 #define SCU_SGPIO_SERIAL_INPUT_DATA_LOWER_D0_MASK (0x00000003)
829 #define SCU_SGPIO_SERIAL_INPUT_DATA_LOWER_D1_SHIFT (4)
830 #define SCU_SGPIO_SERIAL_INPUT_DATA_LOWER_D1_MASK (0x00000030)
831 #define SCU_SGPIO_SERIAL_INPUT_DATA_LOWER_D2_SHIFT (8)
832 #define SCU_SGPIO_SERIAL_INPUT_DATA_LOWER_D2_MASK (0x00000300)
833 #define SCU_SGPIO_SERIAL_INPUT_DATA_LOWER_D3_SHIFT (12)
834 #define SCU_SGPIO_SERIAL_INPUT_DATA_LOWER_D3_MASK (0x00003000)
835 #define SCU_SGPIO_SERIAL_INPUT_DATA_LOWER_RESERVED_MASK (0xFFFF8888)
837 #define SCU_SGSIDLRx_GEN_VAL(name, value) \
838 SCU_GEN_VALUE(SCU_SGPIO_SERIAL_INPUT_DATA_LOWER_ ## name, value)
840 #define SCU_SGPIO_SERIAL_INPUT_DATA_UPPER_D0_SHIFT (0)
841 #define SCU_SGPIO_SERIAL_INPUT_DATA_UPPER_D0_MASK (0x00000003)
842 #define SCU_SGPIO_SERIAL_INPUT_DATA_UPPER_D1_SHIFT (4)
843 #define SCU_SGPIO_SERIAL_INPUT_DATA_UPPER_D1_MASK (0x00000030)
844 #define SCU_SGPIO_SERIAL_INPUT_DATA_UPPER_D2_SHIFT (8)
845 #define SCU_SGPIO_SERIAL_INPUT_DATA_UPPER_D2_MASK (0x00000300)
846 #define SCU_SGPIO_SERIAL_INPUT_DATA_UPPER_D3_SHIFT (12)
847 #define SCU_SGPIO_SERIAL_INPUT_DATA_UPPER_D3_MASK (0x00003000)
848 #define SCU_SGPIO_SERIAL_INPUT_DATA_UPPER_RESERVED_MASK (0xFFFF8888)
850 #define SCU_SGSIDURx_GEN_VAL(name, value) \
851 SCU_GEN_VALUE(SCU_SGPIO_SERIAL_INPUT_DATA_LOWER_ ## name, value)
853 #define SCU_SGPIO_VENDOR_SPECIFIC_CODE_SHIFT (0)
854 #define SCU_SGPIO_VENDOR_SPECIFIC_CODE_MASK (0x0000000F)
855 #define SCU_SGPIO_VENDOR_SPECIFIC_CODE_RESERVED_MASK (0xFFFFFFF0)
857 #define SCU_SGVSCR_GEN_VAL(value) \
858 SCU_GEN_VALUE(SCU_SGPIO_VENDOR_SPECIFIC_CODE ## name, value)
860 #define SCU_SGPIO_OUPUT_DATA_SELECT_INPUT_DATA0_SHIFT (0)
861 #define SCU_SGPIO_OUPUT_DATA_SELECT_INPUT_DATA0_MASK (0x00000003)
862 #define SCU_SGPIO_OUPUT_DATA_SELECT_INVERT_INPUT_DATA0_SHIFT (2)
863 #define SCU_SGPIO_OUPUT_DATA_SELECT_INVERT_INPUT_DATA0_MASK (0x00000004)
864 #define SCU_SGPIO_OUPUT_DATA_SELECT_JOG_ENABLE_DATA0_SHIFT (3)
865 #define SCU_SGPIO_OUPUT_DATA_SELECT_JOG_ENABLE_DATA0_MASK (0x00000008)
866 #define SCU_SGPIO_OUPUT_DATA_SELECT_INPUT_DATA1_SHIFT (4)
867 #define SCU_SGPIO_OUPUT_DATA_SELECT_INPUT_DATA1_MASK (0x00000030)
868 #define SCU_SGPIO_OUPUT_DATA_SELECT_INVERT_INPUT_DATA1_SHIFT (6)
869 #define SCU_SGPIO_OUPUT_DATA_SELECT_INVERT_INPUT_DATA1_MASK (0x00000040)
870 #define SCU_SGPIO_OUPUT_DATA_SELECT_JOG_ENABLE_DATA1_SHIFT (7)
871 #define SCU_SGPIO_OUPUT_DATA_SELECT_JOG_ENABLE_DATA1_MASK (0x00000080)
872 #define SCU_SGPIO_OUPUT_DATA_SELECT_INPUT_DATA2_SHIFT (8)
873 #define SCU_SGPIO_OUPUT_DATA_SELECT_INPUT_DATA2_MASK (0x00000300)
874 #define SCU_SGPIO_OUPUT_DATA_SELECT_INVERT_INPUT_DATA2_SHIFT (10)
875 #define SCU_SGPIO_OUPUT_DATA_SELECT_INVERT_INPUT_DATA2_MASK (0x00000400)
876 #define SCU_SGPIO_OUPUT_DATA_SELECT_JOG_ENABLE_DATA2_SHIFT (11)
877 #define SCU_SGPIO_OUPUT_DATA_SELECT_JOG_ENABLE_DATA2_MASK (0x00000800)
878 #define SCU_SGPIO_OUPUT_DATA_SELECT_RESERVED_MASK (0xFFFFF000)
880 #define SCU_SGODSR_GEN_VAL(name, value) \
881 SCU_GEN_VALUE(SCU_SGPIO_OUPUT_DATA_SELECT_ ## name, value)
883 #define SCU_SGODSR_GEN_BIT(name) \
884 SCU_GEN_BIT(SCU_SGPIO_OUPUT_DATA_SELECT_ ## name)
887 * *****************************************************************************
889 * ***************************************************************************** */
892 * ----------------------------------------------------------------------------
894 * These registers are based off of BAR0
896 * To calculate the offset for other functions use
897 * BAR0 + FN# * SystemPageSize * 2
899 * The TCA is only accessable from FN#0 (Physical Function) and each
900 * is programmed by (BAR0 + SCU_SMU_TCA_OFFSET + (FN# * 0x04)) or
901 * TCA0 for FN#0 is at BAR0 + 0x0400
902 * TCA1 for FN#1 is at BAR0 + 0x0404
904 * ----------------------------------------------------------------------------
905 * Accessable to all FN#s */
906 #define SCU_SMU_PCP_OFFSET 0x0000
907 #define SCU_SMU_AMR_OFFSET 0x0004
908 #define SCU_SMU_ISR_OFFSET 0x0010
909 #define SCU_SMU_IMR_OFFSET 0x0014
910 #define SCU_SMU_ICC_OFFSET 0x0018
911 #define SCU_SMU_HTTLBAR_OFFSET 0x0020
912 #define SCU_SMU_HTTUBAR_OFFSET 0x0024
913 #define SCU_SMU_TCR_OFFSET 0x0028
914 #define SCU_SMU_CQLBAR_OFFSET 0x0030
915 #define SCU_SMU_CQUBAR_OFFSET 0x0034
916 #define SCU_SMU_CQPR_OFFSET 0x0040
917 #define SCU_SMU_CQGR_OFFSET 0x0044
918 #define SCU_SMU_CQC_OFFSET 0x0048
919 /* Accessable to FN#0 only */
920 #define SCU_SMU_RNCLBAR_OFFSET 0x0080
921 #define SCU_SMU_RNCUBAR_OFFSET 0x0084
922 #define SCU_SMU_DCC_OFFSET 0x0090
923 #define SCU_SMU_DFC_OFFSET 0x0094
924 #define SCU_SMU_SMUCSR_OFFSET 0x0098
925 #define SCU_SMU_SCUSRCR_OFFSET 0x009C
926 #define SCU_SMU_SMAW_OFFSET 0x00A0
927 #define SCU_SMU_SMDW_OFFSET 0x00A4
928 /* Accessable to FN#0 only */
929 #define SCU_SMU_TCA_OFFSET 0x0400
930 /* Accessable to all FN#s */
931 #define SCU_SMU_MT_MLAR0_OFFSET 0x2000
932 #define SCU_SMU_MT_MUAR0_OFFSET 0x2004
933 #define SCU_SMU_MT_MDR0_OFFSET 0x2008
934 #define SCU_SMU_MT_VCR0_OFFSET 0x200C
935 #define SCU_SMU_MT_MLAR1_OFFSET 0x2010
936 #define SCU_SMU_MT_MUAR1_OFFSET 0x2014
937 #define SCU_SMU_MT_MDR1_OFFSET 0x2018
938 #define SCU_SMU_MT_VCR1_OFFSET 0x201C
939 #define SCU_SMU_MPBA_OFFSET 0x3000
942 * struct smu_registers - These are the SMU registers
946 struct smu_registers
{
948 u32 post_context_port
;
950 u32 address_modifier
;
954 u32 interrupt_status
;
958 u32 interrupt_coalesce_control
;
961 u32 host_task_table_lower
;
963 u32 host_task_table_upper
;
965 u32 task_context_range
;
968 u32 completion_queue_lower
;
970 u32 completion_queue_upper
;
974 u32 completion_queue_put
;
976 u32 completion_queue_get
;
978 u32 completion_queue_control
;
984 * Accessable to FN#0 only
986 u32 remote_node_context_lower
;
988 u32 remote_node_context_upper
;
992 u32 device_context_capacity
;
994 u32 device_function_capacity
;
998 u32 soft_reset_control
;
1000 u32 mmr_address_window
;
1002 u32 mmr_data_window
;
1005 /* A whole bunch of reserved space */
1011 u32 reserved_1xx
[64];
1012 u32 reserved_2xx
[64];
1013 u32 reserved_3xx
[64];
1015 * Accessable to FN#0 only
1017 u32 task_context_assignment
[256];
1018 /* MSI-X registers not included */
1022 * *****************************************************************************
1024 * ***************************************************************************** */
1025 #define SCU_SDMA_BASE 0x6000
1026 #define SCU_SDMA_PUFATLHAR_OFFSET 0x0000
1027 #define SCU_SDMA_PUFATUHAR_OFFSET 0x0004
1028 #define SCU_SDMA_UFLHBAR_OFFSET 0x0008
1029 #define SCU_SDMA_UFUHBAR_OFFSET 0x000C
1030 #define SCU_SDMA_UFQC_OFFSET 0x0010
1031 #define SCU_SDMA_UFQPP_OFFSET 0x0014
1032 #define SCU_SDMA_UFQGP_OFFSET 0x0018
1033 #define SCU_SDMA_PDMACR_OFFSET 0x001C
1034 #define SCU_SDMA_CDMACR_OFFSET 0x0080
1037 * struct scu_sdma_registers - These are the SCU SDMA Registers
1041 struct scu_sdma_registers
{
1042 /* 0x0000 PUFATLHAR */
1043 u32 uf_address_table_lower
;
1044 /* 0x0004 PUFATUHAR */
1045 u32 uf_address_table_upper
;
1046 /* 0x0008 UFLHBAR */
1047 u32 uf_header_base_address_lower
;
1048 /* 0x000C UFUHBAR */
1049 u32 uf_header_base_address_upper
;
1051 u32 unsolicited_frame_queue_control
;
1053 u32 unsolicited_frame_put_pointer
;
1055 u32 unsolicited_frame_get_pointer
;
1057 u32 pdma_configuration
;
1058 /* Reserved until offset 0x80 */
1059 u32 reserved_0020_007C
[0x18];
1061 u32 cdma_configuration
;
1062 /* Remainder SDMA register space */
1063 u32 reserved_0084_0400
[0xDF];
1068 * *****************************************************************************
1069 * * SCU Link Registers
1070 * ***************************************************************************** */
1071 #define SCU_PEG0_OFFSET 0x0000
1072 #define SCU_PEG1_OFFSET 0x8000
1074 #define SCU_TL0_OFFSET 0x0000
1075 #define SCU_TL1_OFFSET 0x0400
1076 #define SCU_TL2_OFFSET 0x0800
1077 #define SCU_TL3_OFFSET 0x0C00
1079 #define SCU_LL_OFFSET 0x0080
1080 #define SCU_LL0_OFFSET (SCU_TL0_OFFSET + SCU_LL_OFFSET)
1081 #define SCU_LL1_OFFSET (SCU_TL1_OFFSET + SCU_LL_OFFSET)
1082 #define SCU_LL2_OFFSET (SCU_TL2_OFFSET + SCU_LL_OFFSET)
1083 #define SCU_LL3_OFFSET (SCU_TL3_OFFSET + SCU_LL_OFFSET)
1085 /* Transport Layer Offsets (PEG + TL) */
1086 #define SCU_TLCR_OFFSET 0x0000
1087 #define SCU_TLADTR_OFFSET 0x0004
1088 #define SCU_TLTTMR_OFFSET 0x0008
1089 #define SCU_TLEECR0_OFFSET 0x000C
1090 #define SCU_STPTLDARNI_OFFSET 0x0010
1093 #define SCU_TLCR_HASH_SAS_CHECKING_ENABLE_SHIFT (0)
1094 #define SCU_TLCR_HASH_SAS_CHECKING_ENABLE_MASK (0x00000001)
1095 #define SCU_TLCR_CLEAR_TCI_NCQ_MAPPING_TABLE_SHIFT (1)
1096 #define SCU_TLCR_CLEAR_TCI_NCQ_MAPPING_TABLE_MASK (0x00000002)
1097 #define SCU_TLCR_STP_WRITE_DATA_PREFETCH_SHIFT (3)
1098 #define SCU_TLCR_STP_WRITE_DATA_PREFETCH_MASK (0x00000008)
1099 #define SCU_TLCR_CMD_NAK_STATUS_CODE_SHIFT (4)
1100 #define SCU_TLCR_CMD_NAK_STATUS_CODE_MASK (0x00000010)
1101 #define SCU_TLCR_RESERVED_MASK (0xFFFFFFEB)
1103 #define SCU_TLCR_GEN_BIT(name) \
1104 SCU_GEN_BIT(SCU_TLCR_ ## name)
1107 * struct scu_transport_layer_registers - These are the SCU Transport Layer
1112 struct scu_transport_layer_registers
{
1116 u32 arbitration_delay_timer
;
1118 u32 timer_test_mode
;
1119 /* 0x000C reserved */
1121 /* 0x0010 STPTLDARNI */
1123 /* 0x0014 TLFEWPORCTRL */
1124 u32 tlfe_wpo_read_control
;
1125 /* 0x0018 TLFEWPORDATA */
1126 u32 tlfe_wpo_read_data
;
1127 /* 0x001C RXTLSSCSR1 */
1128 u32 rxtl_single_step_control_status_1
;
1129 /* 0x0020 RXTLSSCSR2 */
1130 u32 rxtl_single_step_control_status_2
;
1131 /* 0x0024 AWTRDDCR */
1132 u32 tlfe_awt_retry_delay_debug_control
;
1133 /* Remainder of TL memory space */
1134 u32 reserved_0028_007F
[0x16];
1138 /* Protocol Engine Group Registers */
1139 #define SCU_SCUVZECRx_OFFSET 0x1080
1141 /* Link Layer Offsets (PEG + TL + LL) */
1142 #define SCU_SAS_SPDTOV_OFFSET 0x0000
1143 #define SCU_SAS_LLSTA_OFFSET 0x0004
1144 #define SCU_SATA_PSELTOV_OFFSET 0x0008
1145 #define SCU_SAS_TIMETOV_OFFSET 0x0010
1146 #define SCU_SAS_LOSTOT_OFFSET 0x0014
1147 #define SCU_SAS_LNKTOV_OFFSET 0x0018
1148 #define SCU_SAS_PHYTOV_OFFSET 0x001C
1149 #define SCU_SAS_AFERCNT_OFFSET 0x0020
1150 #define SCU_SAS_WERCNT_OFFSET 0x0024
1151 #define SCU_SAS_TIID_OFFSET 0x0028
1152 #define SCU_SAS_TIDNH_OFFSET 0x002C
1153 #define SCU_SAS_TIDNL_OFFSET 0x0030
1154 #define SCU_SAS_TISSAH_OFFSET 0x0034
1155 #define SCU_SAS_TISSAL_OFFSET 0x0038
1156 #define SCU_SAS_TIPID_OFFSET 0x003C
1157 #define SCU_SAS_TIRES2_OFFSET 0x0040
1158 #define SCU_SAS_ADRSTA_OFFSET 0x0044
1159 #define SCU_SAS_MAWTTOV_OFFSET 0x0048
1160 #define SCU_SAS_FRPLDFIL_OFFSET 0x0054
1161 #define SCU_SAS_RFCNT_OFFSET 0x0060
1162 #define SCU_SAS_TFCNT_OFFSET 0x0064
1163 #define SCU_SAS_RFDCNT_OFFSET 0x0068
1164 #define SCU_SAS_TFDCNT_OFFSET 0x006C
1165 #define SCU_SAS_LERCNT_OFFSET 0x0070
1166 #define SCU_SAS_RDISERRCNT_OFFSET 0x0074
1167 #define SCU_SAS_CRERCNT_OFFSET 0x0078
1168 #define SCU_STPCTL_OFFSET 0x007C
1169 #define SCU_SAS_PCFG_OFFSET 0x0080
1170 #define SCU_SAS_CLKSM_OFFSET 0x0084
1171 #define SCU_SAS_TXCOMWAKE_OFFSET 0x0088
1172 #define SCU_SAS_TXCOMINIT_OFFSET 0x008C
1173 #define SCU_SAS_TXCOMSAS_OFFSET 0x0090
1174 #define SCU_SAS_COMINIT_OFFSET 0x0094
1175 #define SCU_SAS_COMWAKE_OFFSET 0x0098
1176 #define SCU_SAS_COMSAS_OFFSET 0x009C
1177 #define SCU_SAS_SFERCNT_OFFSET 0x00A0
1178 #define SCU_SAS_CDFERCNT_OFFSET 0x00A4
1179 #define SCU_SAS_DNFERCNT_OFFSET 0x00A8
1180 #define SCU_SAS_PRSTERCNT_OFFSET 0x00AC
1181 #define SCU_SAS_CNTCTL_OFFSET 0x00B0
1182 #define SCU_SAS_SSPTOV_OFFSET 0x00B4
1183 #define SCU_FTCTL_OFFSET 0x00B8
1184 #define SCU_FRCTL_OFFSET 0x00BC
1185 #define SCU_FTWMRK_OFFSET 0x00C0
1186 #define SCU_ENSPINUP_OFFSET 0x00C4
1187 #define SCU_SAS_TRNTOV_OFFSET 0x00C8
1188 #define SCU_SAS_PHYCAP_OFFSET 0x00CC
1189 #define SCU_SAS_PHYCTL_OFFSET 0x00D0
1190 #define SCU_SAS_LLCTL_OFFSET 0x00D8
1191 #define SCU_AFE_XCVRCR_OFFSET 0x00DC
1192 #define SCU_AFE_LUTCR_OFFSET 0x00E0
1194 #define SCU_SAS_LINK_LAYER_CONTROL_MAX_LINK_RATE_SHIFT (0)
1195 #define SCU_SAS_LINK_LAYER_CONTROL_MAX_LINK_RATE_MASK (0x00000003)
1196 #define SCU_SAS_LINK_LAYER_CONTROL_MAX_LINK_RATE_GEN1 (0)
1197 #define SCU_SAS_LINK_LAYER_CONTROL_MAX_LINK_RATE_GEN2 (1)
1198 #define SCU_SAS_LINK_LAYER_CONTROL_MAX_LINK_RATE_GEN3 (2)
1199 #define SCU_SAS_LINK_LAYER_CONTROL_BROADCAST_PRIMITIVE_SHIFT (2)
1200 #define SCU_SAS_LINK_LAYER_CONTROL_BROADCAST_PRIMITIVE_MASK (0x000003FC)
1201 #define SCU_SAS_LINK_LAYER_CONTROL_CLOSE_NO_ACTIVE_TASK_DISABLE_SHIFT (16)
1202 #define SCU_SAS_LINK_LAYER_CONTROL_CLOSE_NO_ACTIVE_TASK_DISABLE_MASK (0x00010000)
1203 #define SCU_SAS_LINK_LAYER_CONTROL_CLOSE_NO_OUTBOUND_TASK_DISABLE_SHIFT (17)
1204 #define SCU_SAS_LINK_LAYER_CONTROL_CLOSE_NO_OUTBOUND_TASK_DISABLE_MASK (0x00020000)
1205 #define SCU_SAS_LINK_LAYER_CONTROL_NO_OUTBOUND_TASK_TIMEOUT_SHIFT (24)
1206 #define SCU_SAS_LINK_LAYER_CONTROL_NO_OUTBOUND_TASK_TIMEOUT_MASK (0xFF000000)
1207 #define SCU_SAS_LINK_LAYER_CONTROL_RESERVED (0x00FCFC00)
1209 #define SCU_SAS_LLCTL_GEN_VAL(name, value) \
1210 SCU_GEN_VALUE(SCU_SAS_LINK_LAYER_CONTROL_ ## name, value)
1212 #define SCU_SAS_LLCTL_GEN_BIT(name) \
1213 SCU_GEN_BIT(SCU_SAS_LINK_LAYER_CONTROL_ ## name)
1216 /* #define SCU_FRXHECR_DCNT_OFFSET 0x00B0 */
1217 #define SCU_PSZGCR_OFFSET 0x00E4
1218 #define SCU_SAS_RECPHYCAP_OFFSET 0x00E8
1219 /* #define SCU_TX_LUTSEL_OFFSET 0x00B8 */
1221 #define SCU_SAS_PTxC_OFFSET 0x00D4 /* Same offset as SAS_TCTSTM */
1224 * struct scu_link_layer_registers - SCU Link Layer Registers
1228 struct scu_link_layer_registers
{
1229 /* 0x0000 SAS_SPDTOV */
1230 u32 speed_negotiation_timers
;
1231 /* 0x0004 SAS_LLSTA */
1232 u32 link_layer_status
;
1233 /* 0x0008 SATA_PSELTOV */
1234 u32 port_selector_timeout
;
1236 /* 0x0010 SAS_TIMETOV */
1237 u32 timeout_unit_value
;
1238 /* 0x0014 SAS_RCDTOV */
1240 /* 0x0018 SAS_LNKTOV */
1241 u32 link_timer_timeouts
;
1242 /* 0x001C SAS_PHYTOV */
1243 u32 sas_phy_timeouts
;
1244 /* 0x0020 SAS_AFERCNT */
1245 u32 received_address_frame_error_counter
;
1246 /* 0x0024 SAS_WERCNT */
1247 u32 invalid_dword_counter
;
1248 /* 0x0028 SAS_TIID */
1249 u32 transmit_identification
;
1250 /* 0x002C SAS_TIDNH */
1251 u32 sas_device_name_high
;
1252 /* 0x0030 SAS_TIDNL */
1253 u32 sas_device_name_low
;
1254 /* 0x0034 SAS_TISSAH */
1255 u32 source_sas_address_high
;
1256 /* 0x0038 SAS_TISSAL */
1257 u32 source_sas_address_low
;
1258 /* 0x003C SAS_TIPID */
1259 u32 identify_frame_phy_id
;
1260 /* 0x0040 SAS_TIRES2 */
1261 u32 identify_frame_reserved
;
1262 /* 0x0044 SAS_ADRSTA */
1263 u32 received_address_frame
;
1264 /* 0x0048 SAS_MAWTTOV */
1265 u32 maximum_arbitration_wait_timer_timeout
;
1266 /* 0x004C SAS_PTxC */
1267 u32 transmit_primitive
;
1268 /* 0x0050 SAS_RORES */
1269 u32 error_counter_event_notification_control
;
1270 /* 0x0054 SAS_FRPLDFIL */
1271 u32 frxq_payload_fill_threshold
;
1272 /* 0x0058 SAS_LLHANG_TOT */
1273 u32 link_layer_hang_detection_timeout
;
1275 /* 0x0060 SAS_RFCNT */
1276 u32 received_frame_count
;
1277 /* 0x0064 SAS_TFCNT */
1278 u32 transmit_frame_count
;
1279 /* 0x0068 SAS_RFDCNT */
1280 u32 received_dword_count
;
1281 /* 0x006C SAS_TFDCNT */
1282 u32 transmit_dword_count
;
1283 /* 0x0070 SAS_LERCNT */
1284 u32 loss_of_sync_error_count
;
1285 /* 0x0074 SAS_RDISERRCNT */
1286 u32 running_disparity_error_count
;
1287 /* 0x0078 SAS_CRERCNT */
1288 u32 received_frame_crc_error_count
;
1291 /* 0x0080 SAS_PCFG */
1292 u32 phy_configuration
;
1293 /* 0x0084 SAS_CLKSM */
1294 u32 clock_skew_management
;
1295 /* 0x0088 SAS_TXCOMWAKE */
1296 u32 transmit_comwake_signal
;
1297 /* 0x008C SAS_TXCOMINIT */
1298 u32 transmit_cominit_signal
;
1299 /* 0x0090 SAS_TXCOMSAS */
1300 u32 transmit_comsas_signal
;
1301 /* 0x0094 SAS_COMINIT */
1302 u32 cominit_control
;
1303 /* 0x0098 SAS_COMWAKE */
1304 u32 comwake_control
;
1305 /* 0x009C SAS_COMSAS */
1307 /* 0x00A0 SAS_SFERCNT */
1308 u32 received_short_frame_count
;
1309 /* 0x00A4 SAS_CDFERCNT */
1310 u32 received_frame_without_credit_count
;
1311 /* 0x00A8 SAS_DNFERCNT */
1312 u32 received_frame_after_done_count
;
1313 /* 0x00AC SAS_PRSTERCNT */
1314 u32 phy_reset_problem_count
;
1315 /* 0x00B0 SAS_CNTCTL */
1316 u32 counter_control
;
1317 /* 0x00B4 SAS_SSPTOV */
1318 u32 ssp_timer_timeout_values
;
1325 /* 0x00C4 ENSPINUP */
1326 u32 notify_enable_spinup_control
;
1327 /* 0x00C8 SAS_TRNTOV */
1328 u32 sas_training_sequence_timer_values
;
1329 /* 0x00CC SAS_PHYCAP */
1330 u32 phy_capabilities
;
1331 /* 0x00D0 SAS_PHYCTL */
1335 u32 link_layer_control
;
1336 /* 0x00DC AFE_XCVRCR */
1337 u32 afe_xcvr_control
;
1338 /* 0x00E0 AFE_LUTCR */
1339 u32 afe_lookup_table_control
;
1341 u32 phy_source_zone_group_control
;
1342 /* 0x00E8 SAS_RECPHYCAP */
1345 /* 0x00F0 SNAFERXRSTCTL */
1346 u32 speed_negotiation_afe_rx_reset_control
;
1347 /* 0x00F4 SAS_SSIPMCTL */
1348 u32 power_management_control
;
1349 /* 0x00F8 SAS_PSPREQ_PRIM */
1350 u32 sas_pm_partial_request_primitive
;
1351 /* 0x00FC SAS_PSSREQ_PRIM */
1352 u32 sas_pm_slumber_request_primitive
;
1353 /* 0x0100 SAS_PPSACK_PRIM */
1354 u32 sas_pm_ack_primitive_register
;
1355 /* 0x0104 SAS_PSNAK_PRIM */
1356 u32 sas_pm_nak_primitive_register
;
1357 /* 0x0108 SAS_SSIPMTOV */
1358 u32 sas_primitive_timeout
;
1360 /* 0x0110 - 0x011C PLAPRDCTRLxREG */
1361 u32 pla_product_control
[4];
1362 /* 0x0120 PLAPRDSUMREG */
1363 u32 pla_product_sum
;
1364 /* 0x0124 PLACONTROLREG */
1366 /* Remainder of memory space 896 bytes */
1367 u32 reserved_0128_037f
[0x96];
1372 * 0x00D4 // Same offset as SAS_TCTSTM SAS_PTxC
1373 * u32 primitive_transmit_control; */
1376 * ----------------------------------------------------------------------------
1378 * ---------------------------------------------------------------------------- */
1379 #define SCU_SGPIO_OFFSET 0x1400
1381 /* #define SCU_SGPIO_OFFSET 0x6000 // later moves to 0x1400 see HSD 652625 */
1382 #define SCU_SGPIO_SGICR_OFFSET 0x0000
1383 #define SCU_SGPIO_SGPBR_OFFSET 0x0004
1384 #define SCU_SGPIO_SGSDLR_OFFSET 0x0008
1385 #define SCU_SGPIO_SGSDUR_OFFSET 0x000C
1386 #define SCU_SGPIO_SGSIDLR_OFFSET 0x0010
1387 #define SCU_SGPIO_SGSIDUR_OFFSET 0x0014
1388 #define SCU_SGPIO_SGVSCR_OFFSET 0x0018
1389 /* Address from 0x0820 to 0x083C */
1390 #define SCU_SGPIO_SGODSR_OFFSET 0x0020
1393 * struct scu_sgpio_registers - SCU SGPIO Registers
1397 struct scu_sgpio_registers
{
1398 /* 0x0000 SGPIO_SGICR */
1399 u32 interface_control
;
1400 /* 0x0004 SGPIO_SGPBR */
1402 /* 0x0008 SGPIO_SGSDLR */
1403 u32 start_drive_lower
;
1404 /* 0x000C SGPIO_SGSDUR */
1405 u32 start_drive_upper
;
1406 /* 0x0010 SGPIO_SGSIDLR */
1407 u32 serial_input_lower
;
1408 /* 0x0014 SGPIO_SGSIDUR */
1409 u32 serial_input_upper
;
1410 /* 0x0018 SGPIO_SGVSCR */
1411 u32 vendor_specific_code
;
1412 /* 0x0020 SGPIO_SGODSR */
1413 u32 ouput_data_select
[8];
1414 /* Remainder of memory space 256 bytes */
1415 u32 reserved_1444_14ff
[0x31];
1420 * *****************************************************************************
1421 * * Defines for VIIT entry offsets
1422 * * Access additional entries by SCU_VIIT_BASE + index * 0x10
1423 * ***************************************************************************** */
1424 #define SCU_VIIT_BASE 0x1c00
1426 struct scu_viit_registers
{
1431 * *****************************************************************************
1432 * * SCU PORT TASK SCHEDULER REGISTERS
1433 * ***************************************************************************** */
1435 #define SCU_PTSG_BASE 0x1000
1437 #define SCU_PTSG_PTSGCR_OFFSET 0x0000
1438 #define SCU_PTSG_RTCR_OFFSET 0x0004
1439 #define SCU_PTSG_RTCCR_OFFSET 0x0008
1440 #define SCU_PTSG_PTS0CR_OFFSET 0x0010
1441 #define SCU_PTSG_PTS0SR_OFFSET 0x0014
1442 #define SCU_PTSG_PTS1CR_OFFSET 0x0018
1443 #define SCU_PTSG_PTS1SR_OFFSET 0x001C
1444 #define SCU_PTSG_PTS2CR_OFFSET 0x0020
1445 #define SCU_PTSG_PTS2SR_OFFSET 0x0024
1446 #define SCU_PTSG_PTS3CR_OFFSET 0x0028
1447 #define SCU_PTSG_PTS3SR_OFFSET 0x002C
1448 #define SCU_PTSG_PCSPE0CR_OFFSET 0x0030
1449 #define SCU_PTSG_PCSPE1CR_OFFSET 0x0034
1450 #define SCU_PTSG_PCSPE2CR_OFFSET 0x0038
1451 #define SCU_PTSG_PCSPE3CR_OFFSET 0x003C
1452 #define SCU_PTSG_ETMTSCCR_OFFSET 0x0040
1453 #define SCU_PTSG_ETMRNSCCR_OFFSET 0x0044
1456 * struct scu_port_task_scheduler_registers - These are the control/stats pairs
1457 * for each Port Task Scheduler.
1461 struct scu_port_task_scheduler_registers
{
1467 * struct scu_port_task_scheduler_group_registers - These are the PORT Task
1468 * Scheduler registers
1472 struct scu_port_task_scheduler_group_registers
{
1476 u32 real_time_clock
;
1478 u32 real_time_clock_control
;
1490 struct scu_port_task_scheduler_registers port
[4];
1495 * 0x003C PCSPE3CR */
1496 u32 protocol_engine
[4];
1497 /* 0x0040 ETMTSCCR */
1498 u32 tc_scanning_interval_control
;
1499 /* 0x0044 ETMRNSCCR */
1500 u32 rnc_scanning_interval_control
;
1501 /* Remainder of memory space 128 bytes */
1502 u32 reserved_1048_107f
[0x0E];
1506 #define SCU_PTSG_SCUVZECR_OFFSET 0x003C
1509 * *****************************************************************************
1511 * ***************************************************************************** */
1512 #define SCU_AFE_MMR_BASE 0xE000
1515 * AFE 0 is at offset 0x0800
1516 * AFE 1 is at offset 0x0900
1517 * AFE 2 is at offset 0x0a00
1518 * AFE 3 is at offset 0x0b00 */
1519 struct scu_afe_transceiver
{
1520 /* 0x0000 AFE_XCVR_CTRL0 */
1521 u32 afe_xcvr_control0
;
1522 /* 0x0004 AFE_XCVR_CTRL1 */
1523 u32 afe_xcvr_control1
;
1526 /* 0x000c afe_dfx_rx_control0 */
1527 u32 afe_dfx_rx_control0
;
1528 /* 0x0010 AFE_DFX_RX_CTRL1 */
1529 u32 afe_dfx_rx_control1
;
1532 /* 0x0018 AFE_DFX_RX_STS0 */
1533 u32 afe_dfx_rx_status0
;
1534 /* 0x001c AFE_DFX_RX_STS1 */
1535 u32 afe_dfx_rx_status1
;
1538 /* 0x0024 AFE_TX_CTRL */
1540 /* 0x0028 AFE_TX_AMP_CTRL0 */
1541 u32 afe_tx_amp_control0
;
1542 /* 0x002c AFE_TX_AMP_CTRL1 */
1543 u32 afe_tx_amp_control1
;
1544 /* 0x0030 AFE_TX_AMP_CTRL2 */
1545 u32 afe_tx_amp_control2
;
1546 /* 0x0034 AFE_TX_AMP_CTRL3 */
1547 u32 afe_tx_amp_control3
;
1548 /* 0x0038 afe_tx_ssc_control */
1549 u32 afe_tx_ssc_control
;
1552 /* 0x0040 AFE_RX_SSC_CTRL0 */
1553 u32 afe_rx_ssc_control0
;
1554 /* 0x0044 AFE_RX_SSC_CTRL1 */
1555 u32 afe_rx_ssc_control1
;
1556 /* 0x0048 AFE_RX_SSC_CTRL2 */
1557 u32 afe_rx_ssc_control2
;
1558 /* 0x004c AFE_RX_EQ_STS0 */
1559 u32 afe_rx_eq_status0
;
1560 /* 0x0050 AFE_RX_EQ_STS1 */
1561 u32 afe_rx_eq_status1
;
1562 /* 0x0054 AFE_RX_CDR_STS */
1563 u32 afe_rx_cdr_status
;
1566 /* 0x005c AFE_CHAN_CTRL */
1567 u32 afe_channel_control
;
1569 u32 reserved_0060_006c
[0x04];
1570 /* 0x0070 AFE_XCVR_EC_STS0 */
1571 u32 afe_xcvr_error_capture_status0
;
1572 /* 0x0074 AFE_XCVR_EC_STS1 */
1573 u32 afe_xcvr_error_capture_status1
;
1574 /* 0x0078 AFE_XCVR_EC_STS2 */
1575 u32 afe_xcvr_error_capture_status2
;
1576 /* 0x007c afe_xcvr_ec_status3 */
1577 u32 afe_xcvr_error_capture_status3
;
1578 /* 0x0080 AFE_XCVR_EC_STS4 */
1579 u32 afe_xcvr_error_capture_status4
;
1580 /* 0x0084 AFE_XCVR_EC_STS5 */
1581 u32 afe_xcvr_error_capture_status5
;
1583 u32 reserved_008c_00fc
[0x1e];
1587 * struct scu_afe_registers - AFE Regsiters
1591 /* Uaoa AFE registers */
1592 struct scu_afe_registers
{
1593 /* 0Xe000 AFE_BIAS_CTRL */
1594 u32 afe_bias_control
;
1596 /* 0x0008 AFE_PLL_CTRL0 */
1597 u32 afe_pll_control0
;
1598 /* 0x000c AFE_PLL_CTRL1 */
1599 u32 afe_pll_control1
;
1600 /* 0x0010 AFE_PLL_CTRL2 */
1601 u32 afe_pll_control2
;
1602 /* 0x0014 AFE_CB_STS */
1603 u32 afe_common_block_status
;
1605 u32 reserved_18_7c
[0x1a];
1606 /* 0x0080 AFE_PMSN_MCTRL0 */
1607 u32 afe_pmsn_master_control0
;
1608 /* 0x0084 AFE_PMSN_MCTRL1 */
1609 u32 afe_pmsn_master_control1
;
1610 /* 0x0088 AFE_PMSN_MCTRL2 */
1611 u32 afe_pmsn_master_control2
;
1613 u32 reserved_008c_00fc
[0x1D];
1614 /* 0x0100 AFE_DFX_MST_CTRL0 */
1615 u32 afe_dfx_master_control0
;
1616 /* 0x0104 AFE_DFX_MST_CTRL1 */
1617 u32 afe_dfx_master_control1
;
1618 /* 0x0108 AFE_DFX_DCL_CTRL */
1619 u32 afe_dfx_dcl_control
;
1620 /* 0x010c AFE_DFX_DMON_CTRL */
1621 u32 afe_dfx_digital_monitor_control
;
1622 /* 0x0110 AFE_DFX_AMONP_CTRL */
1623 u32 afe_dfx_analog_p_monitor_control
;
1624 /* 0x0114 AFE_DFX_AMONN_CTRL */
1625 u32 afe_dfx_analog_n_monitor_control
;
1626 /* 0x0118 AFE_DFX_NTL_STS */
1627 u32 afe_dfx_ntl_status
;
1628 /* 0x011c AFE_DFX_FIFO_STS0 */
1629 u32 afe_dfx_fifo_status0
;
1630 /* 0x0120 AFE_DFX_FIFO_STS1 */
1631 u32 afe_dfx_fifo_status1
;
1632 /* 0x0124 AFE_DFX_MPAT_CTRL */
1633 u32 afe_dfx_master_pattern_control
;
1634 /* 0x0128 AFE_DFX_P0_CTRL */
1635 u32 afe_dfx_p0_control
;
1636 /* 0x012c-0x01a8 AFE_DFX_P0_DRx */
1637 u32 afe_dfx_p0_data
[32];
1640 /* 0x01b0-0x020c AFE_DFX_P0_IRx */
1641 u32 afe_dfx_p0_instruction
[24];
1644 /* 0x0214 AFE_DFX_P1_CTRL */
1645 u32 afe_dfx_p1_control
;
1646 /* 0x0218-0x245 AFE_DFX_P1_DRx */
1647 u32 afe_dfx_p1_data
[16];
1649 u32 reserved_0258_029c
[0x12];
1650 /* 0x02a0-0x02bc AFE_DFX_P1_IRx */
1651 u32 afe_dfx_p1_instruction
[8];
1653 u32 reserved_02c0_02fc
[0x10];
1654 /* 0x0300 AFE_DFX_TX_PMSN_CTRL */
1655 u32 afe_dfx_tx_pmsn_control
;
1656 /* 0x0304 AFE_DFX_RX_PMSN_CTRL */
1657 u32 afe_dfx_rx_pmsn_control
;
1659 /* 0x030c AFE_DFX_NOA_CTRL0 */
1660 u32 afe_dfx_noa_control0
;
1661 /* 0x0310 AFE_DFX_NOA_CTRL1 */
1662 u32 afe_dfx_noa_control1
;
1663 /* 0x0314 AFE_DFX_NOA_CTRL2 */
1664 u32 afe_dfx_noa_control2
;
1665 /* 0x0318 AFE_DFX_NOA_CTRL3 */
1666 u32 afe_dfx_noa_control3
;
1667 /* 0x031c AFE_DFX_NOA_CTRL4 */
1668 u32 afe_dfx_noa_control4
;
1669 /* 0x0320 AFE_DFX_NOA_CTRL5 */
1670 u32 afe_dfx_noa_control5
;
1671 /* 0x0324 AFE_DFX_NOA_CTRL6 */
1672 u32 afe_dfx_noa_control6
;
1673 /* 0x0328 AFE_DFX_NOA_CTRL7 */
1674 u32 afe_dfx_noa_control7
;
1676 u32 reserved_032c_07fc
[0x135];
1679 struct scu_afe_transceiver scu_afe_xcvr
[4];
1682 u32 reserved_0c00_0ffc
[0x0100];
1685 struct scu_protocol_engine_group_registers
{
1690 struct scu_viit_iit
{
1695 * Placeholder for the ZONE Partition Table information ZONING will not be
1696 * included in the 1.1 release.
1700 struct scu_zone_partition_table
{
1705 * Placeholder for the CRAM register since I am not sure if we need to
1706 * read/write to these registers as yet.
1710 struct scu_completion_ram
{
1715 * Placeholder for the FBRAM registers since I am not sure if we need to
1716 * read/write to these registers as yet.
1720 struct scu_frame_buffer_ram
{
1724 #define scu_scratch_ram_SIZE_IN_DWORDS 256
1727 * Placeholder for the scratch RAM registers.
1731 struct scu_scratch_ram
{
1732 u32 ram
[scu_scratch_ram_SIZE_IN_DWORDS
];
1736 * Placeholder since I am not yet sure what these registers are here for.
1740 struct noa_protocol_engine_partition
{
1745 * Placeholder since I am not yet sure what these registers are here for.
1749 struct noa_hub_partition
{
1754 * Placeholder since I am not yet sure what these registers are here for.
1758 struct noa_host_interface_partition
{
1763 * struct transport_link_layer_pair - The SCU Hardware pairs up the TL
1764 * registers with the LL registers so we must place them adjcent to make the
1765 * array of registers in the PEG.
1769 struct transport_link_layer_pair
{
1770 struct scu_transport_layer_registers tl
;
1771 struct scu_link_layer_registers ll
;
1775 * struct scu_peg_registers - SCU Protocol Engine Memory mapped register space.
1776 * These registers are unique to each protocol engine group. There can be
1777 * at most two PEG for a single SCU part.
1781 struct scu_peg_registers
{
1782 struct transport_link_layer_pair pe
[4];
1783 struct scu_port_task_scheduler_group_registers ptsg
;
1784 struct scu_protocol_engine_group_registers peg
;
1785 struct scu_sgpio_registers sgpio
;
1786 u32 reserved_01500_1BFF
[0x1C0];
1787 struct scu_viit_entry viit
[64];
1788 struct scu_zone_partition_table zpt0
;
1789 struct scu_zone_partition_table zpt1
;
1793 * struct scu_registers - SCU regsiters including both PEG registers if we turn
1794 * on that compile option. All of these registers are in the memory mapped
1795 * space returned from BAR1.
1799 struct scu_registers
{
1800 /* 0x0000 - PEG 0 */
1801 struct scu_peg_registers peg0
;
1803 /* 0x6000 - SDMA and Miscellaneous */
1804 struct scu_sdma_registers sdma
;
1805 struct scu_completion_ram cram
;
1806 struct scu_frame_buffer_ram fbram
;
1807 u32 reserved_6800_69FF
[0x80];
1808 struct noa_protocol_engine_partition noa_pe
;
1809 struct noa_hub_partition noa_hub
;
1810 struct noa_host_interface_partition noa_if
;
1811 u32 reserved_6d00_7fff
[0x4c0];
1813 /* 0x8000 - PEG 1 */
1814 struct scu_peg_registers peg1
;
1816 /* 0xE000 - AFE Registers */
1817 struct scu_afe_registers afe
;
1819 /* 0xF000 - reserved */
1820 u32 reserved_f000_211fff
[0x80c00];
1822 /* 0x212000 - scratch RAM */
1823 struct scu_scratch_ram scratch_ram
;
1826 #endif /* _SCU_REGISTERS_HEADER_ */