This source file includes following definitions.
- adf_bank_debugfs_add
- adf_ring_debugfs_add
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47 #ifndef ADF_TRANSPORT_INTRN_H
48 #define ADF_TRANSPORT_INTRN_H
49
50 #include <linux/interrupt.h>
51 #include <linux/spinlock_types.h>
52 #include "adf_transport.h"
53
54 struct adf_etr_ring_debug_entry {
55 char ring_name[ADF_CFG_MAX_KEY_LEN_IN_BYTES];
56 struct dentry *debug;
57 };
58
59 struct adf_etr_ring_data {
60 void *base_addr;
61 atomic_t *inflights;
62 spinlock_t lock;
63 adf_callback_fn callback;
64 struct adf_etr_bank_data *bank;
65 dma_addr_t dma_addr;
66 uint16_t head;
67 uint16_t tail;
68 uint8_t ring_number;
69 uint8_t ring_size;
70 uint8_t msg_size;
71 uint8_t reserved;
72 struct adf_etr_ring_debug_entry *ring_debug;
73 } __packed;
74
75 struct adf_etr_bank_data {
76 struct adf_etr_ring_data rings[ADF_ETR_MAX_RINGS_PER_BANK];
77 struct tasklet_struct resp_handler;
78 void __iomem *csr_addr;
79 struct adf_accel_dev *accel_dev;
80 uint32_t irq_coalesc_timer;
81 uint16_t ring_mask;
82 uint16_t irq_mask;
83 spinlock_t lock;
84 struct dentry *bank_debug_dir;
85 struct dentry *bank_debug_cfg;
86 uint32_t bank_number;
87 } __packed;
88
89 struct adf_etr_data {
90 struct adf_etr_bank_data *banks;
91 struct dentry *debug;
92 };
93
94 void adf_response_handler(uintptr_t bank_addr);
95 #ifdef CONFIG_DEBUG_FS
96 #include <linux/debugfs.h>
97 int adf_bank_debugfs_add(struct adf_etr_bank_data *bank);
98 void adf_bank_debugfs_rm(struct adf_etr_bank_data *bank);
99 int adf_ring_debugfs_add(struct adf_etr_ring_data *ring, const char *name);
100 void adf_ring_debugfs_rm(struct adf_etr_ring_data *ring);
101 #else
102 static inline int adf_bank_debugfs_add(struct adf_etr_bank_data *bank)
103 {
104 return 0;
105 }
106
107 #define adf_bank_debugfs_rm(bank) do {} while (0)
108
109 static inline int adf_ring_debugfs_add(struct adf_etr_ring_data *ring,
110 const char *name)
111 {
112 return 0;
113 }
114
115 #define adf_ring_debugfs_rm(ring) do {} while (0)
116 #endif
117 #endif