RTEMS 6.1-rc2
Loading...
Searching...
No Matches
b1553rt.h
1/* SPDX-License-Identifier: BSD-2-Clause */
2
3/* B1553RT driver interface
4 *
5 * COPYRIGHT (c) 2009.
6 * Aeroflex Gaisler AB
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
10 * are met:
11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
21 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27 * POSSIBILITY OF SUCH DAMAGE.
28 */
29
30#ifndef __B1553RT_H__
31#define __B1553RT_H__
32
33#include <drvmgr/drvmgr.h>
34
35#ifdef __cplusplus
36extern "C" {
37#endif
38
39struct rt_reg {
40 volatile unsigned int stat; /* 0x00 */
41 volatile unsigned int ctrl; /* 0x04 */
42 volatile unsigned int vword; /* 0x08 */
43 volatile unsigned int irq; /* 0x0C */
44 volatile unsigned int addr; /* 0x10 */
45 volatile unsigned int ipm; /* 0x14 */
46};
47
48
49struct rt_msg {
50 unsigned short miw;
51 unsigned short time;
52 unsigned short data[32];
53 unsigned short desc;
54};
55
56#define RT_FREQ_12MHZ 0
57#define RT_FREQ_16MHZ 1
58#define RT_FREQ_20MHZ 2
59#define RT_FREQ_24MHZ 3
60#define RT_FREQ_MASK 0x3
61
62/* IOCTLs */
63#define RT_SET_ADDR 3
64#define RT_SET_BCE 5
65#define RT_RX_BLOCK 8
66#define RT_CLR_STATUS 12
67#define RT_GET_STATUS 13
68#define RT_SET_EVENTID 14
69
70#define RT_SET_VECTORW 32
71#define RT_SET_EXTMDATA 33
72
73#define RT_ILLCMD_IRQ 128
74#define RT_MERR_IRQ 2048
75#define RT_DMAF_IRQ 32768 /* DMA Fail irq */
76
77#define RT_TSW_OK (1<<14)
78#define RT_TSW_BUS (1<<13)
79#define RT_TSW_BC (1<<12)
80#define RT_TSW_LPBKERRB (1<<11)
81#define RT_TSW_LPBKERRA (1<<10)
82#define RT_TSW_ILL (1<<9)
83#define RT_TSW_MEM (1<<8)
84#define RT_TSW_MAN (1<<7)
85#define RT_TSW_PAR (1<<6)
86#define RT_TSW_WC (1<<5)
87
88void b1553rt_print_dev(struct drvmgr_dev *dev, int options);
89void b1553rt_print(int options);
90
91void b1553rt_register_drv(void);
92
93#ifdef __cplusplus
94}
95#endif
96
97#endif /* __RT_H__ */
98
Driver Manager Interface.
Definition: drvmgr.h:297
Definition: b1553brm.h:90
Definition: b1553rt.h:39