mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 15:11:48 -04:00
Merge "dsp: audio_ion: Update IOVA start address from dt entry"
This commit is contained in:
commit
d07fc81d86
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