qcacmn: add support for DDR mapped IPA doorbell
Add support for DDR mapped IPA doorbell addresses. Change-Id: I3a0d03ff4435ea12a6e07d4ae75012f2c85e32c9 CRs-Fixed: 2782267
This commit is contained in:

committed by
snandini

parent
7fcea50eab
commit
5e487cc20a
@@ -317,7 +317,8 @@ static void dp_tx_ipa_uc_detach(struct dp_soc *soc, struct dp_pdev *pdev)
|
|||||||
soc->ipa_uc_tx_rsc.tx_buf_pool_vaddr_unaligned = NULL;
|
soc->ipa_uc_tx_rsc.tx_buf_pool_vaddr_unaligned = NULL;
|
||||||
|
|
||||||
ipa_res = &pdev->ipa_resource;
|
ipa_res = &pdev->ipa_resource;
|
||||||
iounmap(ipa_res->tx_comp_doorbell_vaddr);
|
if (!ipa_res->is_db_ddr_mapped)
|
||||||
|
iounmap(ipa_res->tx_comp_doorbell_vaddr);
|
||||||
|
|
||||||
qdf_mem_free_sgtable(&ipa_res->tx_ring.sgtable);
|
qdf_mem_free_sgtable(&ipa_res->tx_ring.sgtable);
|
||||||
qdf_mem_free_sgtable(&ipa_res->tx_comp_ring.sgtable);
|
qdf_mem_free_sgtable(&ipa_res->tx_comp_ring.sgtable);
|
||||||
@@ -763,7 +764,11 @@ QDF_STATUS dp_ipa_set_doorbell_paddr(struct cdp_soc_t *soc_hdl, uint8_t pdev_id)
|
|||||||
if (!wlan_cfg_is_ipa_enabled(soc->wlan_cfg_ctx))
|
if (!wlan_cfg_is_ipa_enabled(soc->wlan_cfg_ctx))
|
||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
|
|
||||||
ipa_res->tx_comp_doorbell_vaddr =
|
if (ipa_res->is_db_ddr_mapped)
|
||||||
|
ipa_res->tx_comp_doorbell_vaddr =
|
||||||
|
phys_to_virt(ipa_res->tx_comp_doorbell_paddr);
|
||||||
|
else
|
||||||
|
ipa_res->tx_comp_doorbell_vaddr =
|
||||||
ioremap(ipa_res->tx_comp_doorbell_paddr, 4);
|
ioremap(ipa_res->tx_comp_doorbell_paddr, 4);
|
||||||
|
|
||||||
if (qdf_mem_smmu_s1_enabled(soc->osdev)) {
|
if (qdf_mem_smmu_s1_enabled(soc->osdev)) {
|
||||||
@@ -1311,6 +1316,9 @@ QDF_STATUS dp_ipa_setup(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
|
|||||||
ipa_res->rx_ready_doorbell_paddr =
|
ipa_res->rx_ready_doorbell_paddr =
|
||||||
QDF_IPA_WDI_CONN_OUT_PARAMS_RX_UC_DB_PA(&pipe_out);
|
QDF_IPA_WDI_CONN_OUT_PARAMS_RX_UC_DB_PA(&pipe_out);
|
||||||
|
|
||||||
|
ipa_res->is_db_ddr_mapped =
|
||||||
|
QDF_IPA_WDI_CONN_OUT_PARAMS_IS_DB_DDR_MAPPED(&pipe_out);
|
||||||
|
|
||||||
soc->ipa_first_tx_db_access = true;
|
soc->ipa_first_tx_db_access = true;
|
||||||
|
|
||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
|
@@ -1704,6 +1704,8 @@ struct dp_ipa_resources {
|
|||||||
qdf_dma_addr_t tx_comp_doorbell_paddr;
|
qdf_dma_addr_t tx_comp_doorbell_paddr;
|
||||||
uint32_t *tx_comp_doorbell_vaddr;
|
uint32_t *tx_comp_doorbell_vaddr;
|
||||||
qdf_dma_addr_t rx_ready_doorbell_paddr;
|
qdf_dma_addr_t rx_ready_doorbell_paddr;
|
||||||
|
|
||||||
|
bool is_db_ddr_mapped;
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
|
* Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for any
|
* Permission to use, copy, modify, and/or distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
@@ -260,6 +260,8 @@ typedef __qdf_ipa_wdi_conn_out_params_t qdf_ipa_wdi_conn_out_params_t;
|
|||||||
__QDF_IPA_WDI_CONN_OUT_PARAMS_TX_UC_DB_VA(pipe_out)
|
__QDF_IPA_WDI_CONN_OUT_PARAMS_TX_UC_DB_VA(pipe_out)
|
||||||
#define QDF_IPA_WDI_CONN_OUT_PARAMS_RX_UC_DB_PA(pipe_out) \
|
#define QDF_IPA_WDI_CONN_OUT_PARAMS_RX_UC_DB_PA(pipe_out) \
|
||||||
__QDF_IPA_WDI_CONN_OUT_PARAMS_RX_UC_DB_PA(pipe_out)
|
__QDF_IPA_WDI_CONN_OUT_PARAMS_RX_UC_DB_PA(pipe_out)
|
||||||
|
#define QDF_IPA_WDI_CONN_OUT_PARAMS_IS_DB_DDR_MAPPED(pipe_out) \
|
||||||
|
__QDF_IPA_WDI_CONN_OUT_PARAMS_IS_DB_DDR_MAPPED(pipe_out)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_ipa_wdi_perf_profile_t - To set BandWidth profile
|
* qdf_ipa_wdi_perf_profile_t - To set BandWidth profile
|
||||||
|
@@ -222,6 +222,12 @@ typedef struct ipa_wdi_conn_out_params __qdf_ipa_wdi_conn_out_params_t;
|
|||||||
(((struct ipa_wdi_conn_out_params *)(pipe_out))->tx_uc_db_pa)
|
(((struct ipa_wdi_conn_out_params *)(pipe_out))->tx_uc_db_pa)
|
||||||
#define __QDF_IPA_WDI_CONN_OUT_PARAMS_RX_UC_DB_PA(pipe_out) \
|
#define __QDF_IPA_WDI_CONN_OUT_PARAMS_RX_UC_DB_PA(pipe_out) \
|
||||||
(((struct ipa_wdi_conn_out_params *)(pipe_out))->rx_uc_db_pa)
|
(((struct ipa_wdi_conn_out_params *)(pipe_out))->rx_uc_db_pa)
|
||||||
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0))
|
||||||
|
#define __QDF_IPA_WDI_CONN_OUT_PARAMS_IS_DB_DDR_MAPPED(pipe_out) \
|
||||||
|
(((struct ipa_wdi_conn_out_params *)(pipe_out))->is_ddr_mapped)
|
||||||
|
#else
|
||||||
|
#define __QDF_IPA_WDI_CONN_OUT_PARAMS_IS_DB_DDR_MAPPED(pipe_out) false
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* __qdf_ipa_wdi_perf_profile_t - To set BandWidth profile
|
* __qdf_ipa_wdi_perf_profile_t - To set BandWidth profile
|
||||||
|
Reference in New Issue
Block a user