hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/include/soc/rockchip/rockchip_iommu.h
....@@ -7,12 +7,14 @@
77
88 struct device;
99
10
-#if IS_ENABLED(CONFIG_ROCKCHIP_IOMMU)
10
+#if IS_REACHABLE(CONFIG_ROCKCHIP_IOMMU)
1111 int rockchip_iommu_enable(struct device *dev);
1212 int rockchip_iommu_disable(struct device *dev);
13
-bool rockchip_iommu_is_enabled(struct device *dev);
1413 int rockchip_pagefault_done(struct device *master_dev);
1514 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);
1618 int rockchip_iommu_force_reset(struct device *dev);
1719 #else
1820 static inline int rockchip_iommu_enable(struct device *dev)
....@@ -23,10 +25,6 @@
2325 {
2426 return -ENODEV;
2527 }
26
-static inline bool rockchip_iommu_is_enabled(struct device *dev)
27
-{
28
- return false;
29
-}
3028 static inline int rockchip_pagefault_done(struct device *master_dev)
3129 {
3230 return 0;
....@@ -35,6 +33,16 @@
3533 {
3634 return NULL;
3735 }
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
+}
3846 static inline int rockchip_iommu_force_reset(struct device *dev)
3947 {
4048 return -ENODEV;