0001
0002
0003
0004
0005
0006
0007 #ifndef _ATH11K_PCI_CMN_H
0008 #define _ATH11K_PCI_CMN_H
0009
0010 #include "core.h"
0011
0012 #define ATH11K_PCI_IRQ_CE0_OFFSET 3
0013 #define ATH11K_PCI_IRQ_DP_OFFSET 14
0014
0015 #define ATH11K_PCI_WINDOW_ENABLE_BIT 0x40000000
0016 #define ATH11K_PCI_WINDOW_REG_ADDRESS 0x310c
0017 #define ATH11K_PCI_WINDOW_VALUE_MASK GENMASK(24, 19)
0018 #define ATH11K_PCI_WINDOW_START 0x80000
0019 #define ATH11K_PCI_WINDOW_RANGE_MASK GENMASK(18, 0)
0020
0021
0022
0023
0024
0025 #define ATH11K_PCI_ACCESS_ALWAYS_OFF 0xFE0
0026
0027 int ath11k_pcic_get_user_msi_assignment(struct ath11k_base *ab, char *user_name,
0028 int *num_vectors, u32 *user_base_data,
0029 u32 *base_vector);
0030 void ath11k_pcic_write32(struct ath11k_base *ab, u32 offset, u32 value);
0031 u32 ath11k_pcic_read32(struct ath11k_base *ab, u32 offset);
0032 void ath11k_pcic_get_msi_address(struct ath11k_base *ab, u32 *msi_addr_lo,
0033 u32 *msi_addr_hi);
0034 void ath11k_pcic_get_ce_msi_idx(struct ath11k_base *ab, u32 ce_id, u32 *msi_idx);
0035 void ath11k_pcic_free_irq(struct ath11k_base *ab);
0036 int ath11k_pcic_config_irq(struct ath11k_base *ab);
0037 void ath11k_pcic_ext_irq_enable(struct ath11k_base *ab);
0038 void ath11k_pcic_ext_irq_disable(struct ath11k_base *ab);
0039 void ath11k_pcic_stop(struct ath11k_base *ab);
0040 int ath11k_pcic_start(struct ath11k_base *ab);
0041 int ath11k_pcic_map_service_to_pipe(struct ath11k_base *ab, u16 service_id,
0042 u8 *ul_pipe, u8 *dl_pipe);
0043 void ath11k_pcic_ce_irqs_enable(struct ath11k_base *ab);
0044 void ath11k_pcic_ce_irq_disable_sync(struct ath11k_base *ab);
0045 int ath11k_pcic_init_msi_config(struct ath11k_base *ab);
0046 int ath11k_pcic_register_pci_ops(struct ath11k_base *ab,
0047 const struct ath11k_pci_ops *pci_ops);
0048 #endif