msm: camera: common: DDR type selection deprecation

Deprecates legacy api of_fdt_get_ddrtype() as new targets only have
LPDDR5 for platforms that support linux kernel 5.15 and newer.

CRs-Fixed: 3048249
Change-Id: I8e7f3274eadc597870118956b964fb87d69549ee
Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
This commit is contained in:
Karthik Jayakumar
2021-10-05 14:23:05 -07:00
parent 3634a75a4e
commit ed82a7cc9c
5 changed files with 32 additions and 25 deletions

View File

@@ -248,7 +248,7 @@ end:
return rc;
}
#if KERNEL_VERSION(5, 10, 0) <= LINUX_VERSION_CODE
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0)
#include <linux/qcom-iommu-util.h>
void cam_check_iommu_faults(struct iommu_domain *domain,
struct cam_smmu_pf_info *pf_info)
@@ -281,4 +281,19 @@ void cam_check_iommu_faults(struct iommu_domain *domain,
pf_info->pid = fault_ids.pid;
pf_info->mid = fault_ids.mid;
}
#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0)
int cam_get_ddr_type(void)
{
/* We assume all chipsets running kernel version 5.15+
* to be using only DDR5 based memory.
*/
return DDR_TYPE_LPDDR5;
}
#else
int cam_get_ddr_type(void)
{
return of_fdt_get_ddrtype();
}
#endif