Re: [PATCH 1/2] soc: qcom: socinfo: Add support for new fields in revision 18

From: Naman Jain
Date: Tue Jun 06 2023 - 06:44:19 EST



On 6/6/2023 4:03 PM, Robert Marko wrote:

On 02. 06. 2023. 05:25, Naman Jain wrote:
Add support for below fields coming in socinfo structure under v18:
* num_kvps: number of key value pairs (KVP)
* kvps_offset: the offset of the KVP table from the base address of
   socinfo structure in SMEM
KVP table has boolean values for certain feature flags, used to determine
hardware configuration.

Signed-off-by: Naman Jain <quic_namajain@xxxxxxxxxxx>

Hi,
The socinfo struct itself was moved into a separate header[1] so it can be reused,
so this patch series needs to be rebased on top of linux-next.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/include/linux/soc/qcom/socinfo.h?h=next-20230606&id=ec001bb71e4476f7f5be9db693d5f43e65b9d8cb

Regards,
Robert

---
  drivers/soc/qcom/socinfo.c | 4 ++++
  1 file changed, 4 insertions(+)

diff --git a/drivers/soc/qcom/socinfo.c b/drivers/soc/qcom/socinfo.c
index c2e4a57dd666..a76006ea8a37 100644
--- a/drivers/soc/qcom/socinfo.c
+++ b/drivers/soc/qcom/socinfo.c
@@ -181,6 +181,9 @@ struct socinfo {
      __le32  nnum_partname_mapping;
      /* Version 17 */
      __le32 oem_variant;
+    /* Version 18 */
+    __le32 num_kvps;
+    __le32 kvps_offset;
  };
    #ifdef CONFIG_DEBUG_FS
@@ -620,6 +623,7 @@ static void socinfo_debugfs_init(struct qcom_socinfo *qcom_socinfo,
                 &qcom_socinfo->info.fmt);
        switch (qcom_socinfo->info.fmt) {
+    case SOCINFO_VERSION(0, 18):
      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,


HI Robert,

Thanks for pointing it out. Will rebase and send it in v2.


Regards,

Naman