Loading drivers/platform/msm/ipa/ipa_v3/ipa.c +24 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ #include <linux/hashtable.h> #include <linux/hash.h> #include <soc/qcom/subsystem_restart.h> #include <soc/qcom/smem.h> #define IPA_SUBSYSTEM_NAME "ipa_fws" #include "ipa_i.h" #include "../ipa_rm_i.h" Loading Loading @@ -74,6 +75,8 @@ #define IPA3_ACTIVE_CLIENT_LOG_TYPE_RESOURCE 2 #define IPA3_ACTIVE_CLIENT_LOG_TYPE_SPECIAL 3 #define IPA_SMEM_SIZE (8 * 1024) /* round addresses for closes page per SMMU requirements */ #define IPA_SMMU_ROUND_TO_PAGE(iova, pa, size, iova_p, pa_p, size_p) \ do { \ Loading Loading @@ -5141,6 +5144,7 @@ static int ipa_smmu_ap_cb_probe(struct device *dev) u32 iova_ap_mapping[2]; u32 add_map_size; const u32 *add_map; void *smem_addr; int i; IPADBG("AP CB probe: sub pdev=%p\n", dev); Loading Loading @@ -5260,6 +5264,26 @@ static int ipa_smmu_ap_cb_probe(struct device *dev) } } /* map SMEM memory for IPA table accesses */ smem_addr = smem_alloc(SMEM_IPA_FILTER_TABLE, IPA_SMEM_SIZE, SMEM_MODEM, 0); if (smem_addr) { phys_addr_t iova = smem_virt_to_phys(smem_addr); phys_addr_t pa = iova; unsigned long iova_p; phys_addr_t pa_p; u32 size_p; IPA_SMMU_ROUND_TO_PAGE(iova, pa, IPA_SMEM_SIZE, iova_p, pa_p, size_p); IPADBG("mapping 0x%lx to 0x%pa size %d\n", iova_p, &pa_p, size_p); ipa3_iommu_map(cb->mapping->domain, iova_p, pa_p, size_p, IOMMU_READ | IOMMU_WRITE | IOMMU_DEVICE); } smmu_info.present = true; if (!ipa3_bus_scale_table) Loading Loading
drivers/platform/msm/ipa/ipa_v3/ipa.c +24 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ #include <linux/hashtable.h> #include <linux/hash.h> #include <soc/qcom/subsystem_restart.h> #include <soc/qcom/smem.h> #define IPA_SUBSYSTEM_NAME "ipa_fws" #include "ipa_i.h" #include "../ipa_rm_i.h" Loading Loading @@ -74,6 +75,8 @@ #define IPA3_ACTIVE_CLIENT_LOG_TYPE_RESOURCE 2 #define IPA3_ACTIVE_CLIENT_LOG_TYPE_SPECIAL 3 #define IPA_SMEM_SIZE (8 * 1024) /* round addresses for closes page per SMMU requirements */ #define IPA_SMMU_ROUND_TO_PAGE(iova, pa, size, iova_p, pa_p, size_p) \ do { \ Loading Loading @@ -5141,6 +5144,7 @@ static int ipa_smmu_ap_cb_probe(struct device *dev) u32 iova_ap_mapping[2]; u32 add_map_size; const u32 *add_map; void *smem_addr; int i; IPADBG("AP CB probe: sub pdev=%p\n", dev); Loading Loading @@ -5260,6 +5264,26 @@ static int ipa_smmu_ap_cb_probe(struct device *dev) } } /* map SMEM memory for IPA table accesses */ smem_addr = smem_alloc(SMEM_IPA_FILTER_TABLE, IPA_SMEM_SIZE, SMEM_MODEM, 0); if (smem_addr) { phys_addr_t iova = smem_virt_to_phys(smem_addr); phys_addr_t pa = iova; unsigned long iova_p; phys_addr_t pa_p; u32 size_p; IPA_SMMU_ROUND_TO_PAGE(iova, pa, IPA_SMEM_SIZE, iova_p, pa_p, size_p); IPADBG("mapping 0x%lx to 0x%pa size %d\n", iova_p, &pa_p, size_p); ipa3_iommu_map(cb->mapping->domain, iova_p, pa_p, size_p, IOMMU_READ | IOMMU_WRITE | IOMMU_DEVICE); } smmu_info.present = true; if (!ipa3_bus_scale_table) Loading