2019-06-03 12:44:50 +07:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
2012-03-05 18:49:30 +07:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2012 ARM Ltd.
|
|
|
|
*/
|
|
|
|
#ifndef __ASM_DMA_MAPPING_H
|
|
|
|
#define __ASM_DMA_MAPPING_H
|
|
|
|
|
|
|
|
#ifdef __KERNEL__
|
|
|
|
|
|
|
|
#include <linux/types.h>
|
|
|
|
#include <linux/vmalloc.h>
|
|
|
|
|
2013-10-18 23:01:32 +07:00
|
|
|
#include <xen/xen.h>
|
|
|
|
#include <asm/xen/hypervisor.h>
|
|
|
|
|
2017-04-14 04:04:21 +07:00
|
|
|
static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus)
|
2012-03-05 18:49:30 +07:00
|
|
|
{
|
2018-12-14 21:18:08 +07:00
|
|
|
return NULL;
|
2012-03-05 18:49:30 +07:00
|
|
|
}
|
|
|
|
|
2018-10-08 14:12:01 +07:00
|
|
|
/*
|
|
|
|
* Do not use this function in a driver, it is only provided for
|
|
|
|
* arch/arm/mm/xen.c, which is used by arm64 as well.
|
|
|
|
*/
|
2014-11-20 17:41:35 +07:00
|
|
|
static inline bool is_device_dma_coherent(struct device *dev)
|
|
|
|
{
|
2018-10-08 14:12:01 +07:00
|
|
|
return dev->dma_coherent;
|
2014-11-20 17:41:35 +07:00
|
|
|
}
|
|
|
|
|
2012-03-05 18:49:30 +07:00
|
|
|
#endif /* __KERNEL__ */
|
|
|
|
#endif /* __ASM_DMA_MAPPING_H */
|