RTEMS 6.1-rc4
Loading...
Searching...
No Matches
gr_rasta_tmtc.h
1/* SPDX-License-Identifier: BSD-2-Clause */
2
3/* GR-RASTA-TMTC PCI Target driver.
4 *
5 * COPYRIGHT (c) 2008.
6 * Cobham Gaisler AB.
7 *
8 * Configures the GR-RASTA-TMTC interface PCI board.
9 * This driver provides a AMBA PnP bus by using the general part
10 * of the AMBA PnP bus driver (ambapp_bus.c).
11 *
12 * Driver resources for the AMBA PnP bus provided can be set using
13 * gr_rasta_tmtc_set_resources().
14 *
15 * Redistribution and use in source and binary forms, with or without
16 * modification, are permitted provided that the following conditions
17 * are met:
18 * 1. Redistributions of source code must retain the above copyright
19 * notice, this list of conditions and the following disclaimer.
20 * 2. Redistributions in binary form must reproduce the above copyright
21 * notice, this list of conditions and the following disclaimer in the
22 * documentation and/or other materials provided with the distribution.
23 *
24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
28 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
32 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34 * POSSIBILITY OF SUCH DAMAGE.
35 */
36
37#ifndef __GR_RASTA_TMTC_H__
38#define __GR_RASTA_TMTC_H__
39
40#include <drvmgr/drvmgr.h>
41
42#ifdef __cplusplus
43extern "C" {
44#endif
45
46/* GPIO TM/TC configuration pin definitions
47 * --31 PWRX (1=PW2APB, 0=TM VC3/4)
48 * --30 PWTC (1=APB2PW, 0=TC MAP1/2)
49 * --29 Redundant TM (1=enable, 0=disable)
50 * --28 Redundant TC (1=enable, 0=disable)
51 * --27 Select TM output (1=GRTM, 0=PTME)
52 * --26 Loop back PW (1=enable, 0=disable)
53 * --25 Transponder clock (1=PLL, 0=PLL bypass)
54 * --24 PWTX-SELECT (0=TX0-0, 1=TX0-1)
55 * --23 PDEC Map Switch (1=on, 0=off)
56 * --22 PDEC Ext CPDU (1=on, 0=off)
57 * --21 PDEC Super User (1=on, 0=off)
58 * --20 PDEC RM On (1=on, 0=off)
59 * --19 PDEC AU Enable (1=on, 0=off)
60 * --18 PDEC Dynamic Mode (1=on, 0=off)
61 * --17 PDEC Priority (1=on, 0=off)
62 * --16 TC PSS Support (1=on, 0=off)
63 * --15 TC Mark (1=on, 0=off)
64 * --14 TC Pseudo (1=on, 0=off)
65 * --13 TC Rising Clock (1=rise, 0=fall)
66 * --12 TC Active High (1=high, 0=low)
67 * --11 Bit Lock Positive (1=high, 0=low)
68 * --10 RF Avail Positive (1=high, 0=low)
69 * -- 9 : 0 SpaceCraft ID
70 */
71
72#define GR_TMTC_GPIO_PWRX (1<<31)
73#define GR_TMTC_GPIO_PWTC (1<<30)
74#define GR_TMTC_GPIO_RED_TM (1<<29)
75#define GR_TMTC_GPIO_RED_TC (1<<28)
76#define GR_TMTC_GPIO_GRTM_SEL (1<<27)
77#define GR_TMTC_GPIO_LB_PW (1<<26)
78#define GR_TMTC_GPIO_TRANSP_CLK (1<<25)
79#define GR_TMTC_GPIO_PWTX_SEL (1<<24)
80#define GR_TMTC_GPIO_PDEC_MAP (1<<23)
81#define GR_TMTC_GPIO_PDEC_CPDU (1<<22)
82#define GR_TMTC_GPIO_PDEC_SU (1<<21)
83#define GR_TMTC_GPIO_PDEC_RM (1<<20)
84#define GR_TMTC_GPIO_PDEC_AU (1<<19)
85#define GR_TMTC_GPIO_PDEC_DYN_MODE (1<<18)
86#define GR_TMTC_GPIO_PDEC_PRIO (1<<17)
87#define GR_TMTC_GPIO_TC_PSS (1<<16)
88#define GR_TMTC_GPIO_TC_MARK (1<<15)
89#define GR_TMTC_GPIO_TC_PSEUDO (1<<14)
90#define GR_TMTC_GPIO_TC_RISING_CLK (1<<13)
91#define GR_TMTC_GPIO_TC_ACTIVE_HIGH (1<<12)
92#define GR_TMTC_GPIO_TC_BIT_LOCK (1<<11)
93#define GR_TMTC_GPIO_TC_RF_AVAIL (1<<10)
94#define GR_TMTC_GPIO_SCID (0x000003ff)
95
96/* An array of pointers to GR-RASTA-TMTC bus resources. The resources will be
97 * used by the device drivers controlling the cores on the GR-RASTA-IO target
98 * AMBA bus.
99 *
100 * The array is defined weak, and defaults to no resources. The array must be
101 * terminated with a NULL resource.
102 */
103extern struct drvmgr_bus_res *gr_rasta_tmtc_resources[];
104
105/* Options to gr_rasta_io_print function */
106#define RASTA_TMTC_OPTIONS_AMBA 0x01 /* Print AMBA bus devices */
107#define RASTA_TMTC_OPTIONS_IRQ 0x02 /* Print current IRQ setup */
108
109/* Print information about GR-RASTA-TMTC PCI boards */
110void gr_rasta_tmtc_print(int options);
111
112/* Print information about a GR-RASTA-TMTC PCI boards */
113void gr_rasta_tmtc_print_dev(struct drvmgr_dev *dev, int options);
114
115/* Register GR-RASTA-TMTC driver */
116void gr_rasta_tmtc_register_drv(void);
117
118#ifdef __cplusplus
119}
120#endif
121
122#endif
Driver Manager Interface.
Definition: drvmgr.h:238
Definition: drvmgr.h:297