#include "hif.h"
#include "ce.h"
#include "debug.h"
static inline u32 shadow_sr_wr_ind_addr(struct ath10k *ar,
struct ath10k_ce_pipe *ce_state)
{ … }
static inline unsigned int
ath10k_set_ring_byte(unsigned int offset,
struct ath10k_hw_ce_regs_addr_map *addr_map)
{ … }
static inline u32 ath10k_ce_read32(struct ath10k *ar, u32 offset)
{ … }
static inline void ath10k_ce_write32(struct ath10k *ar, u32 offset, u32 value)
{ … }
static inline void ath10k_ce_dest_ring_write_index_set(struct ath10k *ar,
u32 ce_ctrl_addr,
unsigned int n)
{ … }
static inline u32 ath10k_ce_dest_ring_write_index_get(struct ath10k *ar,
u32 ce_ctrl_addr)
{ … }
static inline void ath10k_ce_src_ring_write_index_set(struct ath10k *ar,
u32 ce_ctrl_addr,
unsigned int n)
{ … }
static inline u32 ath10k_ce_src_ring_write_index_get(struct ath10k *ar,
u32 ce_ctrl_addr)
{ … }
static inline u32 ath10k_ce_src_ring_read_index_from_ddr(struct ath10k *ar,
u32 ce_id)
{ … }
static inline u32 ath10k_ce_src_ring_read_index_get(struct ath10k *ar,
u32 ce_ctrl_addr)
{ … }
static inline void
ath10k_ce_shadow_src_ring_write_index_set(struct ath10k *ar,
struct ath10k_ce_pipe *ce_state,
unsigned int value)
{ … }
static inline void ath10k_ce_src_ring_base_addr_set(struct ath10k *ar,
u32 ce_id,
u64 addr)
{ … }
static void ath10k_ce_set_src_ring_base_addr_hi(struct ath10k *ar,
u32 ce_ctrl_addr,
u64 addr)
{ … }
static inline void ath10k_ce_src_ring_size_set(struct ath10k *ar,
u32 ce_ctrl_addr,
unsigned int n)
{ … }
static inline void ath10k_ce_src_ring_dmax_set(struct ath10k *ar,
u32 ce_ctrl_addr,
unsigned int n)
{ … }
static inline void ath10k_ce_src_ring_byte_swap_set(struct ath10k *ar,
u32 ce_ctrl_addr,
unsigned int n)
{ … }
static inline void ath10k_ce_dest_ring_byte_swap_set(struct ath10k *ar,
u32 ce_ctrl_addr,
unsigned int n)
{ … }
static inline
u32 ath10k_ce_dest_ring_read_index_from_ddr(struct ath10k *ar, u32 ce_id)
{ … }
static inline u32 ath10k_ce_dest_ring_read_index_get(struct ath10k *ar,
u32 ce_ctrl_addr)
{ … }
static inline void ath10k_ce_dest_ring_base_addr_set(struct ath10k *ar,
u32 ce_id,
u64 addr)
{ … }
static void ath10k_ce_set_dest_ring_base_addr_hi(struct ath10k *ar,
u32 ce_ctrl_addr,
u64 addr)
{ … }
static inline void ath10k_ce_dest_ring_size_set(struct ath10k *ar,
u32 ce_ctrl_addr,
unsigned int n)
{ … }
static inline void ath10k_ce_src_ring_highmark_set(struct ath10k *ar,
u32 ce_ctrl_addr,
unsigned int n)
{ … }
static inline void ath10k_ce_src_ring_lowmark_set(struct ath10k *ar,
u32 ce_ctrl_addr,
unsigned int n)
{ … }
static inline void ath10k_ce_dest_ring_highmark_set(struct ath10k *ar,
u32 ce_ctrl_addr,
unsigned int n)
{ … }
static inline void ath10k_ce_dest_ring_lowmark_set(struct ath10k *ar,
u32 ce_ctrl_addr,
unsigned int n)
{ … }
static inline void ath10k_ce_copy_complete_inter_enable(struct ath10k *ar,
u32 ce_ctrl_addr)
{ … }
static inline void ath10k_ce_copy_complete_intr_disable(struct ath10k *ar,
u32 ce_ctrl_addr)
{ … }
static inline void ath10k_ce_watermark_intr_disable(struct ath10k *ar,
u32 ce_ctrl_addr)
{ … }
static inline void ath10k_ce_error_intr_disable(struct ath10k *ar,
u32 ce_ctrl_addr)
{ … }
static inline void ath10k_ce_engine_int_status_clear(struct ath10k *ar,
u32 ce_ctrl_addr,
unsigned int mask)
{ … }
static int _ath10k_ce_send_nolock(struct ath10k_ce_pipe *ce_state,
void *per_transfer_context,
dma_addr_t buffer,
unsigned int nbytes,
unsigned int transfer_id,
unsigned int flags)
{ … }
static int _ath10k_ce_send_nolock_64(struct ath10k_ce_pipe *ce_state,
void *per_transfer_context,
dma_addr_t buffer,
unsigned int nbytes,
unsigned int transfer_id,
unsigned int flags)
{ … }
int ath10k_ce_send_nolock(struct ath10k_ce_pipe *ce_state,
void *per_transfer_context,
dma_addr_t buffer,
unsigned int nbytes,
unsigned int transfer_id,
unsigned int flags)
{ … }
EXPORT_SYMBOL(…);
void __ath10k_ce_send_revert(struct ath10k_ce_pipe *pipe)
{ … }
EXPORT_SYMBOL(…);
int ath10k_ce_send(struct ath10k_ce_pipe *ce_state,
void *per_transfer_context,
dma_addr_t buffer,
unsigned int nbytes,
unsigned int transfer_id,
unsigned int flags)
{ … }
EXPORT_SYMBOL(…);
int ath10k_ce_num_free_src_entries(struct ath10k_ce_pipe *pipe)
{ … }
EXPORT_SYMBOL(…);
int __ath10k_ce_rx_num_free_bufs(struct ath10k_ce_pipe *pipe)
{ … }
EXPORT_SYMBOL(…);
static int __ath10k_ce_rx_post_buf(struct ath10k_ce_pipe *pipe, void *ctx,
dma_addr_t paddr)
{ … }
static int __ath10k_ce_rx_post_buf_64(struct ath10k_ce_pipe *pipe,
void *ctx,
dma_addr_t paddr)
{ … }
void ath10k_ce_rx_update_write_idx(struct ath10k_ce_pipe *pipe, u32 nentries)
{ … }
EXPORT_SYMBOL(…);
int ath10k_ce_rx_post_buf(struct ath10k_ce_pipe *pipe, void *ctx,
dma_addr_t paddr)
{ … }
EXPORT_SYMBOL(…);
static int
_ath10k_ce_completed_recv_next_nolock(struct ath10k_ce_pipe *ce_state,
void **per_transfer_contextp,
unsigned int *nbytesp)
{ … }
static int
_ath10k_ce_completed_recv_next_nolock_64(struct ath10k_ce_pipe *ce_state,
void **per_transfer_contextp,
unsigned int *nbytesp)
{ … }
int ath10k_ce_completed_recv_next_nolock(struct ath10k_ce_pipe *ce_state,
void **per_transfer_ctx,
unsigned int *nbytesp)
{ … }
EXPORT_SYMBOL(…);
int ath10k_ce_completed_recv_next(struct ath10k_ce_pipe *ce_state,
void **per_transfer_contextp,
unsigned int *nbytesp)
{ … }
EXPORT_SYMBOL(…);
static int _ath10k_ce_revoke_recv_next(struct ath10k_ce_pipe *ce_state,
void **per_transfer_contextp,
dma_addr_t *bufferp)
{ … }
static int _ath10k_ce_revoke_recv_next_64(struct ath10k_ce_pipe *ce_state,
void **per_transfer_contextp,
dma_addr_t *bufferp)
{ … }
int ath10k_ce_revoke_recv_next(struct ath10k_ce_pipe *ce_state,
void **per_transfer_contextp,
dma_addr_t *bufferp)
{ … }
EXPORT_SYMBOL(…);
static int _ath10k_ce_completed_send_next_nolock(struct ath10k_ce_pipe *ce_state,
void **per_transfer_contextp)
{ … }
static int _ath10k_ce_completed_send_next_nolock_64(struct ath10k_ce_pipe *ce_state,
void **per_transfer_contextp)
{ … }
int ath10k_ce_completed_send_next_nolock(struct ath10k_ce_pipe *ce_state,
void **per_transfer_contextp)
{ … }
EXPORT_SYMBOL(…);
static void ath10k_ce_extract_desc_data(struct ath10k *ar,
struct ath10k_ce_ring *src_ring,
u32 sw_index,
dma_addr_t *bufferp,
u32 *nbytesp,
u32 *transfer_idp)
{ … }
static void ath10k_ce_extract_desc_data_64(struct ath10k *ar,
struct ath10k_ce_ring *src_ring,
u32 sw_index,
dma_addr_t *bufferp,
u32 *nbytesp,
u32 *transfer_idp)
{ … }
int ath10k_ce_cancel_send_next(struct ath10k_ce_pipe *ce_state,
void **per_transfer_contextp,
dma_addr_t *bufferp,
unsigned int *nbytesp,
unsigned int *transfer_idp)
{ … }
EXPORT_SYMBOL(…);
int ath10k_ce_completed_send_next(struct ath10k_ce_pipe *ce_state,
void **per_transfer_contextp)
{ … }
EXPORT_SYMBOL(…);
void ath10k_ce_per_engine_service(struct ath10k *ar, unsigned int ce_id)
{ … }
EXPORT_SYMBOL(…);
void ath10k_ce_per_engine_service_any(struct ath10k *ar)
{ … }
EXPORT_SYMBOL(…);
static void ath10k_ce_per_engine_handler_adjust(struct ath10k_ce_pipe *ce_state)
{ … }
void ath10k_ce_disable_interrupt(struct ath10k *ar, int ce_id)
{ … }
EXPORT_SYMBOL(…);
void ath10k_ce_disable_interrupts(struct ath10k *ar)
{ … }
EXPORT_SYMBOL(…);
void ath10k_ce_enable_interrupt(struct ath10k *ar, int ce_id)
{ … }
EXPORT_SYMBOL(…);
void ath10k_ce_enable_interrupts(struct ath10k *ar)
{ … }
EXPORT_SYMBOL(…);
static int ath10k_ce_init_src_ring(struct ath10k *ar,
unsigned int ce_id,
const struct ce_attr *attr)
{ … }
static int ath10k_ce_init_dest_ring(struct ath10k *ar,
unsigned int ce_id,
const struct ce_attr *attr)
{ … }
static int ath10k_ce_alloc_shadow_base(struct ath10k *ar,
struct ath10k_ce_ring *src_ring,
u32 nentries)
{ … }
static struct ath10k_ce_ring *
ath10k_ce_alloc_src_ring(struct ath10k *ar, unsigned int ce_id,
const struct ce_attr *attr)
{ … }
static struct ath10k_ce_ring *
ath10k_ce_alloc_src_ring_64(struct ath10k *ar, unsigned int ce_id,
const struct ce_attr *attr)
{ … }
static struct ath10k_ce_ring *
ath10k_ce_alloc_dest_ring(struct ath10k *ar, unsigned int ce_id,
const struct ce_attr *attr)
{ … }
static struct ath10k_ce_ring *
ath10k_ce_alloc_dest_ring_64(struct ath10k *ar, unsigned int ce_id,
const struct ce_attr *attr)
{ … }
int ath10k_ce_init_pipe(struct ath10k *ar, unsigned int ce_id,
const struct ce_attr *attr)
{ … }
EXPORT_SYMBOL(…);
static void ath10k_ce_deinit_src_ring(struct ath10k *ar, unsigned int ce_id)
{ … }
static void ath10k_ce_deinit_dest_ring(struct ath10k *ar, unsigned int ce_id)
{ … }
void ath10k_ce_deinit_pipe(struct ath10k *ar, unsigned int ce_id)
{ … }
EXPORT_SYMBOL(…);
static void _ath10k_ce_free_pipe(struct ath10k *ar, int ce_id)
{ … }
static void _ath10k_ce_free_pipe_64(struct ath10k *ar, int ce_id)
{ … }
void ath10k_ce_free_pipe(struct ath10k *ar, int ce_id)
{ … }
EXPORT_SYMBOL(…);
void ath10k_ce_dump_registers(struct ath10k *ar,
struct ath10k_fw_crash_data *crash_data)
{ … }
EXPORT_SYMBOL(…);
static const struct ath10k_ce_ops ce_ops = …;
static const struct ath10k_ce_ops ce_64_ops = …;
static void ath10k_ce_set_ops(struct ath10k *ar,
struct ath10k_ce_pipe *ce_state)
{ … }
int ath10k_ce_alloc_pipe(struct ath10k *ar, int ce_id,
const struct ce_attr *attr)
{ … }
EXPORT_SYMBOL(…);
void ath10k_ce_alloc_rri(struct ath10k *ar)
{ … }
EXPORT_SYMBOL(…);
void ath10k_ce_free_rri(struct ath10k *ar)
{ … }
EXPORT_SYMBOL(…);