From 4a172553d25122a157a9b21b0254086d4ec62743 Mon Sep 17 00:00:00 2001 From: Naman Jain Date: Wed, 27 Mar 2024 16:46:45 +0530 Subject: [PATCH] soc: qcom: socinfo: Add version 20 Add support for socinfo version 20. Version 20 adds a new package ID, which is used to tune temperature thresholds on devices which might be able to withstand higher temperatures. Change-Id: Ie4a4f1ea64d0d34fc9ec8d55793cd142a5ccb239 Signed-off-by: Naman Jain --- drivers/soc/qcom/socinfo.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/soc/qcom/socinfo.c b/drivers/soc/qcom/socinfo.c index 9a11d73c5522..06be3f050e6c 100644 --- a/drivers/soc/qcom/socinfo.c +++ b/drivers/soc/qcom/socinfo.c @@ -304,6 +304,8 @@ struct socinfo { __le32 num_func_clusters; __le32 boot_cluster; __le32 boot_core; + /* Version 20 */ + __le32 raw_package_type; } *socinfo; #ifdef CONFIG_DEBUG_FS @@ -330,6 +332,7 @@ struct socinfo_params { u32 num_func_clusters; u32 boot_cluster; u32 boot_core; + u32 raw_package_type; }; struct smem_image_version { @@ -1153,6 +1156,7 @@ static void socinfo_populate_sysfs(struct qcom_socinfo *qcom_socinfo) int i = 0; switch (socinfo_format) { + case SOCINFO_VERSION(0, 20): case SOCINFO_VERSION(0, 19): case SOCINFO_VERSION(0, 18): case SOCINFO_VERSION(0, 17): @@ -1404,6 +1408,11 @@ static void socinfo_debugfs_init(struct qcom_socinfo *qcom_socinfo, &qcom_socinfo->info.fmt); switch (qcom_socinfo->info.fmt) { + case SOCINFO_VERSION(0, 20): + qcom_socinfo->info.raw_package_type = __le32_to_cpu(info->raw_package_type); + debugfs_create_u32("raw_package_type", 0444, qcom_socinfo->dbg_root, + &qcom_socinfo->info.raw_package_type); + fallthrough; case SOCINFO_VERSION(0, 19): qcom_socinfo->info.num_func_clusters = __le32_to_cpu(info->num_func_clusters); qcom_socinfo->info.boot_cluster = __le32_to_cpu(info->boot_cluster);