qcacmn: Do smmu unmap for IPA TX and RX doorbell registers
During driver initialization, IPA TX and RX doorbell registers are provided to wlan as physical addresses. With SMMU S1 enabled, they're mapped to IOVA of wlan domain. On driver deinit path, do smmu unmap for the two IOVA addresses. Change-Id: I85ef1c3e99bef504abf09eebf9ace760b68f35f1 CRs-Fixed: 2768303
这个提交包含在:
@@ -1642,23 +1642,55 @@ QDF_STATUS dp_ipa_setup_iface(char *ifname, uint8_t *mac_addr,
|
||||
|
||||
/**
|
||||
* dp_ipa_cleanup() - Disconnect IPA pipes
|
||||
* @soc_hdl: dp soc handle
|
||||
* @pdev_id: dp pdev id
|
||||
* @tx_pipe_handle: Tx pipe handle
|
||||
* @rx_pipe_handle: Rx pipe handle
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS dp_ipa_cleanup(uint32_t tx_pipe_handle, uint32_t rx_pipe_handle)
|
||||
QDF_STATUS dp_ipa_cleanup(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
|
||||
uint32_t tx_pipe_handle, uint32_t rx_pipe_handle)
|
||||
{
|
||||
struct dp_soc *soc = cdp_soc_t_to_dp_soc(soc_hdl);
|
||||
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||
struct dp_ipa_resources *ipa_res;
|
||||
struct dp_pdev *pdev;
|
||||
int ret;
|
||||
|
||||
ret = qdf_ipa_wdi_disconn_pipes();
|
||||
if (ret) {
|
||||
dp_err("ipa_wdi_disconn_pipes: IPA pipe cleanup failed: ret=%d",
|
||||
ret);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
status = QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
pdev = dp_get_pdev_from_soc_pdev_id_wifi3(soc, pdev_id);
|
||||
if (qdf_unlikely(!pdev)) {
|
||||
dp_err_rl("Invalid pdev for pdev_id %d", pdev_id);
|
||||
status = QDF_STATUS_E_FAILURE;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (qdf_mem_smmu_s1_enabled(soc->osdev)) {
|
||||
ipa_res = &pdev->ipa_resource;
|
||||
|
||||
/* unmap has to be the reverse order of smmu map */
|
||||
ret = pld_smmu_unmap(soc->osdev->dev,
|
||||
ipa_res->rx_ready_doorbell_paddr,
|
||||
sizeof(uint32_t));
|
||||
if (ret)
|
||||
dp_err_rl("IPA RX DB smmu unmap failed");
|
||||
|
||||
ret = pld_smmu_unmap(soc->osdev->dev,
|
||||
ipa_res->tx_comp_doorbell_paddr,
|
||||
sizeof(uint32_t));
|
||||
if (ret)
|
||||
dp_err_rl("IPA TX DB smmu unmap failed");
|
||||
}
|
||||
|
||||
exit:
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
|
在新工单中引用
屏蔽一个用户