[PATCH v2 2/3] soc: qcom: socinfo: Add support for new fields in revision 21
From: Mukesh Ojha
Date: Fri Apr 25 2025 - 10:00:39 EST
Add the subpartfeature offset field to the socinfo structure
which came for version 21 of socinfo structure.
Subpart_feat_offset is subpart like camera, display, etc.,
and its internal feature available on a bin.
Signed-off-by: Mukesh Ojha <mukesh.ojha@xxxxxxxxxxxxxxxx>
---
Changes in v2:
- Added debugfs entry and described more about the field in commit.
drivers/soc/qcom/socinfo.c | 6 ++++++
include/linux/soc/qcom/socinfo.h | 2 ++
2 files changed, 8 insertions(+)
diff --git a/drivers/soc/qcom/socinfo.c b/drivers/soc/qcom/socinfo.c
index 5800ebf9ceea..bac1485f1b27 100644
--- a/drivers/soc/qcom/socinfo.c
+++ b/drivers/soc/qcom/socinfo.c
@@ -154,6 +154,7 @@ struct socinfo_params {
u32 boot_cluster;
u32 boot_core;
u32 raw_package_type;
+ u32 nsubpart_feat_array_offset;
};
struct smem_image_version {
@@ -608,6 +609,11 @@ static void socinfo_debugfs_init(struct qcom_socinfo *qcom_socinfo,
&qcom_socinfo->info.fmt);
switch (qcom_socinfo->info.fmt) {
+ case SOCINFO_VERSION(0, 21):
+ qcom_socinfo->info.nsubpart_feat_array_offset =
+ __le32_to_cpu(info->nsubpart_feat_array_offset);
+ debugfs_create_u32("nsubpart_feat_array_offset", 0444, qcom_socinfo->dbg_root,
+ &qcom_socinfo->info.nsubpart_feat_array_offset);
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,
diff --git a/include/linux/soc/qcom/socinfo.h b/include/linux/soc/qcom/socinfo.h
index c4dae173cc30..3666870b7988 100644
--- a/include/linux/soc/qcom/socinfo.h
+++ b/include/linux/soc/qcom/socinfo.h
@@ -84,6 +84,8 @@ struct socinfo {
__le32 boot_core;
/* Version 20 */
__le32 raw_package_type;
+ /* Version 21 */
+ __le32 nsubpart_feat_array_offset;
};
/* Internal feature codes */
--
2.34.1