qcacmn: Init changes for qcn9224

Add qcn9224 target type in init path

Change-Id: If395ba24d55b32d9aa31af78143a62c5dbc065a8
CRs-Fixed: 2916380
This commit is contained in:
Kiran Venkatappa
2021-03-20 00:35:24 +05:30
committed by snandini
parent 091a294bb3
commit ed3db92994
7 changed files with 42 additions and 4 deletions

View File

@@ -70,6 +70,7 @@ typedef void *hif_handle_t;
#define HIF_TYPE_QCA5018 24
#define HIF_TYPE_QCN6122 25
#define HIF_TYPE_WCN7850 26
#define HIF_TYPE_QCN9224 27
#define DMA_COHERENT_MASK_DEFAULT 37
@@ -120,7 +121,11 @@ enum hif_ic_irq {
};
struct CE_state;
#ifdef QCA_WIFI_QCN9224
#define CE_COUNT_MAX 16
#else
#define CE_COUNT_MAX 12
#endif
#define HIF_MAX_GRP_IRQ 16
#ifndef HIF_MAX_GROUP

View File

@@ -75,6 +75,10 @@ extern "C" {
#define TARGET_TYPE_WCN7850 31
#endif
#ifndef TARGET_TYPE_QCN9224
#define TARGET_TYPE_QCN9224 32
#endif
#ifdef __cplusplus
}
#endif

View File

