summaryrefslogtreecommitdiffstats
path: root/drivers/soc
diff options
context:
space:
mode:
authorNaman Jain <quic_namajain@quicinc.com>2023-01-27 09:42:00 +0530
committerBjorn Andersson <andersson@kernel.org>2023-02-06 12:47:32 -0800
commit6bdab60d5cbd7996e371305433e943a82cde0d4c (patch)
tree799e3ebb8b1412865f06c7dea86dbce8b3e13673 /drivers/soc
parent64dc69f3f36a71a95bfed8054d49600a7872415e (diff)
downloadlinux-stable-6bdab60d5cbd7996e371305433e943a82cde0d4c.tar.gz
linux-stable-6bdab60d5cbd7996e371305433e943a82cde0d4c.tar.bz2
linux-stable-6bdab60d5cbd7996e371305433e943a82cde0d4c.zip
soc: qcom: socinfo: Add support for new field in revision 17
Add support for new field coming with socinfo structure under v17 to get hardware platform's oem variant id. This is to enable OEMs to have minor changes in the board, but to use the same platform subtype as the one supported by Qualcomm. The new field is to be used in platform overlay file. Default value is 0, reserved for Qualcomm platforms. Also, add debugfs support to read this field for a device. Signed-off-by: Naman Jain <quic_namajain@quicinc.com> Reviewed-by: Mukesh Ojha <quic_mojha@quicinc.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Bjorn Andersson <andersson@kernel.org> Link: https://lore.kernel.org/r/20230127041200.29094-1-quic_namajain@quicinc.com
Diffstat (limited to 'drivers/soc')
-rw-r--r--drivers/soc/qcom/socinfo.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/soc/qcom/socinfo.c b/drivers/soc/qcom/socinfo.c
index 3b970a80f3aa..e24895f98600 100644
--- a/drivers/soc/qcom/socinfo.c
+++ b/drivers/soc/qcom/socinfo.c
@@ -174,6 +174,8 @@ struct socinfo {
__le32 pcode;
__le32 npartnamemap_offset;
__le32 nnum_partname_mapping;
+ /* Version 17 */
+ __le32 oem_variant;
};
#ifdef CONFIG_DEBUG_FS
@@ -196,6 +198,7 @@ struct socinfo_params {
u32 nmodem_supported;
u32 feature_code;
u32 pcode;
+ u32 oem_variant;
};
struct smem_image_version {
@@ -593,6 +596,11 @@ static void socinfo_debugfs_init(struct qcom_socinfo *qcom_socinfo,
&qcom_socinfo->info.fmt);
switch (qcom_socinfo->info.fmt) {
+ case SOCINFO_VERSION(0, 17):
+ qcom_socinfo->info.oem_variant = __le32_to_cpu(info->oem_variant);
+ debugfs_create_u32("oem_variant", 0444, qcom_socinfo->dbg_root,
+ &qcom_socinfo->info.oem_variant);
+ fallthrough;
case SOCINFO_VERSION(0, 16):
qcom_socinfo->info.feature_code = __le32_to_cpu(info->feature_code);
qcom_socinfo->info.pcode = __le32_to_cpu(info->pcode);