| .. | .. |
|---|
| 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 | | -bool rockchip_iommu_is_enabled(struct device *dev); |
|---|
| 14 | 13 | int rockchip_pagefault_done(struct device *master_dev); |
|---|
| 15 | 14 | void __iomem *rockchip_get_iommu_base(struct device *master_dev, int idx); |
|---|
| 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); |
|---|
| 16 | 18 | int rockchip_iommu_force_reset(struct device *dev); |
|---|
| 17 | 19 | #else |
|---|
| 18 | 20 | static inline int rockchip_iommu_enable(struct device *dev) |
|---|
| .. | .. |
|---|
| 23 | 25 | { |
|---|
| 24 | 26 | return -ENODEV; |
|---|
| 25 | 27 | } |
|---|
| 26 | | -static inline bool rockchip_iommu_is_enabled(struct device *dev) |
|---|
| 27 | | -{ |
|---|
| 28 | | - return false; |
|---|
| 29 | | -} |
|---|
| 30 | 28 | static inline int rockchip_pagefault_done(struct device *master_dev) |
|---|
| 31 | 29 | { |
|---|
| 32 | 30 | return 0; |
|---|
| .. | .. |
|---|
| 35 | 33 | { |
|---|
| 36 | 34 | return NULL; |
|---|
| 37 | 35 | } |
|---|
| 36 | +static inline bool rockchip_iommu_is_enabled(struct device *dev) |
|---|
| 37 | +{ |
|---|
| 38 | + return false; |
|---|
| 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 | +} |
|---|
| 38 | 46 | static inline int rockchip_iommu_force_reset(struct device *dev) |
|---|
| 39 | 47 | { |
|---|
| 40 | 48 | return -ENODEV; |
|---|