mirror of
https://github.com/torvalds/linux.git
synced 2026-07-31 11:37:06 +02:00
soc: qcom: socinfo: Add revision 16 support in socinfo structure
Below are some new fields are getting updated in socinfo structure from bootloader under revision 16. e.g esku; nproduct_code; npartnamemap_offset; nnum_partname_mapping; Add the change in socinfo driver to accommodate this. Change-Id: I11b5182c15af32da61cddbf4bb45d5aef390135a Signed-off-by: Mukesh Ojha <quic_mojha@quicinc.com> Signed-off-by: Prasad Sodagudi <quic_psodagud@quicinc.com> [quic_gurus@quicinc.com: Added missing break and fallthrough] Signed-off-by: Guru Das Srinagesh <quic_gurus@quicinc.com>
This commit is contained in:
parent
21315ac40e
commit
944bd60020
|
|
@ -241,6 +241,11 @@ struct socinfo {
|
|||
__le32 ndefective_parts_array_offset;
|
||||
/* Version 15 */
|
||||
__le32 nmodem_supported;
|
||||
/* Version 16 */
|
||||
__le32 esku;
|
||||
__le32 nproduct_code;
|
||||
__le32 npartnamemap_offset;
|
||||
__le32 nnum_partname_mapping;
|
||||
} *socinfo;
|
||||
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
|
|
@ -1070,6 +1075,8 @@ static void socinfo_populate_sysfs(struct qcom_socinfo *qcom_socinfo)
|
|||
int i = 0;
|
||||
|
||||
switch (socinfo_format) {
|
||||
case SOCINFO_VERSION(0, 16):
|
||||
fallthrough;
|
||||
case SOCINFO_VERSION(0, 15):
|
||||
msm_custom_socinfo_attrs[i++] = &dev_attr_nmodem_supported.attr;
|
||||
fallthrough;
|
||||
|
|
@ -1354,6 +1361,31 @@ static void socinfo_print(void)
|
|||
socinfo->ndefective_parts_array_offset,
|
||||
socinfo->nmodem_supported);
|
||||
break;
|
||||
|
||||
case SOCINFO_VERSION(0, 16):
|
||||
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\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);
|
||||
break;
|
||||
|
||||
default:
|
||||
pr_err("Unknown format found: v%u.%u\n", f_maj, f_min);
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user