Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
cvmx-gpio-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_GPIO_DEFS_H__
29 #define __CVMX_GPIO_DEFS_H__
30 
31 #define CVMX_GPIO_BIT_CFGX(offset) (CVMX_ADD_IO_SEG(0x0001070000000800ull) + ((offset) & 15) * 8)
32 #define CVMX_GPIO_BOOT_ENA (CVMX_ADD_IO_SEG(0x00010700000008A8ull))
33 #define CVMX_GPIO_CLK_GENX(offset) (CVMX_ADD_IO_SEG(0x00010700000008C0ull) + ((offset) & 3) * 8)
34 #define CVMX_GPIO_CLK_QLMX(offset) (CVMX_ADD_IO_SEG(0x00010700000008E0ull) + ((offset) & 1) * 8)
35 #define CVMX_GPIO_DBG_ENA (CVMX_ADD_IO_SEG(0x00010700000008A0ull))
36 #define CVMX_GPIO_INT_CLR (CVMX_ADD_IO_SEG(0x0001070000000898ull))
37 #define CVMX_GPIO_MULTI_CAST (CVMX_ADD_IO_SEG(0x00010700000008B0ull))
38 #define CVMX_GPIO_PIN_ENA (CVMX_ADD_IO_SEG(0x00010700000008B8ull))
39 #define CVMX_GPIO_RX_DAT (CVMX_ADD_IO_SEG(0x0001070000000880ull))
40 #define CVMX_GPIO_TIM_CTL (CVMX_ADD_IO_SEG(0x00010700000008A0ull))
41 #define CVMX_GPIO_TX_CLR (CVMX_ADD_IO_SEG(0x0001070000000890ull))
42 #define CVMX_GPIO_TX_SET (CVMX_ADD_IO_SEG(0x0001070000000888ull))
43 #define CVMX_GPIO_XBIT_CFGX(offset) (CVMX_ADD_IO_SEG(0x0001070000000900ull) + ((offset) & 31) * 8 - 8*16)
44 
48 #ifdef __BIG_ENDIAN_BITFIELD
51  uint64_t clk_gen:1;
52  uint64_t clk_sel:2;
53  uint64_t fil_sel:4;
54  uint64_t fil_cnt:4;
56  uint64_t int_en:1;
57  uint64_t rx_xor:1;
58  uint64_t tx_oe:1;
59 #else
70 #endif
71  } s;
73 #ifdef __BIG_ENDIAN_BITFIELD
75  uint64_t fil_sel:4;
76  uint64_t fil_cnt:4;
78  uint64_t int_en:1;
79  uint64_t rx_xor:1;
80  uint64_t tx_oe:1;
81 #else
89 #endif
90  } cn30xx;
96 #ifdef __BIG_ENDIAN_BITFIELD
98  uint64_t clk_gen:1;
99  uint64_t clk_sel:2;
100  uint64_t fil_sel:4;
101  uint64_t fil_cnt:4;
102  uint64_t int_type:1;
103  uint64_t int_en:1;
104  uint64_t rx_xor:1;
105  uint64_t tx_oe:1;
106 #else
116 #endif
117  } cn52xx;
130 };
131 
135 #ifdef __BIG_ENDIAN_BITFIELD
137  uint64_t boot_ena:4;
139 #else
143 #endif
144  } s;
148 };
149 
153 #ifdef __BIG_ENDIAN_BITFIELD
155  uint64_t n:32;
156 #else
159 #endif
160  } s;
172 };
173 
177 #ifdef __BIG_ENDIAN_BITFIELD
179  uint64_t qlm_sel:3;
181  uint64_t div:1;
182  uint64_t lane_sel:2;
183 #else
189 #endif
190  } s;
192 #ifdef __BIG_ENDIAN_BITFIELD
194  uint64_t qlm_sel:2;
196  uint64_t div:1;
197  uint64_t lane_sel:2;
198 #else
204 #endif
205  } cn61xx;
207 #ifdef __BIG_ENDIAN_BITFIELD
209  uint64_t div:1;
210  uint64_t lane_sel:2;
211 #else
215 #endif
216  } cn63xx;
222 };
223 
227 #ifdef __BIG_ENDIAN_BITFIELD
229  uint64_t dbg_ena:21;
230 #else
233 #endif
234  } s;
238 };
239 
243 #ifdef __BIG_ENDIAN_BITFIELD
245  uint64_t type:16;
246 #else
249 #endif
250  } s;
269 };
270 
274 #ifdef __BIG_ENDIAN_BITFIELD
276  uint64_t en:1;
277 #else
280 #endif
281  } s;
284 };
285 
289 #ifdef __BIG_ENDIAN_BITFIELD
291  uint64_t ena19:1;
292  uint64_t ena18:1;
294 #else
299 #endif
300  } s;
302 };
303 
307 #ifdef __BIG_ENDIAN_BITFIELD
309  uint64_t dat:24;
310 #else
313 #endif
314  } s;
318 #ifdef __BIG_ENDIAN_BITFIELD
320  uint64_t dat:16;
321 #else
324 #endif
325  } cn38xx;
335 #ifdef __BIG_ENDIAN_BITFIELD
337  uint64_t dat:20;
338 #else
341 #endif
342  } cn61xx;
349 };
350 
354 #ifdef __BIG_ENDIAN_BITFIELD
356  uint64_t sel:4;
357 #else
360 #endif
361  } s;
364 };
365 
369 #ifdef __BIG_ENDIAN_BITFIELD
371  uint64_t clr:24;
372 #else
375 #endif
376  } s;
380 #ifdef __BIG_ENDIAN_BITFIELD
382  uint64_t clr:16;
383 #else
386 #endif
387  } cn38xx;
397 #ifdef __BIG_ENDIAN_BITFIELD
399  uint64_t clr:20;
400 #else
403 #endif
404  } cn61xx;
411 };
412 
416 #ifdef __BIG_ENDIAN_BITFIELD
418  uint64_t set:24;
419 #else
420  uint64_t set:24;
422 #endif
423  } s;
427 #ifdef __BIG_ENDIAN_BITFIELD
429  uint64_t set:16;
430 #else
431  uint64_t set:16;
433 #endif
434  } cn38xx;
444 #ifdef __BIG_ENDIAN_BITFIELD
446  uint64_t set:20;
447 #else
448  uint64_t set:20;
450 #endif
451  } cn61xx;
458 };
459 
463 #ifdef __BIG_ENDIAN_BITFIELD
466  uint64_t clk_gen:1;
467  uint64_t clk_sel:2;
468  uint64_t fil_sel:4;
469  uint64_t fil_cnt:4;
470  uint64_t int_type:1;
471  uint64_t int_en:1;
472  uint64_t rx_xor:1;
473  uint64_t tx_oe:1;
474 #else
485 #endif
486  } s;
488 #ifdef __BIG_ENDIAN_BITFIELD
490  uint64_t fil_sel:4;
491  uint64_t fil_cnt:4;
493  uint64_t rx_xor:1;
494  uint64_t tx_oe:1;
495 #else
502 #endif
503  } cn30xx;
509 };
510 
511 #endif