source: rtems/c/src/lib/libbsp/sparc/shared/include/b1553rt.h @ e53daed

4.115
Last change on this file since e53daed was 44e514f, checked in by Daniel Hellstrom <daniel@…>, on 02/10/15 at 15:28:03

LEON: B1553RT driver warnings fixes

  • Property mode set to 100644
File size: 1.7 KB
Line 
1/*  B1553RT driver interface
2 *
3 *  COPYRIGHT (c) 2009.
4 *  Aeroflex Gaisler AB
5 *
6 *  The license and distribution terms for this file may be
7 *  found in the file LICENSE in this distribution or at
8 *  http://www.rtems.com/license/LICENSE.
9 */
10
11#ifndef __B1553RT_H__
12#define __B1553RT_H__
13
14#include <drvmgr/drvmgr.h>
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
20struct rt_reg {
21    volatile unsigned int stat;            /* 0x00 */
22    volatile unsigned int ctrl;            /* 0x04 */
23    volatile unsigned int vword;           /* 0x08 */
24    volatile unsigned int irq;             /* 0x0C */
25    volatile unsigned int addr;            /* 0x10 */
26                volatile unsigned int ipm;             /* 0x14 */
27};
28
29
30struct rt_msg {
31    unsigned short miw;
32    unsigned short time;
33    unsigned short data[32];
34    unsigned short desc;
35};
36
37#define RT_FREQ_12MHZ 0
38#define RT_FREQ_16MHZ 1
39#define RT_FREQ_20MHZ 2
40#define RT_FREQ_24MHZ 3
41#define RT_FREQ_MASK 0x3
42
43/* IOCTLs */
44#define RT_SET_ADDR    3
45#define RT_SET_BCE     5
46#define RT_RX_BLOCK    8
47#define RT_CLR_STATUS  12
48#define RT_GET_STATUS  13
49#define RT_SET_EVENTID 14
50
51#define RT_SET_VECTORW 32
52#define RT_SET_EXTMDATA 33
53
54#define RT_ILLCMD_IRQ  128   
55#define RT_MERR_IRQ       2048
56#define RT_DMAF_IRQ       32768                /* DMA Fail irq */
57
58#define RT_TSW_OK  (1<<14)
59#define RT_TSW_BUS (1<<13)
60#define RT_TSW_BC  (1<<12)
61#define RT_TSW_LPBKERRB  (1<<11)
62#define RT_TSW_LPBKERRA  (1<<10)
63#define RT_TSW_ILL  (1<<9)
64#define RT_TSW_MEM  (1<<8)
65#define RT_TSW_MAN  (1<<7)
66#define RT_TSW_PAR  (1<<6)
67#define RT_TSW_WC   (1<<5)
68
69void b1553rt_print_dev(struct drvmgr_dev *dev, int options);
70void b1553rt_print(int options);
71
72void b1553rt_register_drv(void);
73
74#ifdef __cplusplus
75}
76#endif
77
78#endif /* __RT_H__ */
79
Note: See TracBrowser for help on using the repository browser.