hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/include/soc/rockchip/rockchip_iommu.h
....@@ -7,10 +7,15 @@
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
+int rockchip_pagefault_done(struct device *master_dev);
14
+void __iomem *rockchip_get_iommu_base(struct device *master_dev, int idx);
1315 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);
1419 #else
1520 static inline int rockchip_iommu_enable(struct device *dev)
1621 {
....@@ -20,10 +25,28 @@
2025 {
2126 return -ENODEV;
2227 }
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
+}
2336 static inline bool rockchip_iommu_is_enabled(struct device *dev)
2437 {
2538 return false;
2639 }
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
+}
2750 #endif
2851
2952 #endif