mirror of
https://github.com/torvalds/linux.git
synced 2026-07-31 03:27:03 +02:00
soc: qcom: Add v18 support for socinfo
Add support for version 18 in socinfo driver. Add fields in socinfo structure which are added in SMEM in v18, while not creating any APIs to use/expose them as there is no use case requirement for these fields in HLOS as of now. Change-Id: I88a15821f5b85184edb7cae1fdeb3824c0f748b8 Signed-off-by: Naman Jain <quic_namajain@quicinc.com>
This commit is contained in:
parent
18f6cc4024
commit
4db26dbeb1
|
|
@ -290,6 +290,9 @@ struct socinfo {
|
|||
__le32 nnum_partname_mapping;
|
||||
/* Version 17 */
|
||||
__le32 hw_plat_oem_variant;
|
||||
/* Version 18 */
|
||||
__le32 num_kvps;
|
||||
__le32 kvps_offset;
|
||||
} *socinfo;
|
||||
|
||||
#define PART_NAME_MAX 32
|
||||
|
|
@ -1243,6 +1246,8 @@ static void socinfo_populate_sysfs(struct qcom_socinfo *qcom_socinfo)
|
|||
int i = 0;
|
||||
|
||||
switch (socinfo_format) {
|
||||
case SOCINFO_VERSION(0, 18):
|
||||
fallthrough;
|
||||
case SOCINFO_VERSION(0, 17):
|
||||
msm_custom_socinfo_attrs[i++] = &dev_attr_platform_oem_variant_id.attr;
|
||||
msm_custom_socinfo_attrs[i++] = &dev_attr_platform_oem_variant.attr;
|
||||
|
|
@ -1592,6 +1597,36 @@ static void socinfo_print(void)
|
|||
socinfo->hw_plat_oem_variant);
|
||||
break;
|
||||
|
||||
case SOCINFO_VERSION(0, 18):
|
||||
pr_info("v%u.%u, id=%u, ver=%u.%u, raw_id=%u, raw_ver=%u, hw_plat=%u, hw_plat_ver=%u\n accessory_chip=%u, hw_plat_subtype=%u, pmic_model=%u, pmic_die_revision=%u foundry_id=%u serial_number=%u num_pmics=%u chip_family=0x%x raw_device_family=0x%x raw_device_number=0x%x nproduct_id=0x%x num_clusters=0x%x ncluster_array_offset=0x%x num_defective_parts=0x%x ndefective_parts_array_offset=0x%x nmodem_supported=0x%x feature_code=0x%x pcode=0x%x sku=%s hw_plat_oem_variant=%u num_kvps=%u kvps_offset=%u\n",
|
||||
f_maj, f_min, socinfo->id, v_maj, v_min,
|
||||
socinfo->raw_id, socinfo->raw_ver,
|
||||
socinfo->hw_plat,
|
||||
socinfo->plat_ver,
|
||||
socinfo->accessory_chip,
|
||||
socinfo->hw_plat_subtype,
|
||||
socinfo->pmic_model,
|
||||
socinfo->pmic_die_rev,
|
||||
socinfo->foundry_id,
|
||||
socinfo->serial_num,
|
||||
socinfo->num_pmics,
|
||||
socinfo->chip_family,
|
||||
socinfo->raw_device_family,
|
||||
socinfo->raw_device_num,
|
||||
socinfo->nproduct_id,
|
||||
socinfo->num_clusters,
|
||||
socinfo->ncluster_array_offset,
|
||||
socinfo->num_defective_parts,
|
||||
socinfo->ndefective_parts_array_offset,
|
||||
socinfo->nmodem_supported,
|
||||
socinfo->feature_code,
|
||||
socinfo->pcode,
|
||||
sku ? sku : "Unknown",
|
||||
socinfo->hw_plat_oem_variant,
|
||||
socinfo->num_kvps,
|
||||
socinfo->kvps_offset);
|
||||
break;
|
||||
|
||||
default:
|
||||
pr_err("Unknown format found: v%u.%u\n", f_maj, f_min);
|
||||
break;
|
||||
|
|
@ -1886,6 +1921,8 @@ static void socinfo_debugfs_init(struct qcom_socinfo *qcom_socinfo,
|
|||
&qcom_socinfo->info.fmt);
|
||||
|
||||
switch (qcom_socinfo->info.fmt) {
|
||||
case SOCINFO_VERSION(0, 18):
|
||||
fallthrough;
|
||||
case SOCINFO_VERSION(0, 17):
|
||||
qcom_socinfo->info.hw_plat_oem_variant =
|
||||
__le32_to_cpu(info->hw_plat_oem_variant);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user