Deleted Added
full compact
proto_dev.h (265055) proto_dev.h (284079)
1/*-
1/*-
2 * Copyright (c) 2014 Marcel Moolenaar
2 * Copyright (c) 2014, 2015 Marcel Moolenaar
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.

--- 7 unchanged lines hidden (view full) ---

18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 *
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.

--- 7 unchanged lines hidden (view full) ---

18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 *
26 * $FreeBSD: head/sys/dev/proto/proto_dev.h 265055 2014-04-28 17:58:40Z marcel $
26 * $FreeBSD: head/sys/dev/proto/proto_dev.h 284079 2015-06-06 16:09:25Z marcel $
27 */
28
29#ifndef _DEV_PROTO_DEV_H_
30#define _DEV_PROTO_DEV_H_
31
32#include <sys/ioccom.h>
33
34#define PROTO_IOC_CLASS 'h'
35
36struct proto_ioc_region {
37 unsigned long address;
38 unsigned long size;
39};
40
41#define PROTO_IOC_REGION _IOWR(PROTO_IOC_CLASS, 1, struct proto_ioc_region)
42
27 */
28
29#ifndef _DEV_PROTO_DEV_H_
30#define _DEV_PROTO_DEV_H_
31
32#include <sys/ioccom.h>
33
34#define PROTO_IOC_CLASS 'h'
35
36struct proto_ioc_region {
37 unsigned long address;
38 unsigned long size;
39};
40
41#define PROTO_IOC_REGION _IOWR(PROTO_IOC_CLASS, 1, struct proto_ioc_region)
42
43struct proto_ioc_busdma {
44 unsigned int request;
45#define PROTO_IOC_BUSDMA_TAG_CREATE 1
46#define PROTO_IOC_BUSDMA_TAG_DERIVE 2
47#define PROTO_IOC_BUSDMA_TAG_DESTROY 3
48 unsigned long key;
49 union {
50 struct {
51 unsigned long align;
52 unsigned long bndry;
53 unsigned long maxaddr;
54 unsigned long maxsz;
55 unsigned long maxsegsz;
56 unsigned int nsegs;
57 unsigned int datarate;
58 unsigned int flags;
59 } tag;
60 } u;
61 unsigned long result;
62};
63
64#define PROTO_IOC_BUSDMA _IOWR(PROTO_IOC_CLASS, 2, struct proto_ioc_busdma)
65
43#endif /* _DEV_PROTO_H_ */
66#endif /* _DEV_PROTO_H_ */