summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/include/ap15/arictlr_arbgnt.h
blob: 2d9790b7cc580def05166d98e75b8fbe955c2a71 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
/*
 * Copyright (c) 2010 NVIDIA Corporation.
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 *
 * Redistributions in binary form must reproduce the above copyright notice,
 * this list of conditions and the following disclaimer in the documentation
 * and/or other materials provided with the distribution.
 *
 * Neither the name of the NVIDIA Corporation nor the names of its contributors
 * may be used to endorse or promote products derived from this software
 * without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 *
 */
//
// DO NOT EDIT - generated by simspec!
//

#ifndef ___ARICTLR_ARBGNT_H_INC_
#define ___ARICTLR_ARBGNT_H_INC_
//
// this spec file is for sw header generation
//
// hw should use headers generated from:
//     arintr_ctlr.spec
//
//
// arb_gnt specific interrupt controller registers
//
// Arbitration semaphores provide a mechanism by which the two processors can arbitrate
// for the use of various resources. These semaphores provide a hardware locking mechanism,
// so that when a processor is already using a resource, the second processor is not 
// granted that resource. There are 32 bits of Arbitration semaphores provided in the system.
// The hardware does not enforce any resource association to these bits. It is left to the
// firmware to assign and use these bits.
// The setup/usage of the Arbitration Semaphores is described in the ararb_sema specfile.
//
// The Arbitration Semaphores can also generate an interrupt when a hardware resource 
// becomes available.  The registers in this module configure these interrupts.
// When a 1 is set in the corresponding bit position of the Arbitration Semaphore Interrupt 
// Source Register (CPU_enable or COP_enable), an interrupt will be generated when the 
// processor achieves Grant Status for that resource.
// The current Grant status can be viewed in the CPU_STATUS or COP_STATUS registers.
//
// CPU Arbitration Semaphore Interrupt Status Register

// Register ARBGNT_CPU_STATUS_0  
#define ARBGNT_CPU_STATUS_0                     _MK_ADDR_CONST(0x0)
#define ARBGNT_CPU_STATUS_0_WORD_COUNT                  0x1
#define ARBGNT_CPU_STATUS_0_RESET_VAL                   _MK_MASK_CONST(0x0)
#define ARBGNT_CPU_STATUS_0_RESET_MASK                  _MK_MASK_CONST(0xffffffff)
#define ARBGNT_CPU_STATUS_0_SW_DEFAULT_VAL                      _MK_MASK_CONST(0x0)
#define ARBGNT_CPU_STATUS_0_SW_DEFAULT_MASK                     _MK_MASK_CONST(0x0)
#define ARBGNT_CPU_STATUS_0_READ_MASK                   _MK_MASK_CONST(0xffffffff)
#define ARBGNT_CPU_STATUS_0_WRITE_MASK                  _MK_MASK_CONST(0x0)
// Each bit is set by hardware when the corresponding  arbitration semaphore ownership is granted to CPU. Interrupt is cleared when  the CPU writes the ARB_SMP.PUT register with the corresponding bit set.
#define ARBGNT_CPU_STATUS_0_GNT31_GNG0_SHIFT                    _MK_SHIFT_CONST(0)
#define ARBGNT_CPU_STATUS_0_GNT31_GNG0_FIELD                    (_MK_MASK_CONST(0xffffffff) << ARBGNT_CPU_STATUS_0_GNT31_GNG0_SHIFT)
#define ARBGNT_CPU_STATUS_0_GNT31_GNG0_RANGE                    31:0
#define ARBGNT_CPU_STATUS_0_GNT31_GNG0_WOFFSET                  0x0
#define ARBGNT_CPU_STATUS_0_GNT31_GNG0_DEFAULT                  _MK_MASK_CONST(0x0)
#define ARBGNT_CPU_STATUS_0_GNT31_GNG0_DEFAULT_MASK                     _MK_MASK_CONST(0xffffffff)
#define ARBGNT_CPU_STATUS_0_GNT31_GNG0_SW_DEFAULT                       _MK_MASK_CONST(0x0)
#define ARBGNT_CPU_STATUS_0_GNT31_GNG0_SW_DEFAULT_MASK                  _MK_MASK_CONST(0x0)

