qcacmn: DP changes for umac reset in QCA5332
Make DP changes for handling umac reset in QCA5332. Changes are done to program msi_data value of the IPC interrupt to FW. Change-Id: Ib6453755e191da655b87b528a7cef38a464f316b CRs-Fixed: 3401146
此提交包含在:

提交者
Madan Koyyalamudi

父節點
3062af6ed0
當前提交
610ccaa126
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
@@ -63,15 +63,17 @@ dp_umac_reset_send_setup_cmd(struct dp_soc *soc)
|
||||
struct dp_htt_umac_reset_setup_cmd_params params;
|
||||
|
||||
umac_reset_ctx = &soc->umac_reset_ctx;
|
||||
qdf_mem_zero(¶ms, sizeof(params));
|
||||
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;
|
||||
if (ret) {
|
||||
params.msi_data = UMAC_RESET_IPC;
|
||||
} else {
|
||||
params.msi_data = (umac_reset_ctx->intr_offset %
|
||||
msi_vector_count) + msi_base_data;
|
||||
}
|
||||
|
||||
qdf_mem_zero(¶ms, 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 =
|
||||
@@ -374,6 +376,7 @@ QDF_STATUS dp_umac_reset_interrupt_attach(struct dp_soc *soc)
|
||||
int msi_vector_count, ret;
|
||||
uint32_t msi_base_data, msi_vector_start;
|
||||
uint32_t umac_reset_vector, umac_reset_irq;
|
||||
QDF_STATUS status;
|
||||
|
||||
if (!soc) {
|
||||
dp_umac_reset_err("DP SOC is null");
|
||||
@@ -396,21 +399,28 @@ QDF_STATUS dp_umac_reset_interrupt_attach(struct dp_soc *soc)
|
||||
&msi_vector_count, &msi_base_data,
|
||||
&msi_vector_start);
|
||||
if (ret) {
|
||||
dp_umac_reset_err("UMAC reset is only supported in MSI interrupt mode");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
/* UMAC reset uses IPC interrupt for AHB devices */
|
||||
status = hif_get_umac_reset_irq(soc->hif_handle,
|
||||
&umac_reset_irq);
|
||||
if (status) {
|
||||
dp_umac_reset_err("get_umac_reset_irq failed status %d",
|
||||
status);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
} else {
|
||||
if (umac_reset_ctx->intr_offset < 0 ||
|
||||
umac_reset_ctx->intr_offset >= WLAN_CFG_INT_NUM_CONTEXTS) {
|
||||
dp_umac_reset_err("Invalid interrupt offset");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
if (umac_reset_ctx->intr_offset < 0 ||
|
||||
umac_reset_ctx->intr_offset >= WLAN_CFG_INT_NUM_CONTEXTS) {
|
||||
dp_umac_reset_err("Invalid interrupt offset");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
umac_reset_vector = msi_vector_start +
|
||||
umac_reset_vector = msi_vector_start +
|
||||
(umac_reset_ctx->intr_offset % msi_vector_count);
|
||||
|
||||
/* Get IRQ number */
|
||||
umac_reset_irq = pld_get_msi_irq(soc->osdev->dev, umac_reset_vector);
|
||||
/* Get IRQ number */
|
||||
umac_reset_irq = pld_get_msi_irq(soc->osdev->dev,
|
||||
umac_reset_vector);
|
||||
}
|
||||
|
||||
/* Finally register to this IRQ from HIF layer */
|
||||
return hif_register_umac_reset_handler(
|
||||
|
新增問題並參考
封鎖使用者