@@ -105,6 +105,7 @@ static ssize_t ath_procfs_diag_read_legacy(struct file *file,
(tgt_info->target_type == TARGET_TYPE_QCA8074) ||
(tgt_info->target_type == TARGET_TYPE_QCA8074V2) ||
(tgt_info->target_type == TARGET_TYPE_QCN9000) ||
(tgt_info->target_type == TARGET_TYPE_QCN9224) ||
(tgt_info->target_type == TARGET_TYPE_QCN6122) ||
(tgt_info->target_type == TARGET_TYPE_QCA5018) ||
(tgt_info->target_type == TARGET_TYPE_QCA6018) ||
@@ -185,6 +186,7 @@ static ssize_t ath_procfs_diag_write_legacy(struct file *file,
(tgt_info->target_type == TARGET_TYPE_QCA8074) ||
(tgt_info->target_type == TARGET_TYPE_QCA8074V2) ||
(tgt_info->target_type == TARGET_TYPE_QCN9000) ||
(tgt_info->target_type == TARGET_TYPE_QCN9224) ||
(tgt_info->target_type == TARGET_TYPE_QCN6122) ||
(tgt_info->target_type == TARGET_TYPE_QCA5018) ||
(tgt_info->target_type == TARGET_TYPE_QCA6018) ||

View File

@@ -31,7 +31,8 @@
*/
#define MAX_UNWINDOWED_ADDRESS 0x80000
#if defined(QCA_WIFI_QCA6390) || defined(QCA_WIFI_QCA6490) || \
defined(QCA_WIFI_QCN9000) || defined(QCA_WIFI_QCA6750)
defined(QCA_WIFI_QCN9000) || defined(QCA_WIFI_QCA6750) || \
defined(QCA_WIFI_QCN9224)
#define WINDOW_ENABLE_BIT 0x40000000
#else
#define WINDOW_ENABLE_BIT 0x80000000

View File

@@ -1007,7 +1007,7 @@ static inline int hif_get_num_active_grp_tasklets(struct hif_softc *scn)
defined(QCA_WIFI_QCA6290) || defined(QCA_WIFI_QCA6390) || \
defined(QCA_WIFI_QCN9000) || defined(QCA_WIFI_QCA6490) || \
defined(QCA_WIFI_QCA6750) || defined(QCA_WIFI_QCA5018) || \
defined(QCA_WIFI_WCN7850))
defined(QCA_WIFI_WCN7850) || defined(QCA_WIFI_QCN9224))
/**
* hif_get_num_pending_work() - get the number of entries in
* the workqueue pending to be completed.
@@ -1052,7 +1052,7 @@ QDF_STATUS hif_try_complete_tasks(struct hif_softc *scn)
defined(QCA_WIFI_QCA6290) || defined(QCA_WIFI_QCA6390) || \
defined(QCA_WIFI_QCN9000) || defined(QCA_WIFI_QCA6490) || \
defined(QCA_WIFI_QCA6750) || defined(QCA_WIFI_QCA5018) || \
defined(QCA_WIFI_WCN7850))
defined(QCA_WIFI_WCN7850) || defined(QCA_WIFI_QCN9224))
static QDF_STATUS hif_hal_attach(struct hif_softc *scn)
{
if (ce_srng_based(scn)) {
@@ -1426,6 +1426,12 @@ int hif_get_device_type(uint32_t device_id,
hif_info(" *********** QCN9000 *************");
break;
case QCN9224_DEVICE_ID:
*hif_type = HIF_TYPE_QCN9224;
*target_type = TARGET_TYPE_QCN9224;
hif_info(" *********** QCN9224 *************");
break;
case QCN6122_DEVICE_ID:
*hif_type = HIF_TYPE_QCN6122;
*target_type = TARGET_TYPE_QCN6122;

View File

@@ -89,6 +89,7 @@
#define QCA6290_EMULATION_DEVICE_ID (0xabcd)
#define QCA6290_DEVICE_ID (0x1100)
#define QCN9000_DEVICE_ID (0x1104)
#define QCN9224_DEVICE_ID (0x1109)
#define QCN6122_DEVICE_ID (0xFFFB)
#define QCA6390_EMULATION_DEVICE_ID (0x0108)
#define QCA6390_DEVICE_ID (0x1101)

View File

@@ -72,7 +72,11 @@
*/
#define CPU_WARM_RESET_WAR
#define WLAN_CFG_MAX_PCIE_GROUPS 2
#ifdef QCA_WIFI_QCN9224
#define WLAN_CFG_MAX_CE_COUNT 16
#else
#define WLAN_CFG_MAX_CE_COUNT 12
#endif
const char *dp_irqname[WLAN_CFG_MAX_PCIE_GROUPS][WLAN_CFG_INT_NUM_CONTEXTS] = {
{
@@ -121,6 +125,12 @@ const char *ce_irqname[WLAN_CFG_MAX_PCIE_GROUPS][WLAN_CFG_MAX_CE_COUNT] = {
"pci0_wlan_ce_9",
"pci0_wlan_ce_10",
"pci0_wlan_ce_11",
#ifdef QCA_WIFI_QCN9224
"pci0_wlan_ce_12",
"pci0_wlan_ce_13",
"pci0_wlan_ce_14",
"pci0_wlan_ce_15",
#endif
},
{
"pci1_wlan_ce_0",
@@ -135,6 +145,12 @@ const char *ce_irqname[WLAN_CFG_MAX_PCIE_GROUPS][WLAN_CFG_MAX_CE_COUNT] = {
"pci1_wlan_ce_9",
"pci1_wlan_ce_10",
"pci1_wlan_ce_11",
#ifdef QCA_WIFI_QCN9224
"pci0_wlan_ce_12",
"pci0_wlan_ce_13",
"pci0_wlan_ce_14",
"pci0_wlan_ce_15",
#endif
}
};
@@ -160,6 +176,7 @@ static inline int hif_get_pci_slot(struct hif_softc *scn)
switch (target_type) {
case TARGET_TYPE_QCN9000:
case TARGET_TYPE_QCN9224:
/* of_node stored in qdf_dev points to the mhi node */
mhi_node = scn->qdf_dev->dev->of_node;
/*
@@ -3375,6 +3392,7 @@ static bool hif_is_pld_based_target(struct hif_pci_softc *sc,
switch (device_id) {
case QCA6290_DEVICE_ID:
case QCN9000_DEVICE_ID:
case QCN9224_DEVICE_ID:
case QCA6290_EMULATION_DEVICE_ID:
case QCA6390_DEVICE_ID:
case QCA6490_DEVICE_ID:
@@ -3505,7 +3523,8 @@ again:
/*
* Disable unlzay interrupt registration for QCN9000
*/
if (target_type == TARGET_TYPE_QCN9000)
if (target_type == TARGET_TYPE_QCN9000 ||
target_type == TARGET_TYPE_QCN9224)
ol_sc->irq_unlazy_disable = 1;
if (ce_srng_based(ol_sc)) {