xref: /openbmc/linux/include/xen/arm/xen-ops.h (revision 6726d552)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _ASM_ARM_XEN_OPS_H
3 #define _ASM_ARM_XEN_OPS_H
4 
5 #include <xen/swiotlb-xen.h>
6 #include <xen/xen-ops.h>
7 
8 static inline void xen_setup_dma_ops(struct device *dev)
9 {
10 #ifdef CONFIG_XEN
11 	if (xen_is_grant_dma_device(dev))
12 		xen_grant_setup_dma_ops(dev);
13 	else if (xen_swiotlb_detect())
14 		dev->dma_ops = &xen_swiotlb_dma_ops;
15 #endif
16 }
17 
18 #endif /* _ASM_ARM_XEN_OPS_H */
19