// CPU Arbitration Semaphore Interrupt Enable Register

// Register ARBGNT_CPU_ENABLE_0  
#define ARBGNT_CPU_ENABLE_0                     _MK_ADDR_CONST(0x4)
#define ARBGNT_CPU_ENABLE_0_WORD_COUNT                  0x1
#define ARBGNT_CPU_ENABLE_0_RESET_VAL                   _MK_MASK_CONST(0x0)
#define ARBGNT_CPU_ENABLE_0_RESET_MASK                  _MK_MASK_CONST(0xffffffff)
#define ARBGNT_CPU_ENABLE_0_SW_DEFAULT_VAL                      _MK_MASK_CONST(0x0)
#define ARBGNT_CPU_ENABLE_0_SW_DEFAULT_MASK                     _MK_MASK_CONST(0x0)
#define ARBGNT_CPU_ENABLE_0_READ_MASK                   _MK_MASK_CONST(0xffffffff)
#define ARBGNT_CPU_ENABLE_0_WRITE_MASK                  _MK_MASK_CONST(0xffffffff)
// Writing a 1 in any bit position will enable the  corresponding arbitration semaphore interrupt.
#define ARBGNT_CPU_ENABLE_0_GER31_GER0_SHIFT                    _MK_SHIFT_CONST(0)
#define ARBGNT_CPU_ENABLE_0_GER31_GER0_FIELD                    (_MK_MASK_CONST(0xffffffff) << ARBGNT_CPU_ENABLE_0_GER31_GER0_SHIFT)
#define ARBGNT_CPU_ENABLE_0_GER31_GER0_RANGE                    31:0
#define ARBGNT_CPU_ENABLE_0_GER31_GER0_WOFFSET                  0x0
#define ARBGNT_CPU_ENABLE_0_GER31_GER0_DEFAULT                  _MK_MASK_CONST(0x0)
#define ARBGNT_CPU_ENABLE_0_GER31_GER0_DEFAULT_MASK                     _MK_MASK_CONST(0xffffffff)
#define ARBGNT_CPU_ENABLE_0_GER31_GER0_SW_DEFAULT                       _MK_MASK_CONST(0x0)
#define ARBGNT_CPU_ENABLE_0_GER31_GER0_SW_DEFAULT_MASK                  _MK_MASK_CONST(0x0)

// COP Arbitration Semaphore Interrupt Status Register

// Register ARBGNT_COP_STATUS_0  
#define ARBGNT_COP_STATUS_0                     _MK_ADDR_CONST(0x8)
#define ARBGNT_COP_STATUS_0_WORD_COUNT                  0x1
#define ARBGNT_COP_STATUS_0_RESET_VAL                   _MK_MASK_CONST(0x0)
#define ARBGNT_COP_STATUS_0_RESET_MASK                  _MK_MASK_CONST(0xffffffff)
#define ARBGNT_COP_STATUS_0_SW_DEFAULT_VAL                      _MK_MASK_CONST(0x0)
#define ARBGNT_COP_STATUS_0_SW_DEFAULT_MASK                     _MK_MASK_CONST(0x0)
#define ARBGNT_COP_STATUS_0_READ_MASK                   _MK_MASK_CONST(0xffffffff)
#define ARBGNT_COP_STATUS_0_WRITE_MASK                  _MK_MASK_CONST(0x0)
// Each bit is set by hardware when the corresponding  arbitration semaphore ownership is granted to COP. Interrupt is cleared when  the COP writes the ARB_SMP.PUT register with the corresponding bit set.
#define ARBGNT_COP_STATUS_0_GNT31_GNG0_SHIFT                    _MK_SHIFT_CONST(0)
#define ARBGNT_COP_STATUS_0_GNT31_GNG0_FIELD                    (_MK_MASK_CONST(0xffffffff) << ARBGNT_COP_STATUS_0_GNT31_GNG0_SHIFT)
#define ARBGNT_COP_STATUS_0_GNT31_GNG0_RANGE                    31:0
#define ARBGNT_COP_STATUS_0_GNT31_GNG0_WOFFSET                  0x0
#define ARBGNT_COP_STATUS_0_GNT31_GNG0_DEFAULT                  _MK_MASK_CONST(0x0)
#define ARBGNT_COP_STATUS_0_GNT31_GNG0_DEFAULT_MASK                     _MK_MASK_CONST(0xffffffff)
#define ARBGNT_COP_STATUS_0_GNT31_GNG0_SW_DEFAULT                       _MK_MASK_CONST(0x0)
#define ARBGNT_COP_STATUS_0_GNT31_GNG0_SW_DEFAULT_MASK                  _MK_MASK_CONST(0x0)

