1 /*******************************************************************************
2     Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
3 
4     Permission is hereby granted, free of charge, to any person obtaining a
5     copy of this software and associated documentation files (the "Software"),
6     to deal in the Software without restriction, including without limitation
7     the rights to use, copy, modify, merge, publish, distribute, sublicense,
8     and/or sell copies of the Software, and to permit persons to whom the
9     Software is furnished to do so, subject to the following conditions:
10 
11     The above copyright notice and this permission notice shall be included in
12     all copies or substantial portions of the Software.
13 
14     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15     IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16     FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
17     THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18     LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20     DEALINGS IN THE SOFTWARE.
21 
22 *******************************************************************************/
23 #ifndef _cl906f_h_
24 #define _cl906f_h_
25 
26 /* fields and values */
27 #define NV906F_SEMAPHOREA                                          (0x00000010)
28 #define NV906F_SEMAPHOREA_OFFSET_UPPER                                     7:0
29 #define NV906F_SEMAPHOREB                                          (0x00000014)
30 #define NV906F_SEMAPHOREB_OFFSET_LOWER                                    31:2
31 #define NV906F_SEMAPHOREC                                          (0x00000018)
32 #define NV906F_SEMAPHOREC_PAYLOAD                                         31:0
33 #define NV906F_SEMAPHORED                                          (0x0000001C)
34 #define NV906F_SEMAPHORED_OPERATION                                        3:0
35 #define NV906F_SEMAPHORED_OPERATION_ACQUIRE                         0x00000001
36 #define NV906F_SEMAPHORED_OPERATION_RELEASE                         0x00000002
37 #define NV906F_SEMAPHORED_OPERATION_ACQ_GEQ                         0x00000004
38 #define NV906F_SEMAPHORED_OPERATION_ACQ_AND                         0x00000008
39 #define NV906F_SEMAPHORED_ACQUIRE_SWITCH                                 12:12
40 #define NV906F_SEMAPHORED_ACQUIRE_SWITCH_DISABLED                   0x00000000
41 #define NV906F_SEMAPHORED_ACQUIRE_SWITCH_ENABLED                    0x00000001
42 #define NV906F_SEMAPHORED_RELEASE_WFI                                    20:20
43 #define NV906F_SEMAPHORED_RELEASE_WFI_EN                            0x00000000
44 #define NV906F_SEMAPHORED_RELEASE_WFI_DIS                           0x00000001
45 #define NV906F_SEMAPHORED_RELEASE_SIZE                                   24:24
46 #define NV906F_SEMAPHORED_RELEASE_SIZE_16BYTE                       0x00000000
47 #define NV906F_SEMAPHORED_RELEASE_SIZE_4BYTE                        0x00000001
48 #define NV906F_NON_STALL_INTERRUPT                                 (0x00000020)
49 #define NV906F_NON_STALL_INTERRUPT_HANDLE                                 31:0
50 #define NV906F_SET_REFERENCE                                       (0x00000050)
51 #define NV906F_SET_REFERENCE_COUNT                                        31:0
52 
53 /* dma method formats */
54 #define NV906F_DMA_METHOD_ADDRESS                                  11:0
55 #define NV906F_DMA_SUBDEVICE_MASK                                  15:4
56 #define NV906F_DMA_METHOD_SUBCHANNEL                               15:13
57 #define NV906F_DMA_TERT_OP                                         17:16
58 #define NV906F_DMA_TERT_OP_GRP0_INC_METHOD                         (0x00000000)
59 #define NV906F_DMA_TERT_OP_GRP0_SET_SUB_DEV_MASK                   (0x00000001)
60 #define NV906F_DMA_TERT_OP_GRP0_STORE_SUB_DEV_MASK                 (0x00000002)
61 #define NV906F_DMA_TERT_OP_GRP0_USE_SUB_DEV_MASK                   (0x00000003)
62 #define NV906F_DMA_TERT_OP_GRP2_NON_INC_METHOD                     (0x00000000)
63 #define NV906F_DMA_METHOD_COUNT                                    28:16
64 #define NV906F_DMA_IMMD_DATA                                       28:16
65 #define NV906F_DMA_SEC_OP                                          31:29
66 #define NV906F_DMA_SEC_OP_GRP0_USE_TERT                            (0x00000000)
67 #define NV906F_DMA_SEC_OP_INC_METHOD                               (0x00000001)
68 #define NV906F_DMA_SEC_OP_GRP2_USE_TERT                            (0x00000002)
69 #define NV906F_DMA_SEC_OP_NON_INC_METHOD                           (0x00000003)
70 #define NV906F_DMA_SEC_OP_IMMD_DATA_METHOD                         (0x00000004)
71 #define NV906F_DMA_SEC_OP_ONE_INC                                  (0x00000005)
72 #define NV906F_DMA_SEC_OP_RESERVED6                                (0x00000006)
73 #define NV906F_DMA_SEC_OP_END_PB_SEGMENT                           (0x00000007)
74 #endif /* _cl906f_h_ */
75