Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
cvmx-led-defs.h
Go to the documentation of this file.
1 /***********************license start***************
2  * Author: Cavium Networks
3  *
4  * Contact: [email protected]
5  * This file is part of the OCTEON SDK
6  *
7  * Copyright (c) 2003-2012 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 (CVMX_ADD_IO_SEG(0x0001180000001A48ull))
32 #define CVMX_LED_CLK_PHASE (CVMX_ADD_IO_SEG(0x0001180000001A08ull))
33 #define CVMX_LED_CYLON (CVMX_ADD_IO_SEG(0x0001180000001AF8ull))
34 #define CVMX_LED_DBG (CVMX_ADD_IO_SEG(0x0001180000001A18ull))
35 #define CVMX_LED_EN (CVMX_ADD_IO_SEG(0x0001180000001A00ull))
36 #define CVMX_LED_POLARITY (CVMX_ADD_IO_SEG(0x0001180000001A50ull))
37 #define CVMX_LED_PRT (CVMX_ADD_IO_SEG(0x0001180000001A10ull))
38 #define CVMX_LED_PRT_FMT (CVMX_ADD_IO_SEG(0x0001180000001A30ull))
39 #define CVMX_LED_PRT_STATUSX(offset) (CVMX_ADD_IO_SEG(0x0001180000001A80ull) + ((offset) & 7) * 8)
40 #define CVMX_LED_UDD_CNTX(offset) (CVMX_ADD_IO_SEG(0x0001180000001A20ull) + ((offset) & 1) * 8)
41 #define CVMX_LED_UDD_DATX(offset) (CVMX_ADD_IO_SEG(0x0001180000001A38ull) + ((offset) & 1) * 8)
42 #define CVMX_LED_UDD_DAT_CLRX(offset) (CVMX_ADD_IO_SEG(0x0001180000001AC8ull) + ((offset) & 1) * 16)
43 #define CVMX_LED_UDD_DAT_SETX(offset) (CVMX_ADD_IO_SEG(0x0001180000001AC0ull) + ((offset) & 1) * 16)
44 
48 #ifdef __BIG_ENDIAN_BITFIELD
50  uint64_t rate:8;
51 #else
54 #endif
55  } s;
62 };
63 
67 #ifdef __BIG_ENDIAN_BITFIELD
69  uint64_t phase:7;
70 #else
73 #endif
74  } s;
81 };
82 
86 #ifdef __BIG_ENDIAN_BITFIELD
88  uint64_t rate:16;
89 #else
92 #endif
93  } s;
100 };
101 
104  struct cvmx_led_dbg_s {
105 #ifdef __BIG_ENDIAN_BITFIELD
107  uint64_t dbg_en:1;
108 #else
111 #endif
112  } s;
119 };
120 
121 union cvmx_led_en {
123  struct cvmx_led_en_s {
124 #ifdef __BIG_ENDIAN_BITFIELD
126  uint64_t en:1;
127 #else
130 #endif
131  } s;
138 };
139 
143 #ifdef __BIG_ENDIAN_BITFIELD
145  uint64_t polarity:1;
146 #else
149 #endif
150  } s;
157 };
158 
161  struct cvmx_led_prt_s {
162 #ifdef __BIG_ENDIAN_BITFIELD
164  uint64_t prt_en:8;
165 #else
168 #endif
169  } s;
176 };
177 
181 #ifdef __BIG_ENDIAN_BITFIELD
183  uint64_t format:4;
184 #else
187 #endif
188  } s;
195 };
196 
200 #ifdef __BIG_ENDIAN_BITFIELD
202  uint64_t status:6;
203 #else
206 #endif
207  } s;
214 };
215 
219 #ifdef __BIG_ENDIAN_BITFIELD
221  uint64_t cnt:6;
222 #else
225 #endif
226  } s;
233 };
234 
238 #ifdef __BIG_ENDIAN_BITFIELD
240  uint64_t dat:32;
241 #else
244 #endif
245  } s;
252 };
253 
257 #ifdef __BIG_ENDIAN_BITFIELD
259  uint64_t clr:32;
260 #else
263 #endif
264  } s;
271 };
272 
276 #ifdef __BIG_ENDIAN_BITFIELD
278  uint64_t set:32;
279 #else
280  uint64_t set:32;
282 #endif
283  } s;
290 };
291 
292 #endif