Blame view
include/linux/of_iommu.h
1.1 KB
4e0ee78f2 iommu: Add DMA wi... |
1 2 |
#ifndef __OF_IOMMU_H #define __OF_IOMMU_H |
7eba1d514 iommu: provide he... |
3 |
#include <linux/device.h> |
1cd076bf6 iommu: provide ea... |
4 5 |
#include <linux/iommu.h> #include <linux/of.h> |
4e0ee78f2 iommu: Add DMA wi... |
6 7 8 9 10 |
#ifdef CONFIG_OF_IOMMU extern int of_get_dma_window(struct device_node *dn, const char *prefix, int index, unsigned long *busno, dma_addr_t *addr, size_t *size); |
53c92d793 iommu: of: enforc... |
11 |
extern const struct iommu_ops *of_iommu_configure(struct device *dev, |
ed7486210 of: iommu: Add pt... |
12 |
struct device_node *master_np); |
1cd076bf6 iommu: provide ea... |
13 |
|
4e0ee78f2 iommu: Add DMA wi... |
14 15 16 17 18 19 20 21 |
#else static inline int of_get_dma_window(struct device_node *dn, const char *prefix, int index, unsigned long *busno, dma_addr_t *addr, size_t *size) { return -EINVAL; } |
53c92d793 iommu: of: enforc... |
22 |
static inline const struct iommu_ops *of_iommu_configure(struct device *dev, |
ed7486210 of: iommu: Add pt... |
23 |
struct device_node *master_np) |
7eba1d514 iommu: provide he... |
24 25 26 |
{ return NULL; } |
1cd076bf6 iommu: provide ea... |
27 |
|
4e0ee78f2 iommu: Add DMA wi... |
28 |
#endif /* CONFIG_OF_IOMMU */ |
53c92d793 iommu: of: enforc... |
29 30 |
void of_iommu_set_ops(struct device_node *np, const struct iommu_ops *ops); const struct iommu_ops *of_iommu_get_ops(struct device_node *np); |
1cd076bf6 iommu: provide ea... |
31 32 33 34 35 36 37 |
extern struct of_device_id __iommu_of_table; typedef int (*of_iommu_init_fn)(struct device_node *); #define IOMMU_OF_DECLARE(name, compat, fn) \ _OF_DECLARE(iommu, name, compat, fn, of_iommu_init_fn) |
4e0ee78f2 iommu: Add DMA wi... |
38 |
#endif /* __OF_IOMMU_H */ |