qcacmn: Add support to populate and send UMAC reset setup command

UMAC reset prerequisite setup command contains the following information.
- Interrupt number to be used for raising the UMAC reset interrupt
- Address of the shared memory
This is an HTT command. Send this command as part of the UMAC reset
initialization sequence.

Change-Id: I7a08f48b420580b5e3dbb9b46f6605d986f8fd89
CRs-Fixed: 3244930
This commit is contained in:
Shiva Krishna Pittala
2022-07-15 15:37:51 +05:30
committed by Madan Koyyalamudi
父節點 12964fb1de
當前提交 68c2b67520
共有 3 個文件被更改,包括 164 次插入1 次删除

查看文件

@@ -16,6 +16,7 @@
#include <dp_types.h>
#include <wlan_cfg.h>
#include <hif.h>
#include <dp_htt.h>
/**
* dp_get_umac_reset_intr_ctx() - Get the interrupt context to be used by
@@ -47,6 +48,38 @@ static QDF_STATUS dp_get_umac_reset_intr_ctx(struct dp_soc *soc, int *intr_ctx)
return QDF_STATUS_E_FAILURE;
}
/**
* dp_umac_reset_send_setup_cmd(): Send the UMAC reset setup command
* @soc: dp soc object
*
* Return: QDF_STATUS of operation
*/
static QDF_STATUS
dp_umac_reset_send_setup_cmd(struct dp_soc *soc)
{
struct dp_soc_umac_reset_ctx *umac_reset_ctx;
int msi_vector_count, ret;
uint32_t msi_base_data, msi_vector_start;
struct dp_htt_umac_reset_setup_cmd_params params;
umac_reset_ctx = &soc->umac_reset_ctx;
ret = pld_get_user_msi_assignment(soc->osdev->dev, "DP",
&msi_vector_count, &msi_base_data,
&msi_vector_start);
if (ret)
return QDF_STATUS_E_FAILURE;
qdf_mem_zero(&params, sizeof(params));
params.msi_data = (umac_reset_ctx->intr_offset % msi_vector_count) +
msi_base_data;
params.shmem_addr_low =
qdf_get_lower_32_bits(umac_reset_ctx->shmem_paddr_aligned);
params.shmem_addr_high =
qdf_get_upper_32_bits(umac_reset_ctx->shmem_paddr_aligned);
return dp_htt_umac_reset_send_setup_cmd(soc, &params);
}
QDF_STATUS dp_soc_umac_reset_init(struct dp_soc *soc)
{
struct dp_soc_umac_reset_ctx *umac_reset_ctx;
@@ -88,7 +121,8 @@ QDF_STATUS dp_soc_umac_reset_init(struct dp_soc *soc)
(uint64_t)umac_reset_ctx->shmem_paddr_unaligned,
DP_UMAC_RESET_SHMEM_ALIGN);
return QDF_STATUS_SUCCESS;
/* Send the setup cmd to the target */
return dp_umac_reset_send_setup_cmd(soc);
}
/**