• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /***********************license start***************
2  * Author: Cavium Networks
3  *
4  * Contact: support@caviumnetworks.com
5  * This file is part of the OCTEON SDK
6  *
7  * Copyright (c) 2003-2008 Cavium Networks
8  *
9  * This file is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License, Version 2, as
11  * published by the Free Software Foundation.
12  *
13  * This file is distributed in the hope that it will be useful, but
14  * AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty
15  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, TITLE, or
16  * NONINFRINGEMENT.  See the GNU General Public License for more
17  * details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this file; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22  * or visit http://www.gnu.org/licenses/.
23  *
24  * This file may also be available under a different license from Cavium.
25  * Contact Cavium Networks for more information
26  ***********************license end**************************************/
27 
28 #ifndef __CVMX_LED_DEFS_H__
29 #define __CVMX_LED_DEFS_H__
30 
31 #define CVMX_LED_BLINK \
32 	 CVMX_ADD_IO_SEG(0x0001180000001A48ull)
33 #define CVMX_LED_CLK_PHASE \
34 	 CVMX_ADD_IO_SEG(0x0001180000001A08ull)
35 #define CVMX_LED_CYLON \
36 	 CVMX_ADD_IO_SEG(0x0001180000001AF8ull)
37 #define CVMX_LED_DBG \
38 	 CVMX_ADD_IO_SEG(0x0001180000001A18ull)
39 #define CVMX_LED_EN \
40 	 CVMX_ADD_IO_SEG(0x0001180000001A00ull)
41 #define CVMX_LED_POLARITY \
42 	 CVMX_ADD_IO_SEG(0x0001180000001A50ull)
43 #define CVMX_LED_PRT \
44 	 CVMX_ADD_IO_SEG(0x0001180000001A10ull)
45 #define CVMX_LED_PRT_FMT \
46 	 CVMX_ADD_IO_SEG(0x0001180000001A30ull)
47 #define CVMX_LED_PRT_STATUSX(offset) \
48 	 CVMX_ADD_IO_SEG(0x0001180000001A80ull + (((offset) & 7) * 8))
49 #define CVMX_LED_UDD_CNTX(offset) \
50 	 CVMX_ADD_IO_SEG(0x0001180000001A20ull + (((offset) & 1) * 8))
51 #define CVMX_LED_UDD_DATX(offset) \
52 	 CVMX_ADD_IO_SEG(0x0001180000001A38ull + (((offset) & 1) * 8))
53 #define CVMX_LED_UDD_DAT_CLRX(offset) \
54 	 CVMX_ADD_IO_SEG(0x0001180000001AC8ull + (((offset) & 1) * 16))
55 #define CVMX_LED_UDD_DAT_SETX(offset) \
56 	 CVMX_ADD_IO_SEG(0x0001180000001AC0ull + (((offset) & 1) * 16))
57 
58 union cvmx_led_blink {
59 	uint64_t u64;
60 	struct cvmx_led_blink_s {
61 		uint64_t reserved_8_63:56;
62 		uint64_t rate:8;
63 	} s;
64 	struct cvmx_led_blink_s cn38xx;
65 	struct cvmx_led_blink_s cn38xxp2;
66 	struct cvmx_led_blink_s cn56xx;
67 	struct cvmx_led_blink_s cn56xxp1;
68 	struct cvmx_led_blink_s cn58xx;
69 	struct cvmx_led_blink_s cn58xxp1;
70 };
71 
72 union cvmx_led_clk_phase {
73 	uint64_t u64;
74 	struct cvmx_led_clk_phase_s {
75 		uint64_t reserved_7_63:57;
76 		uint64_t phase:7;
77 	} s;
78 	struct cvmx_led_clk_phase_s cn38xx;
79 	struct cvmx_led_clk_phase_s cn38xxp2;
80 	struct cvmx_led_clk_phase_s cn56xx;
81 	struct cvmx_led_clk_phase_s cn56xxp1;
82 	struct cvmx_led_clk_phase_s cn58xx;
83 	struct cvmx_led_clk_phase_s cn58xxp1;
84 };
85 
86 union cvmx_led_cylon {
87 	uint64_t u64;
88 	struct cvmx_led_cylon_s {
89 		uint64_t reserved_16_63:48;
90 		uint64_t rate:16;
91 	} s;
92 	struct cvmx_led_cylon_s cn38xx;
93 	struct cvmx_led_cylon_s cn38xxp2;
94 	struct cvmx_led_cylon_s cn56xx;
95 	struct cvmx_led_cylon_s cn56xxp1;
96 	struct cvmx_led_cylon_s cn58xx;
97 	struct cvmx_led_cylon_s cn58xxp1;
98 };
99 
100 union cvmx_led_dbg {
101 	uint64_t u64;
102 	struct cvmx_led_dbg_s {
103 		uint64_t reserved_1_63:63;
104 		uint64_t dbg_en:1;
105 	} s;
106 	struct cvmx_led_dbg_s cn38xx;
107 	struct cvmx_led_dbg_s cn38xxp2;
108 	struct cvmx_led_dbg_s cn56xx;
109 	struct cvmx_led_dbg_s cn56xxp1;
110 	struct cvmx_led_dbg_s cn58xx;
111 	struct cvmx_led_dbg_s cn58xxp1;
112 };
113 
114 union cvmx_led_en {
115 	uint64_t u64;
116 	struct cvmx_led_en_s {
117 		uint64_t reserved_1_63:63;
118 		uint64_t en:1;
119 	} s;
120 	struct cvmx_led_en_s cn38xx;
121 	struct cvmx_led_en_s cn38xxp2;
122 	struct cvmx_led_en_s cn56xx;
123 	struct cvmx_led_en_s cn56xxp1;
124 	struct cvmx_led_en_s cn58xx;
125 	struct cvmx_led_en_s cn58xxp1;
126 };
127 
128 union cvmx_led_polarity {
129 	uint64_t u64;
130 	struct cvmx_led_polarity_s {
131 		uint64_t reserved_1_63:63;
132 		uint64_t polarity:1;
133 	} s;
134 	struct cvmx_led_polarity_s cn38xx;
135 	struct cvmx_led_polarity_s cn38xxp2;
136 	struct cvmx_led_polarity_s cn56xx;
137 	struct cvmx_led_polarity_s cn56xxp1;
138 	struct cvmx_led_polarity_s cn58xx;
139 	struct cvmx_led_polarity_s cn58xxp1;
140 };
141 
142 union cvmx_led_prt {
143 	uint64_t u64;
144 	struct cvmx_led_prt_s {
145 		uint64_t reserved_8_63:56;
146 		uint64_t prt_en:8;
147 	} s;
148 	struct cvmx_led_prt_s cn38xx;
149 	struct cvmx_led_prt_s cn38xxp2;
150 	struct cvmx_led_prt_s cn56xx;
151 	struct cvmx_led_prt_s cn56xxp1;
152 	struct cvmx_led_prt_s cn58xx;
153 	struct cvmx_led_prt_s cn58xxp1;
154 };
155 
156 union cvmx_led_prt_fmt {
157 	uint64_t u64;
158 	struct cvmx_led_prt_fmt_s {
159 		uint64_t reserved_4_63:60;
160 		uint64_t format:4;
161 	} s;
162 	struct cvmx_led_prt_fmt_s cn38xx;
163 	struct cvmx_led_prt_fmt_s cn38xxp2;
164 	struct cvmx_led_prt_fmt_s cn56xx;
165 	struct cvmx_led_prt_fmt_s cn56xxp1;
166 	struct cvmx_led_prt_fmt_s cn58xx;
167 	struct cvmx_led_prt_fmt_s cn58xxp1;
168 };
169 
170 union cvmx_led_prt_statusx {
171 	uint64_t u64;
172 	struct cvmx_led_prt_statusx_s {
173 		uint64_t reserved_6_63:58;
174 		uint64_t status:6;
175 	} s;
176 	struct cvmx_led_prt_statusx_s cn38xx;
177 	struct cvmx_led_prt_statusx_s cn38xxp2;
178 	struct cvmx_led_prt_statusx_s cn56xx;
179 	struct cvmx_led_prt_statusx_s cn56xxp1;
180 	struct cvmx_led_prt_statusx_s cn58xx;
181 	struct cvmx_led_prt_statusx_s cn58xxp1;
182 };
183 
184 union cvmx_led_udd_cntx {
185 	uint64_t u64;
186 	struct cvmx_led_udd_cntx_s {
187 		uint64_t reserved_6_63:58;
188 		uint64_t cnt:6;
189 	} s;
190 	struct cvmx_led_udd_cntx_s cn38xx;
191 	struct cvmx_led_udd_cntx_s cn38xxp2;
192 	struct cvmx_led_udd_cntx_s cn56xx;
193 	struct cvmx_led_udd_cntx_s cn56xxp1;
194 	struct cvmx_led_udd_cntx_s cn58xx;
195 	struct cvmx_led_udd_cntx_s cn58xxp1;
196 };
197 
198 union cvmx_led_udd_datx {
199 	uint64_t u64;
200 	struct cvmx_led_udd_datx_s {
201 		uint64_t reserved_32_63:32;
202 		uint64_t dat:32;
203 	} s;
204 	struct cvmx_led_udd_datx_s cn38xx;
205 	struct cvmx_led_udd_datx_s cn38xxp2;
206 	struct cvmx_led_udd_datx_s cn56xx;
207 	struct cvmx_led_udd_datx_s cn56xxp1;
208 	struct cvmx_led_udd_datx_s cn58xx;
209 	struct cvmx_led_udd_datx_s cn58xxp1;
210 };
211 
212 union cvmx_led_udd_dat_clrx {
213 	uint64_t u64;
214 	struct cvmx_led_udd_dat_clrx_s {
215 		uint64_t reserved_32_63:32;
216 		uint64_t clr:32;
217 	} s;
218 	struct cvmx_led_udd_dat_clrx_s cn38xx;
219 	struct cvmx_led_udd_dat_clrx_s cn38xxp2;
220 	struct cvmx_led_udd_dat_clrx_s cn56xx;
221 	struct cvmx_led_udd_dat_clrx_s cn56xxp1;
222 	struct cvmx_led_udd_dat_clrx_s cn58xx;
223 	struct cvmx_led_udd_dat_clrx_s cn58xxp1;
224 };
225 
226 union cvmx_led_udd_dat_setx {
227 	uint64_t u64;
228 	struct cvmx_led_udd_dat_setx_s {
229 		uint64_t reserved_32_63:32;
230 		uint64_t set:32;
231 	} s;
232 	struct cvmx_led_udd_dat_setx_s cn38xx;
233 	struct cvmx_led_udd_dat_setx_s cn38xxp2;
234 	struct cvmx_led_udd_dat_setx_s cn56xx;
235 	struct cvmx_led_udd_dat_setx_s cn56xxp1;
236 	struct cvmx_led_udd_dat_setx_s cn58xx;
237 	struct cvmx_led_udd_dat_setx_s cn58xxp1;
238 };
239 
240 #endif
241