Loading drivers/soc/qcom/socinfo.c +31 −0 Original line number Diff line number Diff line Loading @@ -188,6 +188,13 @@ struct socinfo_v9 { uint32_t foundry_id; }; struct socinfo_v10 { struct socinfo_v9 v9; /* only valid when format==10*/ uint32_t serial_number; }; static union { struct socinfo_v1 v1; struct socinfo_v2 v2; Loading @@ -198,6 +205,7 @@ static union { struct socinfo_v7 v7; struct socinfo_v8 v8; struct socinfo_v9 v9; struct socinfo_v10 v10; } *socinfo; static struct msm_soc_info cpu_of_id[] = { Loading Loading @@ -1024,6 +1032,7 @@ static void __init populate_soc_sysfs_files(struct device *msm_soc_device) device_create_file(msm_soc_device, &select_image); switch (legacy_format) { case 10: case 9: device_create_file(msm_soc_device, &msm_soc_attr_foundry_id); Loading Loading @@ -1199,6 +1208,22 @@ static void socinfo_print(void) socinfo->v7.pmic_die_revision, socinfo->v9.foundry_id); break; case 10: pr_info("%s: v%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\n", __func__, socinfo->v1.format, socinfo->v1.id, SOCINFO_VERSION_MAJOR(socinfo->v1.version), SOCINFO_VERSION_MINOR(socinfo->v1.version), socinfo->v2.raw_id, socinfo->v2.raw_version, socinfo->v3.hw_platform, socinfo->v4.platform_version, socinfo->v5.accessory_chip, socinfo->v6.hw_platform_subtype, socinfo->v7.pmic_model, socinfo->v7.pmic_die_revision, socinfo->v9.foundry_id, socinfo->v10.serial_number); break; default: pr_err("%s: Unknown format found\n", __func__); Loading @@ -1213,6 +1238,12 @@ int __init socinfo_init(void) if (socinfo_init_done) return 0; socinfo = smem_find(SMEM_HW_SW_BUILD_ID, sizeof(struct socinfo_v10), 0, SMEM_ANY_HOST_FLAG); if (IS_ERR_OR_NULL(socinfo)) socinfo = smem_find(SMEM_HW_SW_BUILD_ID, sizeof(struct socinfo_v9), 0, Loading Loading
drivers/soc/qcom/socinfo.c +31 −0 Original line number Diff line number Diff line Loading @@ -188,6 +188,13 @@ struct socinfo_v9 { uint32_t foundry_id; }; struct socinfo_v10 { struct socinfo_v9 v9; /* only valid when format==10*/ uint32_t serial_number; }; static union { struct socinfo_v1 v1; struct socinfo_v2 v2; Loading @@ -198,6 +205,7 @@ static union { struct socinfo_v7 v7; struct socinfo_v8 v8; struct socinfo_v9 v9; struct socinfo_v10 v10; } *socinfo; static struct msm_soc_info cpu_of_id[] = { Loading Loading @@ -1024,6 +1032,7 @@ static void __init populate_soc_sysfs_files(struct device *msm_soc_device) device_create_file(msm_soc_device, &select_image); switch (legacy_format) { case 10: case 9: device_create_file(msm_soc_device, &msm_soc_attr_foundry_id); Loading Loading @@ -1199,6 +1208,22 @@ static void socinfo_print(void) socinfo->v7.pmic_die_revision, socinfo->v9.foundry_id); break; case 10: pr_info("%s: v%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\n", __func__, socinfo->v1.format, socinfo->v1.id, SOCINFO_VERSION_MAJOR(socinfo->v1.version), SOCINFO_VERSION_MINOR(socinfo->v1.version), socinfo->v2.raw_id, socinfo->v2.raw_version, socinfo->v3.hw_platform, socinfo->v4.platform_version, socinfo->v5.accessory_chip, socinfo->v6.hw_platform_subtype, socinfo->v7.pmic_model, socinfo->v7.pmic_die_revision, socinfo->v9.foundry_id, socinfo->v10.serial_number); break; default: pr_err("%s: Unknown format found\n", __func__); Loading @@ -1213,6 +1238,12 @@ int __init socinfo_init(void) if (socinfo_init_done) return 0; socinfo = smem_find(SMEM_HW_SW_BUILD_ID, sizeof(struct socinfo_v10), 0, SMEM_ANY_HOST_FLAG); if (IS_ERR_OR_NULL(socinfo)) socinfo = smem_find(SMEM_HW_SW_BUILD_ID, sizeof(struct socinfo_v9), 0, Loading