RTEMS 6.1-rc4
Loading...
Searching...
No Matches
spwpnp-regs.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-2-Clause */
2
11/*
12 * Copyright (C) 2021 embedded brains GmbH & Co. KG
13 *
14 * Redistribution and use in source and binary forms, with or without
15 * modification, are permitted provided that the following conditions
16 * are met:
17 * 1. Redistributions of source code must retain the above copyright
18 * notice, this list of conditions and the following disclaimer.
19 * 2. Redistributions in binary form must reproduce the above copyright
20 * notice, this list of conditions and the following disclaimer in the
21 * documentation and/or other materials provided with the distribution.
22 *
23 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
27 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
28 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
29 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
30 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
31 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33 * POSSIBILITY OF SUCH DAMAGE.
34 */
35
36/*
37 * This file is part of the RTEMS quality process and was automatically
38 * generated. If you find something that needs to be fixed or
39 * worded better please post a report or patch to an RTEMS mailing list
40 * or raise a bug report:
41 *
42 * https://www.rtems.org/bugs.html
43 *
44 * For information on updating and regenerating please refer to the How-To
45 * section in the Software Requirements Engineering chapter of the
46 * RTEMS Software Engineering manual. The manual is provided as a part of
47 * a release. For development sources please refer to the online
48 * documentation at:
49 *
50 * https://docs.rtems.org
51 */
52
53/* Generated from spec:/dev/grlib/if/spwpnp-header */
54
55#ifndef _GRLIB_SPWPNP_REGS_H
56#define _GRLIB_SPWPNP_REGS_H
57
58#include <stdint.h>
59
60#ifdef __cplusplus
61extern "C" {
62#endif
63
64/* Generated from spec:/dev/grlib/if/spwpnp */
65
85#define SPWPNP_PNPVEND_VEND_SHIFT 16
86#define SPWPNP_PNPVEND_VEND_MASK 0xffff0000U
87#define SPWPNP_PNPVEND_VEND_GET( _reg ) \
88 ( ( ( _reg ) & SPWPNP_PNPVEND_VEND_MASK ) >> \
89 SPWPNP_PNPVEND_VEND_SHIFT )
90#define SPWPNP_PNPVEND_VEND_SET( _reg, _val ) \
91 ( ( ( _reg ) & ~SPWPNP_PNPVEND_VEND_MASK ) | \
92 ( ( ( _val ) << SPWPNP_PNPVEND_VEND_SHIFT ) & \
93 SPWPNP_PNPVEND_VEND_MASK ) )
94#define SPWPNP_PNPVEND_VEND( _val ) \
95 ( ( ( _val ) << SPWPNP_PNPVEND_VEND_SHIFT ) & \
96 SPWPNP_PNPVEND_VEND_MASK )
97
98#define SPWPNP_PNPVEND_PROD_SHIFT 0
99#define SPWPNP_PNPVEND_PROD_MASK 0xffffU
100#define SPWPNP_PNPVEND_PROD_GET( _reg ) \
101 ( ( ( _reg ) & SPWPNP_PNPVEND_PROD_MASK ) >> \
102 SPWPNP_PNPVEND_PROD_SHIFT )
103#define SPWPNP_PNPVEND_PROD_SET( _reg, _val ) \
104 ( ( ( _reg ) & ~SPWPNP_PNPVEND_PROD_MASK ) | \
105 ( ( ( _val ) << SPWPNP_PNPVEND_PROD_SHIFT ) & \
106 SPWPNP_PNPVEND_PROD_MASK ) )
107#define SPWPNP_PNPVEND_PROD( _val ) \
108 ( ( ( _val ) << SPWPNP_PNPVEND_PROD_SHIFT ) & \
109 SPWPNP_PNPVEND_PROD_MASK )
110
122#define SPWPNP_PNPVER_MAJOR_SHIFT 24
123#define SPWPNP_PNPVER_MAJOR_MASK 0xff000000U
124#define SPWPNP_PNPVER_MAJOR_GET( _reg ) \
125 ( ( ( _reg ) & SPWPNP_PNPVER_MAJOR_MASK ) >> \
126 SPWPNP_PNPVER_MAJOR_SHIFT )
127#define SPWPNP_PNPVER_MAJOR_SET( _reg, _val ) \
128 ( ( ( _reg ) & ~SPWPNP_PNPVER_MAJOR_MASK ) | \
129 ( ( ( _val ) << SPWPNP_PNPVER_MAJOR_SHIFT ) & \
130 SPWPNP_PNPVER_MAJOR_MASK ) )
131#define SPWPNP_PNPVER_MAJOR( _val ) \
132 ( ( ( _val ) << SPWPNP_PNPVER_MAJOR_SHIFT ) & \
133 SPWPNP_PNPVER_MAJOR_MASK )
134
135#define SPWPNP_PNPVER_MINOR_SHIFT 16
136#define SPWPNP_PNPVER_MINOR_MASK 0xff0000U
137#define SPWPNP_PNPVER_MINOR_GET( _reg ) \
138 ( ( ( _reg ) & SPWPNP_PNPVER_MINOR_MASK ) >> \
139 SPWPNP_PNPVER_MINOR_SHIFT )
140#define SPWPNP_PNPVER_MINOR_SET( _reg, _val ) \
141 ( ( ( _reg ) & ~SPWPNP_PNPVER_MINOR_MASK ) | \
142 ( ( ( _val ) << SPWPNP_PNPVER_MINOR_SHIFT ) & \
143 SPWPNP_PNPVER_MINOR_MASK ) )
144#define SPWPNP_PNPVER_MINOR( _val ) \
145 ( ( ( _val ) << SPWPNP_PNPVER_MINOR_SHIFT ) & \
146 SPWPNP_PNPVER_MINOR_MASK )
147
148#define SPWPNP_PNPVER_PATCH_SHIFT 8
149#define SPWPNP_PNPVER_PATCH_MASK 0xff00U
150#define SPWPNP_PNPVER_PATCH_GET( _reg ) \
151 ( ( ( _reg ) & SPWPNP_PNPVER_PATCH_MASK ) >> \
152 SPWPNP_PNPVER_PATCH_SHIFT )
153#define SPWPNP_PNPVER_PATCH_SET( _reg, _val ) \
154 ( ( ( _reg ) & ~SPWPNP_PNPVER_PATCH_MASK ) | \
155 ( ( ( _val ) << SPWPNP_PNPVER_PATCH_SHIFT ) & \
156 SPWPNP_PNPVER_PATCH_MASK ) )
157#define SPWPNP_PNPVER_PATCH( _val ) \
158 ( ( ( _val ) << SPWPNP_PNPVER_PATCH_SHIFT ) & \
159 SPWPNP_PNPVER_PATCH_MASK )
160
172#define SPWPNP_PNPDEVSTS_STATUS_SHIFT 0
173#define SPWPNP_PNPDEVSTS_STATUS_MASK 0xffU
174#define SPWPNP_PNPDEVSTS_STATUS_GET( _reg ) \
175 ( ( ( _reg ) & SPWPNP_PNPDEVSTS_STATUS_MASK ) >> \
176 SPWPNP_PNPDEVSTS_STATUS_SHIFT )
177#define SPWPNP_PNPDEVSTS_STATUS_SET( _reg, _val ) \
178 ( ( ( _reg ) & ~SPWPNP_PNPDEVSTS_STATUS_MASK ) | \
179 ( ( ( _val ) << SPWPNP_PNPDEVSTS_STATUS_SHIFT ) & \
180 SPWPNP_PNPDEVSTS_STATUS_MASK ) )
181#define SPWPNP_PNPDEVSTS_STATUS( _val ) \
182 ( ( ( _val ) << SPWPNP_PNPDEVSTS_STATUS_SHIFT ) & \
183 SPWPNP_PNPDEVSTS_STATUS_MASK )
184
196#define SPWPNP_PNPACTLNK_ACTIVE_SHIFT 1
197#define SPWPNP_PNPACTLNK_ACTIVE_MASK 0xfffffffeU
198#define SPWPNP_PNPACTLNK_ACTIVE_GET( _reg ) \
199 ( ( ( _reg ) & SPWPNP_PNPACTLNK_ACTIVE_MASK ) >> \
200 SPWPNP_PNPACTLNK_ACTIVE_SHIFT )
201#define SPWPNP_PNPACTLNK_ACTIVE_SET( _reg, _val ) \
202 ( ( ( _reg ) & ~SPWPNP_PNPACTLNK_ACTIVE_MASK ) | \
203 ( ( ( _val ) << SPWPNP_PNPACTLNK_ACTIVE_SHIFT ) & \
204 SPWPNP_PNPACTLNK_ACTIVE_MASK ) )
205#define SPWPNP_PNPACTLNK_ACTIVE( _val ) \
206 ( ( ( _val ) << SPWPNP_PNPACTLNK_ACTIVE_SHIFT ) & \
207 SPWPNP_PNPACTLNK_ACTIVE_MASK )
208
220#define SPWPNP_PNPOA0_RA_SHIFT 0
221#define SPWPNP_PNPOA0_RA_MASK 0xffffffffU
222#define SPWPNP_PNPOA0_RA_GET( _reg ) \
223 ( ( ( _reg ) & SPWPNP_PNPOA0_RA_MASK ) >> \
224 SPWPNP_PNPOA0_RA_SHIFT )
225#define SPWPNP_PNPOA0_RA_SET( _reg, _val ) \
226 ( ( ( _reg ) & ~SPWPNP_PNPOA0_RA_MASK ) | \
227 ( ( ( _val ) << SPWPNP_PNPOA0_RA_SHIFT ) & \
228 SPWPNP_PNPOA0_RA_MASK ) )
229#define SPWPNP_PNPOA0_RA( _val ) \
230 ( ( ( _val ) << SPWPNP_PNPOA0_RA_SHIFT ) & \
231 SPWPNP_PNPOA0_RA_MASK )
232
244#define SPWPNP_PNPOA1_RA_SHIFT 0
245#define SPWPNP_PNPOA1_RA_MASK 0xffffffffU
246#define SPWPNP_PNPOA1_RA_GET( _reg ) \
247 ( ( ( _reg ) & SPWPNP_PNPOA1_RA_MASK ) >> \
248 SPWPNP_PNPOA1_RA_SHIFT )
249#define SPWPNP_PNPOA1_RA_SET( _reg, _val ) \
250 ( ( ( _reg ) & ~SPWPNP_PNPOA1_RA_MASK ) | \
251 ( ( ( _val ) << SPWPNP_PNPOA1_RA_SHIFT ) & \
252 SPWPNP_PNPOA1_RA_MASK ) )
253#define SPWPNP_PNPOA1_RA( _val ) \
254 ( ( ( _val ) << SPWPNP_PNPOA1_RA_SHIFT ) & \
255 SPWPNP_PNPOA1_RA_MASK )
256
268#define SPWPNP_PNPOA2_RA_SHIFT 0
269#define SPWPNP_PNPOA2_RA_MASK 0xffffffffU
270#define SPWPNP_PNPOA2_RA_GET( _reg ) \
271 ( ( ( _reg ) & SPWPNP_PNPOA2_RA_MASK ) >> \
272 SPWPNP_PNPOA2_RA_SHIFT )
273#define SPWPNP_PNPOA2_RA_SET( _reg, _val ) \
274 ( ( ( _reg ) & ~SPWPNP_PNPOA2_RA_MASK ) | \
275 ( ( ( _val ) << SPWPNP_PNPOA2_RA_SHIFT ) & \
276 SPWPNP_PNPOA2_RA_MASK ) )
277#define SPWPNP_PNPOA2_RA( _val ) \
278 ( ( ( _val ) << SPWPNP_PNPOA2_RA_SHIFT ) & \
279 SPWPNP_PNPOA2_RA_MASK )
280
292#define SPWPNP_PNPDEVID_DID_SHIFT 0
293#define SPWPNP_PNPDEVID_DID_MASK 0xffffffffU
294#define SPWPNP_PNPDEVID_DID_GET( _reg ) \
295 ( ( ( _reg ) & SPWPNP_PNPDEVID_DID_MASK ) >> \
296 SPWPNP_PNPDEVID_DID_SHIFT )
297#define SPWPNP_PNPDEVID_DID_SET( _reg, _val ) \
298 ( ( ( _reg ) & ~SPWPNP_PNPDEVID_DID_MASK ) | \
299 ( ( ( _val ) << SPWPNP_PNPDEVID_DID_SHIFT ) & \
300 SPWPNP_PNPDEVID_DID_MASK ) )
301#define SPWPNP_PNPDEVID_DID( _val ) \
302 ( ( ( _val ) << SPWPNP_PNPDEVID_DID_SHIFT ) & \
303 SPWPNP_PNPDEVID_DID_MASK )
304
316#define SPWPNP_PNPUVEND_VEND_SHIFT 16
317#define SPWPNP_PNPUVEND_VEND_MASK 0xffff0000U
318#define SPWPNP_PNPUVEND_VEND_GET( _reg ) \
319 ( ( ( _reg ) & SPWPNP_PNPUVEND_VEND_MASK ) >> \
320 SPWPNP_PNPUVEND_VEND_SHIFT )
321#define SPWPNP_PNPUVEND_VEND_SET( _reg, _val ) \
322 ( ( ( _reg ) & ~SPWPNP_PNPUVEND_VEND_MASK ) | \
323 ( ( ( _val ) << SPWPNP_PNPUVEND_VEND_SHIFT ) & \
324 SPWPNP_PNPUVEND_VEND_MASK ) )
325#define SPWPNP_PNPUVEND_VEND( _val ) \
326 ( ( ( _val ) << SPWPNP_PNPUVEND_VEND_SHIFT ) & \
327 SPWPNP_PNPUVEND_VEND_MASK )
328
329#define SPWPNP_PNPUVEND_PROD_SHIFT 0
330#define SPWPNP_PNPUVEND_PROD_MASK 0xffffU
331#define SPWPNP_PNPUVEND_PROD_GET( _reg ) \
332 ( ( ( _reg ) & SPWPNP_PNPUVEND_PROD_MASK ) >> \
333 SPWPNP_PNPUVEND_PROD_SHIFT )
334#define SPWPNP_PNPUVEND_PROD_SET( _reg, _val ) \
335 ( ( ( _reg ) & ~SPWPNP_PNPUVEND_PROD_MASK ) | \
336 ( ( ( _val ) << SPWPNP_PNPUVEND_PROD_SHIFT ) & \
337 SPWPNP_PNPUVEND_PROD_MASK ) )
338#define SPWPNP_PNPUVEND_PROD( _val ) \
339 ( ( ( _val ) << SPWPNP_PNPUVEND_PROD_SHIFT ) & \
340 SPWPNP_PNPUVEND_PROD_MASK )
341
353#define SPWPNP_PNPUSN_USN_SHIFT 0
354#define SPWPNP_PNPUSN_USN_MASK 0xffffffffU
355#define SPWPNP_PNPUSN_USN_GET( _reg ) \
356 ( ( ( _reg ) & SPWPNP_PNPUSN_USN_MASK ) >> \
357 SPWPNP_PNPUSN_USN_SHIFT )
358#define SPWPNP_PNPUSN_USN_SET( _reg, _val ) \
359 ( ( ( _reg ) & ~SPWPNP_PNPUSN_USN_MASK ) | \
360 ( ( ( _val ) << SPWPNP_PNPUSN_USN_SHIFT ) & \
361 SPWPNP_PNPUSN_USN_MASK ) )
362#define SPWPNP_PNPUSN_USN( _val ) \
363 ( ( ( _val ) << SPWPNP_PNPUSN_USN_SHIFT ) & \
364 SPWPNP_PNPUSN_USN_MASK )
365
377#define SPWPNP_PNPVSTRL_LEN_SHIFT 0
378#define SPWPNP_PNPVSTRL_LEN_MASK 0x7fffU
379#define SPWPNP_PNPVSTRL_LEN_GET( _reg ) \
380 ( ( ( _reg ) & SPWPNP_PNPVSTRL_LEN_MASK ) >> \
381 SPWPNP_PNPVSTRL_LEN_SHIFT )
382#define SPWPNP_PNPVSTRL_LEN_SET( _reg, _val ) \
383 ( ( ( _reg ) & ~SPWPNP_PNPVSTRL_LEN_MASK ) | \
384 ( ( ( _val ) << SPWPNP_PNPVSTRL_LEN_SHIFT ) & \
385 SPWPNP_PNPVSTRL_LEN_MASK ) )
386#define SPWPNP_PNPVSTRL_LEN( _val ) \
387 ( ( ( _val ) << SPWPNP_PNPVSTRL_LEN_SHIFT ) & \
388 SPWPNP_PNPVSTRL_LEN_MASK )
389
401#define SPWPNP_PNPPSTRL_LEN_SHIFT 0
402#define SPWPNP_PNPPSTRL_LEN_MASK 0x7fffU
403#define SPWPNP_PNPPSTRL_LEN_GET( _reg ) \
404 ( ( ( _reg ) & SPWPNP_PNPPSTRL_LEN_MASK ) >> \
405 SPWPNP_PNPPSTRL_LEN_SHIFT )
406#define SPWPNP_PNPPSTRL_LEN_SET( _reg, _val ) \
407 ( ( ( _reg ) & ~SPWPNP_PNPPSTRL_LEN_MASK ) | \
408 ( ( ( _val ) << SPWPNP_PNPPSTRL_LEN_SHIFT ) & \
409 SPWPNP_PNPPSTRL_LEN_MASK ) )
410#define SPWPNP_PNPPSTRL_LEN( _val ) \
411 ( ( ( _val ) << SPWPNP_PNPPSTRL_LEN_SHIFT ) & \
412 SPWPNP_PNPPSTRL_LEN_MASK )
413
425#define SPWPNP_PNPPCNT_PC_SHIFT 0
426#define SPWPNP_PNPPCNT_PC_MASK 0x1fU
427#define SPWPNP_PNPPCNT_PC_GET( _reg ) \
428 ( ( ( _reg ) & SPWPNP_PNPPCNT_PC_MASK ) >> \
429 SPWPNP_PNPPCNT_PC_SHIFT )
430#define SPWPNP_PNPPCNT_PC_SET( _reg, _val ) \
431 ( ( ( _reg ) & ~SPWPNP_PNPPCNT_PC_MASK ) | \
432 ( ( ( _val ) << SPWPNP_PNPPCNT_PC_SHIFT ) & \
433 SPWPNP_PNPPCNT_PC_MASK ) )
434#define SPWPNP_PNPPCNT_PC( _val ) \
435 ( ( ( _val ) << SPWPNP_PNPPCNT_PC_SHIFT ) & \
436 SPWPNP_PNPPCNT_PC_MASK )
437
449#define SPWPNP_PNPACNT_AC_SHIFT 0
450#define SPWPNP_PNPACNT_AC_MASK 0xffU
451#define SPWPNP_PNPACNT_AC_GET( _reg ) \
452 ( ( ( _reg ) & SPWPNP_PNPACNT_AC_MASK ) >> \
453 SPWPNP_PNPACNT_AC_SHIFT )
454#define SPWPNP_PNPACNT_AC_SET( _reg, _val ) \
455 ( ( ( _reg ) & ~SPWPNP_PNPACNT_AC_MASK ) | \
456 ( ( ( _val ) << SPWPNP_PNPACNT_AC_SHIFT ) & \
457 SPWPNP_PNPACNT_AC_MASK ) )
458#define SPWPNP_PNPACNT_AC( _val ) \
459 ( ( ( _val ) << SPWPNP_PNPACNT_AC_SHIFT ) & \
460 SPWPNP_PNPACNT_AC_MASK )
461
467typedef struct spwpnp {
471 uint32_t pnpvend;
472
476 uint32_t pnpver;
477
481 uint32_t pnpdevsts;
482
486 uint32_t pnpactlnk;
487
491 uint32_t pnpoa0;
492
496 uint32_t pnpoa1;
497
501 uint32_t pnpoa2;
502
506 uint32_t pnpdevid;
507
511 uint32_t pnpuvend;
512
516 uint32_t pnpusn;
517
518 uint16_t reserved_e_4000[ 8185 ];
519
523 uint32_t pnpvstrl;
524
525 uint32_t reserved_4004_6000[ 2047 ];
526
530 uint32_t pnppstrl;
531
532 uint32_t reserved_6004_8000[ 2047 ];
533
537 uint32_t pnppcnt;
538
539 uint32_t reserved_8004_c000[ 4095 ];
540
544 uint32_t pnpacnt;
546
549#ifdef __cplusplus
550}
551#endif
552
553#endif /* _GRLIB_SPWPNP_REGS_H */
This set of defines the SpaceWire Plug-and-Play address map.
Definition: spwpnp-regs.h:467
uint32_t pnppcnt
See SpaceWire Plug-and-Play - Protocol Count (PNPPCNT).
Definition: spwpnp-regs.h:537
uint32_t pnpuvend
See SpaceWire Plug-and-Play - Unit Vendor and Product ID (PNPUVEND).
Definition: spwpnp-regs.h:511
uint32_t pnpactlnk
See SpaceWire Plug-and-Play - Active Links (PNPACTLNK).
Definition: spwpnp-regs.h:486
uint32_t pnpvend
See SpaceWire Plug-and-Play - Device Vendor and Product ID (PNPVEND).
Definition: spwpnp-regs.h:471
uint32_t pnpvstrl
See SpaceWire Plug-and-Play - Vendor String Length (PNPVSTRL).
Definition: spwpnp-regs.h:523
uint32_t pnpver
See SpaceWire Plug-and-Play - Version (PNPVER).
Definition: spwpnp-regs.h:476
uint32_t pnpdevsts
See SpaceWire Plug-and-Play - Device Status (PNPDEVSTS).
Definition: spwpnp-regs.h:481
uint32_t pnpdevid
See SpaceWire Plug-and-Play - Device ID (PNPDEVID).
Definition: spwpnp-regs.h:506
uint32_t pnpoa2
See SpaceWire Plug-and-Play - Owner Address 2 (PNPOA2).
Definition: spwpnp-regs.h:501
uint32_t pnpoa1
See SpaceWire Plug-and-Play - Owner Address 1 (PNPOA1).
Definition: spwpnp-regs.h:496
uint32_t pnpoa0
See SpaceWire Plug-and-Play - Owner Address 0 (PNPOA0).
Definition: spwpnp-regs.h:491
uint32_t pnpacnt
See SpaceWire Plug-and-Play - Application Count (PNPACNT).
Definition: spwpnp-regs.h:544
uint32_t pnppstrl
See SpaceWire Plug-and-Play - Product String Length (PNPPSTRL).
Definition: spwpnp-regs.h:530
uint32_t pnpusn
See SpaceWire Plug-and-Play - Unit Serial Number (PNPUSN).
Definition: spwpnp-regs.h:516