// COP Arbitration Semaphore Interrupt Enable Register

// Register ARBGNT_COP_ENABLE_0  
#define ARBGNT_COP_ENABLE_0                     _MK_ADDR_CONST(0xc)
#define ARBGNT_COP_ENABLE_0_WORD_COUNT                  0x1
#define ARBGNT_COP_ENABLE_0_RESET_VAL                   _MK_MASK_CONST(0x0)
#define ARBGNT_COP_ENABLE_0_RESET_MASK                  _MK_MASK_CONST(0xffffffff)
#define ARBGNT_COP_ENABLE_0_SW_DEFAULT_VAL                      _MK_MASK_CONST(0x0)
#define ARBGNT_COP_ENABLE_0_SW_DEFAULT_MASK                     _MK_MASK_CONST(0x0)
#define ARBGNT_COP_ENABLE_0_READ_MASK                   _MK_MASK_CONST(0xffffffff)
#define ARBGNT_COP_ENABLE_0_WRITE_MASK                  _MK_MASK_CONST(0xffffffff)
// Writing a 1 in any bit position will enable the  corresponding arbitration semaphore interrupt. 
#define ARBGNT_COP_ENABLE_0_GER31_GER0_SHIFT                    _MK_SHIFT_CONST(0)
#define ARBGNT_COP_ENABLE_0_GER31_GER0_FIELD                    (_MK_MASK_CONST(0xffffffff) << ARBGNT_COP_ENABLE_0_GER31_GER0_SHIFT)
#define ARBGNT_COP_ENABLE_0_GER31_GER0_RANGE                    31:0
#define ARBGNT_COP_ENABLE_0_GER31_GER0_WOFFSET                  0x0
#define ARBGNT_COP_ENABLE_0_GER31_GER0_DEFAULT                  _MK_MASK_CONST(0x0)
#define ARBGNT_COP_ENABLE_0_GER31_GER0_DEFAULT_MASK                     _MK_MASK_CONST(0xffffffff)
#define ARBGNT_COP_ENABLE_0_GER31_GER0_SW_DEFAULT                       _MK_MASK_CONST(0x0)
#define ARBGNT_COP_ENABLE_0_GER31_GER0_SW_DEFAULT_MASK                  _MK_MASK_CONST(0x0)


//
// REGISTER LIST
//
#define LIST_ARICTLR_ARBGNT_REGS(_op_) \
_op_(ARBGNT_CPU_STATUS_0) \
_op_(ARBGNT_CPU_ENABLE_0) \
_op_(ARBGNT_COP_STATUS_0) \
_op_(ARBGNT_COP_ENABLE_0)


//
// ADDRESS SPACES
//

#define BASE_ADDRESS_ARBGNT     0x00000000

//
// ARICTLR_ARBGNT REGISTER BANKS
//

#define ARBGNT0_FIRST_REG 0x0000 // ARBGNT_CPU_STATUS_0
#define ARBGNT0_LAST_REG 0x000c // ARBGNT_COP_ENABLE_0

#ifndef _MK_SHIFT_CONST
  #define _MK_SHIFT_CONST(_constant_) _constant_
#endif
#ifndef _MK_MASK_CONST
  #define _MK_MASK_CONST(_constant_) _constant_
#endif
#ifndef _MK_ENUM_CONST
  #define _MK_ENUM_CONST(_constant_) (_constant_ ## UL)
#endif
#ifndef _MK_ADDR_CONST
  #define _MK_ADDR_CONST(_constant_) _constant_
#endif

#endif // ifndef ___ARICTLR_ARBGNT_H_INC_