summaryrefslogtreecommitdiffstats
path: root/rtemsbsd/include/rtems/bsd/local/xdma_if.h
blob: e5271f60b093fafb978a80e94068750395f541b5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
/*
 * This file is produced automatically.
 * Do not modify anything in here by hand.
 *
 * Created from source file
 *   xdma_if.m
 * with
 *   makeobjops.awk
 *
 * See the source file for legal information
 */


#ifndef _xdma_if_h_
#define _xdma_if_h_

/** @brief Unique descriptor for the XDMA_CHANNEL_REQUEST() method */
extern struct kobjop_desc xdma_channel_request_desc;
/** @brief A function implementing the XDMA_CHANNEL_REQUEST() method */
typedef int xdma_channel_request_t(device_t dev, struct xdma_channel *xchan,
                                   struct xdma_request *req);

static __inline int XDMA_CHANNEL_REQUEST(device_t dev,
                                         struct xdma_channel *xchan,
                                         struct xdma_request *req)
{
	kobjop_t _m;
	int rc;
	KOBJOPLOOKUP(((kobj_t)dev)->ops,xdma_channel_request);
	rc = ((xdma_channel_request_t *) _m)(dev, xchan, req);
	return (rc);
}

/** @brief Unique descriptor for the XDMA_CHANNEL_PREP_SG() method */
extern struct kobjop_desc xdma_channel_prep_sg_desc;
/** @brief A function implementing the XDMA_CHANNEL_PREP_SG() method */
typedef int xdma_channel_prep_sg_t(device_t dev, struct xdma_channel *xchan);

static __inline int XDMA_CHANNEL_PREP_SG(device_t dev,
                                         struct xdma_channel *xchan)
{
	kobjop_t _m;
	int rc;
	KOBJOPLOOKUP(((kobj_t)dev)->ops,xdma_channel_prep_sg);
	rc = ((xdma_channel_prep_sg_t *) _m)(dev, xchan);
	return (rc);
}

/** @brief Unique descriptor for the XDMA_CHANNEL_CAPACITY() method */
extern struct kobjop_desc xdma_channel_capacity_desc;
/** @brief A function implementing the XDMA_CHANNEL_CAPACITY() method */
typedef int xdma_channel_capacity_t(device_t dev, struct xdma_channel *xchan,
                                    uint32_t *capacity);

static __inline int XDMA_CHANNEL_CAPACITY(device_t dev,
                                          struct xdma_channel *xchan,
                                          uint32_t *capacity)
{
	kobjop_t _m;
	int rc;
	KOBJOPLOOKUP(((kobj_t)dev)->ops,xdma_channel_capacity);
	rc = ((xdma_channel_capacity_t *) _m)(dev, xchan, capacity);
	return (rc);
}

/** @brief Unique descriptor for the XDMA_CHANNEL_SUBMIT_SG() method */
extern struct kobjop_desc xdma_channel_submit_sg_desc;
/** @brief A function implementing the XDMA_CHANNEL_SUBMIT_SG() method */
typedef int xdma_channel_submit_sg_t(device_t dev, struct xdma_channel *xchan,
                                     struct xdma_sglist *sg, uint32_t sg_n);

static __inline int XDMA_CHANNEL_SUBMIT_SG(device_t dev,
                                           struct xdma_channel *xchan,
                                           struct xdma_sglist *sg,
                                           uint32_t sg_n)
{
	kobjop_t _m;
	int rc;
	KOBJOPLOOKUP(((kobj_t)dev)->ops,xdma_channel_submit_sg);
	rc = ((xdma_channel_submit_sg_t *) _m)(dev, xchan, sg, sg_n);
	return (rc);
}

/** @brief Unique descriptor for the XDMA_OFW_MD_DATA() method */
extern struct kobjop_desc xdma_ofw_md_data_desc;
/** @brief A function implementing the XDMA_OFW_MD_DATA() method */
typedef int xdma_ofw_md_data_t(device_t dev, pcell_t *cells, int ncells,
                               void **data);

static __inline int XDMA_OFW_MD_DATA(device_t dev, pcell_t *cells, int ncells,
                                     void **data)
{
	kobjop_t _m;
	int rc;
	KOBJOPLOOKUP(((kobj_t)dev)->ops,xdma_ofw_md_data);
	rc = ((xdma_ofw_md_data_t *) _m)(dev, cells, ncells, data);
	return (rc);
}

/** @brief Unique descriptor for the XDMA_CHANNEL_ALLOC() method */
extern struct kobjop_desc xdma_channel_alloc_desc;
/** @brief A function implementing the XDMA_CHANNEL_ALLOC() method */
typedef int xdma_channel_alloc_t(device_t dev, struct xdma_channel *xchan);

static __inline int XDMA_CHANNEL_ALLOC(device_t dev, struct xdma_channel *xchan)
{
	kobjop_t _m;
	int rc;
	KOBJOPLOOKUP(((kobj_t)dev)->ops,xdma_channel_alloc);
	rc = ((xdma_channel_alloc_t *) _m)(dev, xchan);
	return (rc);
}

/** @brief Unique descriptor for the XDMA_CHANNEL_FREE() method */
extern struct kobjop_desc xdma_channel_free_desc;
/** @brief A function implementing the XDMA_CHANNEL_FREE() method */
typedef int xdma_channel_free_t(device_t dev, struct xdma_channel *xchan);

static __inline int XDMA_CHANNEL_FREE(device_t dev, struct xdma_channel *xchan)
{
	kobjop_t _m;
	int rc;
	KOBJOPLOOKUP(((kobj_t)dev)->ops,xdma_channel_free);
	rc = ((xdma_channel_free_t *) _m)(dev, xchan);
	return (rc);
}

/** @brief Unique descriptor for the XDMA_CHANNEL_CONTROL() method */
extern struct kobjop_desc xdma_channel_control_desc;
/** @brief A function implementing the XDMA_CHANNEL_CONTROL() method */
typedef int xdma_channel_control_t(device_t dev, struct xdma_channel *xchan,
                                   int cmd);

static __inline int XDMA_CHANNEL_CONTROL(device_t dev,
                                         struct xdma_channel *xchan, int cmd)
{
	kobjop_t _m;
	int rc;
	KOBJOPLOOKUP(((kobj_t)dev)->ops,xdma_channel_control);
	rc = ((xdma_channel_control_t *) _m)(dev, xchan, cmd);
	return (rc);
}

#endif /* _xdma_if_h_ */