qcacmn: Fix epping mode for QCN7605

Epping mode is currently borken in qcacld-3.2 codebase.
Fix epping mode for QCN7605 for USB and PCIe interface.

Change-Id: I5ae5ff70b77836cdd6c3d002cf98d4949838b624
CRs-Fixed: 2400180
This commit is contained in:
Nirav Shah
2018-07-20 12:00:34 +05:30
committed by nshrivas
parent d1a2dfcdda
commit 3e6e04bc0c
6 changed files with 162 additions and 107 deletions

View File

@@ -231,6 +231,50 @@ static struct CE_attr host_ce_config_wlan_epping_poll[] = {
{ /* CE7 */ CE_ATTR_DIAG_FLAGS, 0, 2, DIAG_TRANSFER_LIMIT, 2, NULL,},
};
#ifdef QCN7605_SUPPORT
static struct CE_attr host_ce_config_wlan_epping_irq[] = {
/* host->target HTC control and raw streams */
{ /* CE0 */ CE_ATTR_FLAGS, 0, 16, 2048, 0, NULL,},
/* target->host EP-ping */
{ /* CE1 */ CE_ATTR_FLAGS, 0, 0, 2048, 32, NULL,},
/* target->host EP-ping */
{ /* CE2 */ CE_ATTR_FLAGS, 0, 0, 2048, 32, NULL,},
/* host->target EP-ping */
{ /* CE3 */ CE_ATTR_FLAGS, 0, 32, 2048, 0, NULL,},
/* host->target EP-ping */
{ /* CE4 */ CE_ATTR_FLAGS, 0, 32, 2048, 0, NULL,},
/* EP-ping heartbeat */
{ /* CE5 */ CE_ATTR_FLAGS, 0, 0, 2048, 16, NULL,},
/* unused */
{ /* CE6 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
/* ce_diag, the Diagnostic Window */
{ /* CE7 */ CE_ATTR_DIAG_FLAGS, 0, 2, DIAG_TRANSFER_LIMIT, 2, NULL,},
};
/*
* EP-ping firmware's CE configuration
*/
static struct CE_pipe_config target_ce_config_wlan_epping[] = {
/* host->target HTC control and raw streams */
{ /* CE0 */ 0, PIPEDIR_OUT, 16, 2048, CE_ATTR_FLAGS, 0,},
/* target->host EP-ping */
{ /* CE1 */ 1, PIPEDIR_IN, 32, 2048, CE_ATTR_FLAGS, 0,},
/* target->host EP-ping */
{ /* CE2 */ 2, PIPEDIR_IN, 32, 2048, CE_ATTR_FLAGS, 0,},
/* host->target EP-ping */
{ /* CE3 */ 3, PIPEDIR_OUT, 32, 2048, CE_ATTR_FLAGS, 0,},
/* host->target EP-ping */
{ /* CE4 */ 4, PIPEDIR_OUT, 32, 2048, CE_ATTR_FLAGS, 0,},
/* EP-ping heartbeat */
{ /* CE5 */ 5, PIPEDIR_IN, 16, 2048, CE_ATTR_FLAGS, 0,},
/* unused */
{ /* CE6 */ 6, PIPEDIR_INOUT, 0, 0, CE_ATTR_FLAGS, 0,},
/* CE7 used only by Host */
{ /* CE7 */ 7, PIPEDIR_INOUT_H2H, 0, 0, 0, 0,},
/* CE8 used only by IPA */
{ /* CE8 */ 8, PIPEDIR_IN, 4, 2048, CE_ATTR_FLAGS, 0,}
};
#else
static struct CE_attr host_ce_config_wlan_epping_irq[] = {
/* host->target HTC control and raw streams */
{ /* CE0 */ CE_ATTR_FLAGS, 0, 16, 2048, 0, NULL,},
@@ -273,6 +317,7 @@ static struct CE_pipe_config target_ce_config_wlan_epping[] = {
{ /* CE8 */ 8, PIPEDIR_IN, 32, 2048, CE_ATTR_FLAGS, 0,}
};
#endif
#endif
#else
static struct CE_attr host_ce_config_wlan[] = {
/* host->target HTC control and raw streams */

View File

@@ -2669,46 +2669,15 @@ void hif_ce_stop(struct hif_softc *scn)
hif_state->started = false;
}
#ifdef QCN7605_SUPPORT
static inline
void hif_get_shadow_reg_cfg_qcn7605(struct shadow_reg_cfg
**target_shadow_reg_cfg_ret,
uint32_t *shadow_cfg_sz_ret)
{
if (target_shadow_reg_cfg_ret)
*target_shadow_reg_cfg_ret = target_shadow_reg_cfg_map_qcn7605;
if (shadow_cfg_sz_ret)
*shadow_cfg_sz_ret = sizeof(target_shadow_reg_cfg_map_qcn7605);
}
#else
static inline
void hif_get_shadow_reg_cfg_qcn7605(struct shadow_reg_cfg
**target_shadow_reg_cfg_ret,
uint32_t *shadow_cfg_sz_ret)
{
HIF_ERROR("QCN7605 not supported");
}
#endif
static void hif_get_shadow_reg_cfg(struct hif_softc *scn,
struct shadow_reg_cfg
**target_shadow_reg_cfg_ret,
uint32_t *shadow_cfg_sz_ret)
{
struct hif_opaque_softc *hif_hdl = GET_HIF_OPAQUE_HDL(scn);
struct hif_target_info *tgt_info = hif_get_target_info_handle(hif_hdl);
switch (tgt_info->target_type) {
case TARGET_TYPE_QCN7605:
hif_get_shadow_reg_cfg_qcn7605(target_shadow_reg_cfg_ret,
shadow_cfg_sz_ret);
break;
default:
if (target_shadow_reg_cfg_ret)
*target_shadow_reg_cfg_ret = target_shadow_reg_cfg;
if (shadow_cfg_sz_ret)
*shadow_cfg_sz_ret = shadow_cfg_sz;
}
if (target_shadow_reg_cfg_ret)
*target_shadow_reg_cfg_ret = target_shadow_reg_cfg;
if (shadow_cfg_sz_ret)
*shadow_cfg_sz_ret = shadow_cfg_sz;
}
/**
@@ -3011,6 +2980,8 @@ void hif_set_ce_config_qcn7605(struct hif_softc *scn,
hif_state->target_ce_config = target_ce_config_wlan_qcn7605;
hif_state->target_ce_config_sz =
sizeof(target_ce_config_wlan_qcn7605);
target_shadow_reg_cfg = target_shadow_reg_cfg_map_qcn7605;
shadow_cfg_sz = sizeof(target_shadow_reg_cfg_map_qcn7605);
scn->ce_count = QCN7605_CE_COUNT;
}
#else
@@ -3061,6 +3032,7 @@ void hif_ce_prepare_config(struct hif_softc *scn)
/* if epping is enabled we need to use the epping configuration. */
if (QDF_IS_EPPING_ENABLED(mode)) {
hif_ce_prepare_epping_config(hif_state);
return;
}
switch (tgt_info->target_type) {