blob: 3829e337b2814c252ecfc4200c85f1f7f3ff582a [file] [log] [blame]
Kalle Valo5e3dd152013-06-12 20:52:10 +03001/*
2 * Copyright (c) 2005-2011 Atheros Communications Inc.
3 * Copyright (c) 2011-2013 Qualcomm Atheros, Inc.
4 *
5 * Permission to use, copy, modify, and/or distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
8 *
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 */
17
18#ifndef _CE_H_
19#define _CE_H_
20
21#include "hif.h"
22
Kalle Valo5e3dd152013-06-12 20:52:10 +030023/* Maximum number of Copy Engine's supported */
Vasanthakumar Thiagarajan050af062015-06-18 12:31:04 +053024#define CE_COUNT_MAX 12
Michal Kaziora16942e2014-02-27 18:50:04 +020025#define CE_HTT_H2T_MSG_SRC_NENTRIES 4096
Kalle Valo5e3dd152013-06-12 20:52:10 +030026
27/* Descriptor rings must be aligned to this boundary */
28#define CE_DESC_RING_ALIGN 8
Kalle Valo5e3dd152013-06-12 20:52:10 +030029#define CE_SEND_FLAG_GATHER 0x00010000
30
31/*
32 * Copy Engine support: low-level Target-side Copy Engine API.
33 * This is a hardware access layer used by code that understands
34 * how to use copy engines.
35 */
36
Michal Kazior2aa39112013-08-27 13:08:02 +020037struct ath10k_ce_pipe;
Kalle Valo5e3dd152013-06-12 20:52:10 +030038
Kalle Valo5e3dd152013-06-12 20:52:10 +030039#define CE_DESC_FLAGS_GATHER (1 << 0)
40#define CE_DESC_FLAGS_BYTE_SWAP (1 << 1)
Vasanthakumar Thiagarajan2adf99c2015-06-18 12:31:07 +053041
42/* Following desc flags are used in QCA99X0 */
43#define CE_DESC_FLAGS_HOST_INT_DIS (1 << 2)
44#define CE_DESC_FLAGS_TGT_INT_DIS (1 << 3)
45
46#define CE_DESC_FLAGS_META_DATA_MASK ar->hw_values->ce_desc_meta_data_mask
47#define CE_DESC_FLAGS_META_DATA_LSB ar->hw_values->ce_desc_meta_data_lsb
Kalle Valo5e3dd152013-06-12 20:52:10 +030048
49struct ce_desc {
50 __le32 addr;
51 __le16 nbytes;
52 __le16 flags; /* %CE_DESC_FLAGS_ */
53};
54
Michal Kaziord21fb952013-08-27 13:08:03 +020055struct ath10k_ce_ring {
Kalle Valo5e3dd152013-06-12 20:52:10 +030056 /* Number of entries in this ring; must be power of 2 */
57 unsigned int nentries;
58 unsigned int nentries_mask;
59
60 /*
61 * For dest ring, this is the next index to be processed
62 * by software after it was/is received into.
63 *
64 * For src ring, this is the last descriptor that was sent
65 * and completion processed by software.
66 *
67 * Regardless of src or dest ring, this is an invariant
68 * (modulo ring size):
69 * write index >= read index >= sw_index
70 */
71 unsigned int sw_index;
72 /* cached copy */
73 unsigned int write_index;
74 /*
75 * For src ring, this is the next index not yet processed by HW.
76 * This is a cached copy of the real HW index (read index), used
77 * for avoiding reading the HW index register more often than
78 * necessary.
79 * This extends the invariant:
80 * write index >= read index >= hw_index >= sw_index
81 *
82 * For dest ring, this is currently unused.
83 */
84 /* cached copy */
85 unsigned int hw_index;
86
87 /* Start of DMA-coherent area reserved for descriptors */
88 /* Host address space */
89 void *base_addr_owner_space_unaligned;
90 /* CE address space */
91 u32 base_addr_ce_space_unaligned;
92
93 /*
94 * Actual start of descriptors.
95 * Aligned to descriptor-size boundary.
96 * Points into reserved DMA-coherent area, above.
97 */
98 /* Host address space */
99 void *base_addr_owner_space;
100
101 /* CE address space */
102 u32 base_addr_ce_space;
103 /*
104 * Start of shadow copy of descriptors, within regular memory.
105 * Aligned to descriptor-size boundary.
106 */
107 void *shadow_base_unaligned;
108 struct ce_desc *shadow_base;
109
Michal Kazior25d0dbc2014-03-28 10:02:38 +0200110 /* keep last */
111 void *per_transfer_context[0];
Kalle Valo5e3dd152013-06-12 20:52:10 +0300112};
113
Michal Kazior2aa39112013-08-27 13:08:02 +0200114struct ath10k_ce_pipe {
Kalle Valo5e3dd152013-06-12 20:52:10 +0300115 struct ath10k *ar;
116 unsigned int id;
117
118 unsigned int attr_flags;
119
120 u32 ctrl_addr;
Kalle Valo5e3dd152013-06-12 20:52:10 +0300121
Michal Kazior5440ce22013-09-03 15:09:58 +0200122 void (*send_cb)(struct ath10k_ce_pipe *);
123 void (*recv_cb)(struct ath10k_ce_pipe *);
Kalle Valo5e3dd152013-06-12 20:52:10 +0300124
125 unsigned int src_sz_max;
Michal Kaziord21fb952013-08-27 13:08:03 +0200126 struct ath10k_ce_ring *src_ring;
127 struct ath10k_ce_ring *dest_ring;
Kalle Valo5e3dd152013-06-12 20:52:10 +0300128};
129
Kalle Valo5e3dd152013-06-12 20:52:10 +0300130/* Copy Engine settable attributes */
131struct ce_attr;
132
133/*==================Send====================*/
134
135/* ath10k_ce_send flags */
136#define CE_SEND_FLAG_BYTE_SWAP 1
137
138/*
139 * Queue a source buffer to be sent to an anonymous destination buffer.
140 * ce - which copy engine to use
141 * buffer - address of buffer
142 * nbytes - number of bytes to send
143 * transfer_id - arbitrary ID; reflected to destination
144 * flags - CE_SEND_FLAG_* values
145 * Returns 0 on success; otherwise an error status.
146 *
147 * Note: If no flags are specified, use CE's default data swap mode.
148 *
149 * Implementation note: pushes 1 buffer to Source ring
150 */
Michal Kazior2aa39112013-08-27 13:08:02 +0200151int ath10k_ce_send(struct ath10k_ce_pipe *ce_state,
Kalle Valo5e3dd152013-06-12 20:52:10 +0300152 void *per_transfer_send_context,
153 u32 buffer,
154 unsigned int nbytes,
155 /* 14 bits */
156 unsigned int transfer_id,
157 unsigned int flags);
158
Michal Kazior726346f2014-02-27 18:50:04 +0200159int ath10k_ce_send_nolock(struct ath10k_ce_pipe *ce_state,
160 void *per_transfer_context,
161 u32 buffer,
162 unsigned int nbytes,
163 unsigned int transfer_id,
164 unsigned int flags);
165
Michal Kazior08b8aa02014-05-26 12:02:59 +0200166void __ath10k_ce_send_revert(struct ath10k_ce_pipe *pipe);
167
Michal Kazior3efcb3b2013-10-02 11:03:41 +0200168int ath10k_ce_num_free_src_entries(struct ath10k_ce_pipe *pipe);
Kalle Valo5e3dd152013-06-12 20:52:10 +0300169
170/*==================Recv=======================*/
171
Michal Kazior728f95e2014-08-22 14:33:14 +0200172int __ath10k_ce_rx_num_free_bufs(struct ath10k_ce_pipe *pipe);
173int __ath10k_ce_rx_post_buf(struct ath10k_ce_pipe *pipe, void *ctx, u32 paddr);
174int ath10k_ce_rx_post_buf(struct ath10k_ce_pipe *pipe, void *ctx, u32 paddr);
Kalle Valo5e3dd152013-06-12 20:52:10 +0300175
Kalle Valo5e3dd152013-06-12 20:52:10 +0300176/* recv flags */
177/* Data is byte-swapped */
178#define CE_RECV_FLAG_SWAPPED 1
179
180/*
181 * Supply data for the next completed unprocessed receive descriptor.
182 * Pops buffer from Dest ring.
183 */
Michal Kazior2aa39112013-08-27 13:08:02 +0200184int ath10k_ce_completed_recv_next(struct ath10k_ce_pipe *ce_state,
Kalle Valo5e3dd152013-06-12 20:52:10 +0300185 void **per_transfer_contextp,
186 u32 *bufferp,
187 unsigned int *nbytesp,
188 unsigned int *transfer_idp,
189 unsigned int *flagsp);
190/*
191 * Supply data for the next completed unprocessed send descriptor.
192 * Pops 1 completed send buffer from Source ring.
193 */
Michal Kazior2aa39112013-08-27 13:08:02 +0200194int ath10k_ce_completed_send_next(struct ath10k_ce_pipe *ce_state,
Kalle Valo5b07e072014-09-14 12:50:06 +0300195 void **per_transfer_contextp,
196 u32 *bufferp,
197 unsigned int *nbytesp,
198 unsigned int *transfer_idp);
Kalle Valo5e3dd152013-06-12 20:52:10 +0300199
Kalle Valoeef25402014-09-24 14:16:52 +0300200int ath10k_ce_completed_send_next_nolock(struct ath10k_ce_pipe *ce_state,
201 void **per_transfer_contextp,
202 u32 *bufferp,
203 unsigned int *nbytesp,
204 unsigned int *transfer_idp);
205
Kalle Valo5e3dd152013-06-12 20:52:10 +0300206/*==================CE Engine Initialization=======================*/
207
Michal Kazior25d0dbc2014-03-28 10:02:38 +0200208int ath10k_ce_init_pipe(struct ath10k *ar, unsigned int ce_id,
Michal Kazior84cbf3a2014-10-20 14:14:39 +0200209 const struct ce_attr *attr);
Michal Kazior25d0dbc2014-03-28 10:02:38 +0200210void ath10k_ce_deinit_pipe(struct ath10k *ar, unsigned int ce_id);
211int ath10k_ce_alloc_pipe(struct ath10k *ar, int ce_id,
Michal Kazior84cbf3a2014-10-20 14:14:39 +0200212 const struct ce_attr *attr,
Michal Kazior84cbf3a2014-10-20 14:14:39 +0200213 void (*recv_cb)(struct ath10k_ce_pipe *));
Michal Kazior25d0dbc2014-03-28 10:02:38 +0200214void ath10k_ce_free_pipe(struct ath10k *ar, int ce_id);
Kalle Valo5e3dd152013-06-12 20:52:10 +0300215
216/*==================CE Engine Shutdown=======================*/
217/*
218 * Support clean shutdown by allowing the caller to revoke
219 * receive buffers. Target DMA must be stopped before using
220 * this API.
221 */
Michal Kazior2aa39112013-08-27 13:08:02 +0200222int ath10k_ce_revoke_recv_next(struct ath10k_ce_pipe *ce_state,
Kalle Valo5e3dd152013-06-12 20:52:10 +0300223 void **per_transfer_contextp,
224 u32 *bufferp);
225
Kalle Valoeef25402014-09-24 14:16:52 +0300226int ath10k_ce_completed_recv_next_nolock(struct ath10k_ce_pipe *ce_state,
227 void **per_transfer_contextp,
228 u32 *bufferp,
229 unsigned int *nbytesp,
230 unsigned int *transfer_idp,
231 unsigned int *flagsp);
232
Kalle Valo5e3dd152013-06-12 20:52:10 +0300233/*
234 * Support clean shutdown by allowing the caller to cancel
235 * pending sends. Target DMA must be stopped before using
236 * this API.
237 */
Michal Kazior2aa39112013-08-27 13:08:02 +0200238int ath10k_ce_cancel_send_next(struct ath10k_ce_pipe *ce_state,
Kalle Valo5e3dd152013-06-12 20:52:10 +0300239 void **per_transfer_contextp,
240 u32 *bufferp,
241 unsigned int *nbytesp,
242 unsigned int *transfer_idp);
243
Kalle Valo5e3dd152013-06-12 20:52:10 +0300244/*==================CE Interrupt Handlers====================*/
245void ath10k_ce_per_engine_service_any(struct ath10k *ar);
246void ath10k_ce_per_engine_service(struct ath10k *ar, unsigned int ce_id);
Michal Kazior28642f42013-11-08 08:01:31 +0100247int ath10k_ce_disable_interrupts(struct ath10k *ar);
Michal Kazior145cc122014-08-22 14:23:32 +0200248void ath10k_ce_enable_interrupts(struct ath10k *ar);
Kalle Valo5e3dd152013-06-12 20:52:10 +0300249
250/* ce_attr.flags values */
251/* Use NonSnooping PCIe accesses? */
252#define CE_ATTR_NO_SNOOP 1
253
254/* Byte swap data words */
255#define CE_ATTR_BYTE_SWAP_DATA 2
256
257/* Swizzle descriptors? */
258#define CE_ATTR_SWIZZLE_DESCRIPTORS 4
259
260/* no interrupt on copy completion */
261#define CE_ATTR_DIS_INTR 8
262
263/* Attributes of an instance of a Copy Engine */
264struct ce_attr {
265 /* CE_ATTR_* values */
266 unsigned int flags;
267
Kalle Valo5e3dd152013-06-12 20:52:10 +0300268 /* #entries in source ring - Must be a power of 2 */
269 unsigned int src_nentries;
270
271 /*
272 * Max source send size for this CE.
273 * This is also the minimum size of a destination buffer.
274 */
275 unsigned int src_sz_max;
276
277 /* #entries in destination ring - Must be a power of 2 */
278 unsigned int dest_nentries;
Rajkumar Manoharan0e5b2952015-10-12 18:27:01 +0530279
280 void (*send_cb)(struct ath10k_ce_pipe *);
Kalle Valo5e3dd152013-06-12 20:52:10 +0300281};
282
Kalle Valo5e3dd152013-06-12 20:52:10 +0300283#define SR_BA_ADDRESS 0x0000
284#define SR_SIZE_ADDRESS 0x0004
285#define DR_BA_ADDRESS 0x0008
286#define DR_SIZE_ADDRESS 0x000c
287#define CE_CMD_ADDRESS 0x0018
288
289#define CE_CTRL1_DST_RING_BYTE_SWAP_EN_MSB 17
290#define CE_CTRL1_DST_RING_BYTE_SWAP_EN_LSB 17
291#define CE_CTRL1_DST_RING_BYTE_SWAP_EN_MASK 0x00020000
292#define CE_CTRL1_DST_RING_BYTE_SWAP_EN_SET(x) \
293 (((0 | (x)) << CE_CTRL1_DST_RING_BYTE_SWAP_EN_LSB) & \
294 CE_CTRL1_DST_RING_BYTE_SWAP_EN_MASK)
295
296#define CE_CTRL1_SRC_RING_BYTE_SWAP_EN_MSB 16
297#define CE_CTRL1_SRC_RING_BYTE_SWAP_EN_LSB 16
298#define CE_CTRL1_SRC_RING_BYTE_SWAP_EN_MASK 0x00010000
299#define CE_CTRL1_SRC_RING_BYTE_SWAP_EN_GET(x) \
300 (((x) & CE_CTRL1_SRC_RING_BYTE_SWAP_EN_MASK) >> \
301 CE_CTRL1_SRC_RING_BYTE_SWAP_EN_LSB)
302#define CE_CTRL1_SRC_RING_BYTE_SWAP_EN_SET(x) \
303 (((0 | (x)) << CE_CTRL1_SRC_RING_BYTE_SWAP_EN_LSB) & \
304 CE_CTRL1_SRC_RING_BYTE_SWAP_EN_MASK)
305
306#define CE_CTRL1_DMAX_LENGTH_MSB 15
307#define CE_CTRL1_DMAX_LENGTH_LSB 0
308#define CE_CTRL1_DMAX_LENGTH_MASK 0x0000ffff
309#define CE_CTRL1_DMAX_LENGTH_GET(x) \
310 (((x) & CE_CTRL1_DMAX_LENGTH_MASK) >> CE_CTRL1_DMAX_LENGTH_LSB)
311#define CE_CTRL1_DMAX_LENGTH_SET(x) \
312 (((0 | (x)) << CE_CTRL1_DMAX_LENGTH_LSB) & CE_CTRL1_DMAX_LENGTH_MASK)
313
314#define CE_CTRL1_ADDRESS 0x0010
315#define CE_CTRL1_HW_MASK 0x0007ffff
316#define CE_CTRL1_SW_MASK 0x0007ffff
317#define CE_CTRL1_HW_WRITE_MASK 0x00000000
318#define CE_CTRL1_SW_WRITE_MASK 0x0007ffff
319#define CE_CTRL1_RSTMASK 0xffffffff
320#define CE_CTRL1_RESET 0x00000080
321
322#define CE_CMD_HALT_STATUS_MSB 3
323#define CE_CMD_HALT_STATUS_LSB 3
324#define CE_CMD_HALT_STATUS_MASK 0x00000008
325#define CE_CMD_HALT_STATUS_GET(x) \
326 (((x) & CE_CMD_HALT_STATUS_MASK) >> CE_CMD_HALT_STATUS_LSB)
327#define CE_CMD_HALT_STATUS_SET(x) \
328 (((0 | (x)) << CE_CMD_HALT_STATUS_LSB) & CE_CMD_HALT_STATUS_MASK)
329#define CE_CMD_HALT_STATUS_RESET 0
330#define CE_CMD_HALT_MSB 0
331#define CE_CMD_HALT_MASK 0x00000001
332
333#define HOST_IE_COPY_COMPLETE_MSB 0
334#define HOST_IE_COPY_COMPLETE_LSB 0
335#define HOST_IE_COPY_COMPLETE_MASK 0x00000001
336#define HOST_IE_COPY_COMPLETE_GET(x) \
337 (((x) & HOST_IE_COPY_COMPLETE_MASK) >> HOST_IE_COPY_COMPLETE_LSB)
338#define HOST_IE_COPY_COMPLETE_SET(x) \
339 (((0 | (x)) << HOST_IE_COPY_COMPLETE_LSB) & HOST_IE_COPY_COMPLETE_MASK)
340#define HOST_IE_COPY_COMPLETE_RESET 0
341#define HOST_IE_ADDRESS 0x002c
342
343#define HOST_IS_DST_RING_LOW_WATERMARK_MASK 0x00000010
344#define HOST_IS_DST_RING_HIGH_WATERMARK_MASK 0x00000008
345#define HOST_IS_SRC_RING_LOW_WATERMARK_MASK 0x00000004
346#define HOST_IS_SRC_RING_HIGH_WATERMARK_MASK 0x00000002
347#define HOST_IS_COPY_COMPLETE_MASK 0x00000001
348#define HOST_IS_ADDRESS 0x0030
349
350#define MISC_IE_ADDRESS 0x0034
351
352#define MISC_IS_AXI_ERR_MASK 0x00000400
353
354#define MISC_IS_DST_ADDR_ERR_MASK 0x00000200
355#define MISC_IS_SRC_LEN_ERR_MASK 0x00000100
356#define MISC_IS_DST_MAX_LEN_VIO_MASK 0x00000080
357#define MISC_IS_DST_RING_OVERFLOW_MASK 0x00000040
358#define MISC_IS_SRC_RING_OVERFLOW_MASK 0x00000020
359
360#define MISC_IS_ADDRESS 0x0038
361
362#define SR_WR_INDEX_ADDRESS 0x003c
363
364#define DST_WR_INDEX_ADDRESS 0x0040
365
366#define CURRENT_SRRI_ADDRESS 0x0044
367
368#define CURRENT_DRRI_ADDRESS 0x0048
369
370#define SRC_WATERMARK_LOW_MSB 31
371#define SRC_WATERMARK_LOW_LSB 16
372#define SRC_WATERMARK_LOW_MASK 0xffff0000
373#define SRC_WATERMARK_LOW_GET(x) \
374 (((x) & SRC_WATERMARK_LOW_MASK) >> SRC_WATERMARK_LOW_LSB)
375#define SRC_WATERMARK_LOW_SET(x) \
376 (((0 | (x)) << SRC_WATERMARK_LOW_LSB) & SRC_WATERMARK_LOW_MASK)
377#define SRC_WATERMARK_LOW_RESET 0
378#define SRC_WATERMARK_HIGH_MSB 15
379#define SRC_WATERMARK_HIGH_LSB 0
380#define SRC_WATERMARK_HIGH_MASK 0x0000ffff
381#define SRC_WATERMARK_HIGH_GET(x) \
382 (((x) & SRC_WATERMARK_HIGH_MASK) >> SRC_WATERMARK_HIGH_LSB)
383#define SRC_WATERMARK_HIGH_SET(x) \
384 (((0 | (x)) << SRC_WATERMARK_HIGH_LSB) & SRC_WATERMARK_HIGH_MASK)
385#define SRC_WATERMARK_HIGH_RESET 0
386#define SRC_WATERMARK_ADDRESS 0x004c
387
388#define DST_WATERMARK_LOW_LSB 16
389#define DST_WATERMARK_LOW_MASK 0xffff0000
390#define DST_WATERMARK_LOW_SET(x) \
391 (((0 | (x)) << DST_WATERMARK_LOW_LSB) & DST_WATERMARK_LOW_MASK)
392#define DST_WATERMARK_LOW_RESET 0
393#define DST_WATERMARK_HIGH_MSB 15
394#define DST_WATERMARK_HIGH_LSB 0
395#define DST_WATERMARK_HIGH_MASK 0x0000ffff
396#define DST_WATERMARK_HIGH_GET(x) \
397 (((x) & DST_WATERMARK_HIGH_MASK) >> DST_WATERMARK_HIGH_LSB)
398#define DST_WATERMARK_HIGH_SET(x) \
399 (((0 | (x)) << DST_WATERMARK_HIGH_LSB) & DST_WATERMARK_HIGH_MASK)
400#define DST_WATERMARK_HIGH_RESET 0
401#define DST_WATERMARK_ADDRESS 0x0050
402
Michal Kaziord63955b2015-01-24 12:14:49 +0200403static inline u32 ath10k_ce_base_address(struct ath10k *ar, unsigned int ce_id)
Kalle Valo5e3dd152013-06-12 20:52:10 +0300404{
405 return CE0_BASE_ADDRESS + (CE1_BASE_ADDRESS - CE0_BASE_ADDRESS) * ce_id;
406}
407
408#define CE_WATERMARK_MASK (HOST_IS_SRC_RING_LOW_WATERMARK_MASK | \
409 HOST_IS_SRC_RING_HIGH_WATERMARK_MASK | \
410 HOST_IS_DST_RING_LOW_WATERMARK_MASK | \
411 HOST_IS_DST_RING_HIGH_WATERMARK_MASK)
412
413#define CE_ERROR_MASK (MISC_IS_AXI_ERR_MASK | \
414 MISC_IS_DST_ADDR_ERR_MASK | \
415 MISC_IS_SRC_LEN_ERR_MASK | \
416 MISC_IS_DST_MAX_LEN_VIO_MASK | \
417 MISC_IS_DST_RING_OVERFLOW_MASK | \
418 MISC_IS_SRC_RING_OVERFLOW_MASK)
419
420#define CE_SRC_RING_TO_DESC(baddr, idx) \
421 (&(((struct ce_desc *)baddr)[idx]))
422
423#define CE_DEST_RING_TO_DESC(baddr, idx) \
424 (&(((struct ce_desc *)baddr)[idx]))
425
426/* Ring arithmetic (modulus number of entries in ring, which is a pwr of 2). */
427#define CE_RING_DELTA(nentries_mask, fromidx, toidx) \
428 (((int)(toidx)-(int)(fromidx)) & (nentries_mask))
429
430#define CE_RING_IDX_INCR(nentries_mask, idx) (((idx) + 1) & (nentries_mask))
431
Vasanthakumar Thiagarajana521ee92015-06-18 12:31:02 +0530432#define CE_WRAPPER_INTERRUPT_SUMMARY_HOST_MSI_LSB \
433 ar->regs->ce_wrap_intr_sum_host_msi_lsb
434#define CE_WRAPPER_INTERRUPT_SUMMARY_HOST_MSI_MASK \
435 ar->regs->ce_wrap_intr_sum_host_msi_mask
Kalle Valo5e3dd152013-06-12 20:52:10 +0300436#define CE_WRAPPER_INTERRUPT_SUMMARY_HOST_MSI_GET(x) \
437 (((x) & CE_WRAPPER_INTERRUPT_SUMMARY_HOST_MSI_MASK) >> \
438 CE_WRAPPER_INTERRUPT_SUMMARY_HOST_MSI_LSB)
439#define CE_WRAPPER_INTERRUPT_SUMMARY_ADDRESS 0x0000
440
441#define CE_INTERRUPT_SUMMARY(ar) \
442 CE_WRAPPER_INTERRUPT_SUMMARY_HOST_MSI_GET( \
443 ath10k_pci_read32((ar), CE_WRAPPER_BASE_ADDRESS + \
444 CE_WRAPPER_INTERRUPT_SUMMARY_ADDRESS))
445
446#endif /* _CE_H_ */