xref: /openbmc/linux/include/uapi/linux/aspeed-xdma.h (revision 57c7d9bc)
1 /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
2 /* Copyright IBM Corp 2019 */
3 
4 #ifndef _UAPI_LINUX_ASPEED_XDMA_H_
5 #define _UAPI_LINUX_ASPEED_XDMA_H_
6 
7 #include <linux/ioctl.h>
8 #include <linux/types.h>
9 
10 #define __ASPEED_XDMA_IOCTL_MAGIC	0xb7
11 #define ASPEED_XDMA_IOCTL_RESET		_IO(__ASPEED_XDMA_IOCTL_MAGIC, 0)
12 
13 /*
14  * aspeed_xdma_direction
15  *
16  * ASPEED_XDMA_DIRECTION_DOWNSTREAM: transfers data from the host to the BMC
17  *
18  * ASPEED_XDMA_DIRECTION_UPSTREAM: transfers data from the BMC to the host
19  */
20 enum aspeed_xdma_direction {
21 	ASPEED_XDMA_DIRECTION_DOWNSTREAM = 0,
22 	ASPEED_XDMA_DIRECTION_UPSTREAM,
23 };
24 
25 /*
26  * aspeed_xdma_op
27  *
28  * host_addr: the DMA address on the host side, typically configured by PCI
29  *            subsystem
30  *
31  * len: the size of the transfer in bytes
32  *
33  * direction: an enumerator indicating the direction of the DMA operation; see
34  *            enum aspeed_xdma_direction
35  */
36 struct aspeed_xdma_op {
37 	__u64 host_addr;
38 	__u32 len;
39 	__u32 direction;
40 };
41 
42 #endif /* _UAPI_LINUX_ASPEED_XDMA_H_ */
43