forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 ee930fffee469d076998274a2ca55e13dc1efb67
kernel/drivers/pci/controller/dwc/pcie-dw-dmatest.h
....@@ -5,13 +5,31 @@
55 #ifndef __PCIE_DW_DMATEST_H
66 #define __PCIE_DW_DMATEST_H
77
8
+struct dma_trx_obj;
9
+struct device;
10
+
811 #if IS_ENABLED(CONFIG_PCIE_DW_DMATEST)
9
-struct dma_trx_obj *pcie_dw_dmatest_register(struct dw_pcie *pci, bool irq_en);
12
+struct dma_trx_obj *pcie_dw_dmatest_register(struct device *dev, bool irq_en);
13
+void pcie_dw_dmatest_unregister(struct dma_trx_obj *obj);
14
+int pcie_dw_wired_dma_frombus_block(struct dma_trx_obj *obj, u32 chn, u64 local_paddr, u64 bus_paddr, u32 size);
15
+int pcie_dw_wired_dma_tobus_block(struct dma_trx_obj *obj, u32 chn, u64 bus_paddr, u64 local_paddr, u32 size);
1016 #else
11
-static inline struct dma_trx_obj *pcie_dw_dmatest_register(struct dw_pcie *pci, bool irq_en)
17
+static inline struct dma_trx_obj *pcie_dw_dmatest_register(struct device *dev, bool irq_en)
1218 {
1319 return NULL;
1420 }
21
+
22
+static inline void pcie_dw_dmatest_unregister(struct dma_trx_obj *obj) { }
23
+
24
+static inline int pcie_dw_wired_dma_frombus_block(struct dma_trx_obj *obj, u32 chn, u64 local_paddr, u64 bus_paddr, u32 size)
25
+{
26
+ return -1;
27
+}
28
+
29
+static inline int pcie_dw_wired_dma_tobus_block(struct dma_trx_obj *obj, u32 chn, u64 bus_paddr, u64 local_paddr, u32 size)
30
+{
31
+ return -1;
32
+}
1533 #endif
1634
1735 #endif