summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSkylar Chang <chiaweic@codeaurora.org>2016-08-25 13:39:28 -0700
committerSkylar Chang <chiaweic@codeaurora.org>2016-08-25 14:02:19 -0700
commitebc2a18351d43e32d2fcb42d351ff4126208d989 (patch)
tree3d8c9df969ffc2cb5d3f2ad98ad0fd69f76a769d
parentf551e5cce9949fab47ac4e33754bd3e84403b94a (diff)
msm: ipa: WA to get PA of sgt_tbl from wlan
with SMMU enable, the API page_to_phys() is failed to get PA of the sg_page tbl. The WA is to have wlan-driver directly send the PA to ipa-driver. Change-Id: I7750102222d519969da0d597a6591aa728abb27a Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
-rw-r--r--drivers/platform/msm/ipa/ipa_v3/ipa_uc_wdi.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/platform/msm/ipa/ipa_v3/ipa_uc_wdi.c b/drivers/platform/msm/ipa/ipa_v3/ipa_uc_wdi.c
index e0f32bdcbb3d..e4d868c81f1e 100644
--- a/drivers/platform/msm/ipa/ipa_v3/ipa_uc_wdi.c
+++ b/drivers/platform/msm/ipa/ipa_v3/ipa_uc_wdi.c
@@ -547,7 +547,8 @@ static int ipa_create_uc_smmu_mapping_sgt(struct sg_table *sgt,
}
for_each_sg(sgt->sgl, sg, sgt->nents, i) {
- phys = page_to_phys(sg_page(sg));
+ /* directly get sg_tbl PA from wlan-driver */
+ phys = sg->dma_address;
len = PAGE_ALIGN(sg->offset + sg->length);
ret = ipa3_iommu_map(cb->mapping->domain, va, phys, len, prot);
@@ -647,7 +648,8 @@ static void ipa_save_uc_smmu_mapping_sgt(int res_idx, struct sg_table *sgt,
wdi_res[res_idx].nents = sgt->nents;
wdi_res[res_idx].valid = true;
for_each_sg(sgt->sgl, sg, sgt->nents, i) {
- wdi_res[res_idx].res[i].pa = page_to_phys(sg_page(sg));
+ /* directly get sg_tbl PA from wlan */
+ wdi_res[res_idx].res[i].pa = sg->dma_address;
wdi_res[res_idx].res[i].iova = curr_iova;
wdi_res[res_idx].res[i].size = PAGE_ALIGN(sg->offset +
sg->length);
@@ -894,6 +896,7 @@ int ipa3_connect_wdi_pipe(struct ipa_wdi_in_params *in,
in->smmu_enabled,
in->u.dl_smmu.ce_ring_size,
in->u.dl.ce_ring_size);
+ /* WA: wlan passed ce_ring sg_table PA directly */
if (ipa_create_uc_smmu_mapping(IPA_WDI_CE_RING_RES,
in->smmu_enabled,
in->u.dl.ce_ring_base_pa,