mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 22:40:54 -04:00
dsp: audio_ion: Update IOVA start address from dt entry
In sm6150, LPASS has Agg NOC before SMMU transactions. Agg NOC has HW limitation which considers IOVA as physical DDR address and resulting in failure for particular memory range. Update IOVA address start address for audio to use different range. CRs-Fixed: 2346788 Change-Id: Ieac3b8bdd6295a56039d9bca422d2f41e0d94944 Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
This commit is contained in:
parent
67a099c6cc
commit
61cd502c9d
1 changed files with 15 additions and 1 deletions
|
|
@ -49,6 +49,7 @@ struct msm_audio_ion_private {
|
|||
struct mutex list_mutex;
|
||||
u64 smmu_sid_bits;
|
||||
u32 smmu_version;
|
||||
u32 iova_start_addr;
|
||||
};
|
||||
|
||||
struct msm_audio_alloc_data {
|
||||
|
|
@ -665,7 +666,7 @@ static int msm_audio_smmu_init(struct device *dev)
|
|||
int ret;
|
||||
|
||||
mapping = arm_iommu_create_mapping(&platform_bus_type,
|
||||
MSM_AUDIO_ION_VA_START,
|
||||
msm_audio_ion_data.iova_start_addr,
|
||||
MSM_AUDIO_ION_VA_LEN);
|
||||
if (IS_ERR(mapping))
|
||||
return PTR_ERR(mapping);
|
||||
|
|
@ -701,6 +702,7 @@ static int msm_audio_ion_probe(struct platform_device *pdev)
|
|||
u64 smmu_sid_mask = 0;
|
||||
const char *msm_audio_ion_dt = "qcom,smmu-enabled";
|
||||
const char *msm_audio_ion_smmu = "qcom,smmu-version";
|
||||
const char *msm_audio_ion_iova_start_addr = "qcom,iova-start-addr";
|
||||
const char *msm_audio_ion_smmu_sid_mask = "qcom,smmu-sid-mask";
|
||||
bool smmu_enabled;
|
||||
enum apr_subsys_state q6_state;
|
||||
|
|
@ -746,6 +748,18 @@ static int msm_audio_ion_probe(struct platform_device *pdev)
|
|||
dev_dbg(dev, "%s: SMMU is Enabled. SMMU version is (%d)",
|
||||
__func__, msm_audio_ion_data.smmu_version);
|
||||
|
||||
rc = of_property_read_u32(dev->of_node,
|
||||
msm_audio_ion_iova_start_addr,
|
||||
&msm_audio_ion_data.iova_start_addr);
|
||||
if (rc) {
|
||||
dev_dbg(dev,
|
||||
"%s: qcom,iova_start_addr missing in DT node, initialize with default val\n",
|
||||
__func__);
|
||||
msm_audio_ion_data.iova_start_addr = MSM_AUDIO_ION_VA_START;
|
||||
} else {
|
||||
dev_dbg(dev, "%s:IOVA start addr: 0x%x\n",
|
||||
__func__, msm_audio_ion_data.iova_start_addr);
|
||||
}
|
||||
/* Get SMMU SID information from Devicetree */
|
||||
rc = of_property_read_u64(dev->of_node,
|
||||
msm_audio_ion_smmu_sid_mask,
|
||||
|
|
|
|||
Loading…
Reference in a new issue