aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath11k/core.h
diff options
context:
space:
mode:
authorManikanta Pubbisetty <quic_mpubbise@quicinc.com>2022-04-01 14:53:08 +0300
committerKalle Valo <quic_kvalo@quicinc.com>2022-04-05 11:06:30 +0300
commit5b32b6dd966338005671780c1df02327582c4be4 (patch)
tree6c938ef6faa9edb4c62142c1dca7a2dfa2f372f3 /drivers/net/wireless/ath/ath11k/core.h
parentath11k: Refactor MSI logic to support WCN6750 (diff)
downloadlinux-5b32b6dd966338005671780c1df02327582c4be4.tar.xz
linux-5b32b6dd966338005671780c1df02327582c4be4.zip
ath11k: Remove core PCI references from PCI common code
Remove core PCI and ath11k PCI references(struct ath11k_pci) from PCI common code. Since, PCI common code will be used by hybrid bus devices, this code should be independent from ATH11K PCI references and Linux core PCI references like struct pci_dev. Since this change introduces function callbacks for bus wakeup and bus release operations, wakeup_mhi HW param is no longer needed and hence it is removed completely. Alternatively, bus wakeup/release ops for QCA9074 are initialized to NULL as QCA9704 does not need bus wakeup/release for register accesses. Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1 Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.5.0.1-01100-QCAHKSWPL_SILICONZ-1 Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.4.0.1-00192-QCAHKSWPL_SILICONZ-1 Signed-off-by: Manikanta Pubbisetty <quic_mpubbise@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://lore.kernel.org/r/20220328055714.6449-6-quic_mpubbise@quicinc.com
Diffstat (limited to 'drivers/net/wireless/ath/ath11k/core.h')
-rw-r--r--drivers/net/wireless/ath/ath11k/core.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath11k/core.h b/drivers/net/wireless/ath/ath11k/core.h
index 4e0861a94a14..fa299bfb4efc 100644
--- a/drivers/net/wireless/ath/ath11k/core.h
+++ b/drivers/net/wireless/ath/ath11k/core.h
@@ -239,6 +239,8 @@ enum ath11k_dev_flags {
ATH11K_FLAG_CE_IRQ_ENABLED,
ATH11K_FLAG_EXT_IRQ_ENABLED,
ATH11K_FLAG_FIXED_MEM_RGN,
+ ATH11K_FLAG_DEVICE_INIT_DONE,
+ ATH11K_FLAG_MULTI_MSI_VECTORS,
};
enum ath11k_monitor_flags {
@@ -728,6 +730,14 @@ struct ath11k_bus_params {
bool static_window_map;
};
+struct ath11k_pci_ops {
+ int (*wakeup)(struct ath11k_base *ab);
+ void (*release)(struct ath11k_base *ab);
+ int (*get_msi_irq)(struct ath11k_base *ab, unsigned int vector);
+ void (*window_write32)(struct ath11k_base *ab, u32 offset, u32 value);
+ u32 (*window_read32)(struct ath11k_base *ab, u32 offset);
+};
+
/* IPQ8074 HW channel counters frequency value in hertz */
#define IPQ8074_CC_FREQ_HERTZ 320000
@@ -925,6 +935,8 @@ struct ath11k_base {
u32 addr_lo;
u32 addr_hi;
} msi;
+
+ const struct ath11k_pci_ops *ops;
} pci;
/* must be last */