.. | .. |
---|
7 | 7 | |
---|
8 | 8 | struct device; |
---|
9 | 9 | |
---|
10 | | -#if IS_ENABLED(CONFIG_ROCKCHIP_IOMMU) |
---|
| 10 | +#if IS_REACHABLE(CONFIG_ROCKCHIP_IOMMU) |
---|
11 | 11 | int rockchip_iommu_enable(struct device *dev); |
---|
12 | 12 | int rockchip_iommu_disable(struct device *dev); |
---|
| 13 | +int rockchip_pagefault_done(struct device *master_dev); |
---|
| 14 | +void __iomem *rockchip_get_iommu_base(struct device *master_dev, int idx); |
---|
13 | 15 | bool rockchip_iommu_is_enabled(struct device *dev); |
---|
| 16 | +void rockchip_iommu_mask_irq(struct device *dev); |
---|
| 17 | +void rockchip_iommu_unmask_irq(struct device *dev); |
---|
| 18 | +int rockchip_iommu_force_reset(struct device *dev); |
---|
14 | 19 | #else |
---|
15 | 20 | static inline int rockchip_iommu_enable(struct device *dev) |
---|
16 | 21 | { |
---|
.. | .. |
---|
20 | 25 | { |
---|
21 | 26 | return -ENODEV; |
---|
22 | 27 | } |
---|
| 28 | +static inline int rockchip_pagefault_done(struct device *master_dev) |
---|
| 29 | +{ |
---|
| 30 | + return 0; |
---|
| 31 | +} |
---|
| 32 | +static inline void __iomem *rockchip_get_iommu_base(struct device *master_dev, int idx) |
---|
| 33 | +{ |
---|
| 34 | + return NULL; |
---|
| 35 | +} |
---|
23 | 36 | static inline bool rockchip_iommu_is_enabled(struct device *dev) |
---|
24 | 37 | { |
---|
25 | 38 | return false; |
---|
26 | 39 | } |
---|
| 40 | +static inline void rockchip_iommu_mask_irq(struct device *dev) |
---|
| 41 | +{ |
---|
| 42 | +} |
---|
| 43 | +static inline void rockchip_iommu_unmask_irq(struct device *dev) |
---|
| 44 | +{ |
---|
| 45 | +} |
---|
| 46 | +static inline int rockchip_iommu_force_reset(struct device *dev) |
---|
| 47 | +{ |
---|
| 48 | + return -ENODEV; |
---|
| 49 | +} |
---|
27 | 50 | #endif |
---|
28 | 51 | |
---|
29 | 52 | #endif |
---|