Lines Matching +full:rpm +full:- +full:msm8974
1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (c) 2009-2017, The Linux Foundation. All rights reserved.
4 * Copyright (c) 2017-2019, Linaro Ltd.
66 [SMEM_IMAGE_TABLE_RPM_INDEX] = "rpm",
204 { 126, "MSM8974" },
236 { 208, "APQ8074-AA" },
237 { 209, "APQ8074-AB" },
239 { 211, "MSM8274-AA" },
240 { 212, "MSM8274-AB" },
242 { 214, "MSM8674-AA" },
243 { 215, "MSM8674-AB" },
245 { 217, "MSM8974-AA" },
246 { 218, "MSM8974-AB" },
323 return single_open(file, _func, inode->i_private); \
335 qcom_socinfo->dbg_root, \
341 struct socinfo *socinfo = seq->private; in qcom_show_build_id()
343 seq_printf(seq, "%s\n", socinfo->build_id); in qcom_show_build_id()
350 struct socinfo *socinfo = seq->private; in qcom_show_pmic_model()
351 int model = SOCINFO_MINOR(le32_to_cpu(socinfo->pmic_model)); in qcom_show_pmic_model()
354 return -EINVAL; in qcom_show_pmic_model()
366 struct socinfo *socinfo = seq->private; in qcom_show_pmic_model_array()
367 unsigned int num_pmics = le32_to_cpu(socinfo->num_pmics); in qcom_show_pmic_model_array()
368 unsigned int pmic_array_offset = le32_to_cpu(socinfo->pmic_array_offset); in qcom_show_pmic_model_array()
392 struct socinfo *socinfo = seq->private; in qcom_show_pmic_die_revision()
395 SOCINFO_MAJOR(le32_to_cpu(socinfo->pmic_die_rev)), in qcom_show_pmic_die_revision()
396 SOCINFO_MINOR(le32_to_cpu(socinfo->pmic_die_rev))); in qcom_show_pmic_die_revision()
403 struct socinfo *socinfo = seq->private; in qcom_show_chip_id()
405 seq_printf(seq, "%s\n", socinfo->chip_id); in qcom_show_chip_id()
419 struct smem_image_version *image_version = seq->private; \
420 if (image_version->type[0] != '\0') \
421 seq_printf(seq, "%s\n", image_version->type); \
426 return single_open(file, show_image_##type, inode->i_private); \
450 qcom_socinfo->dbg_root = debugfs_create_dir("qcom_socinfo", NULL); in socinfo_debugfs_init()
452 qcom_socinfo->info.fmt = __le32_to_cpu(info->fmt); in socinfo_debugfs_init()
454 debugfs_create_x32("info_fmt", 0444, qcom_socinfo->dbg_root, in socinfo_debugfs_init()
455 &qcom_socinfo->info.fmt); in socinfo_debugfs_init()
457 switch (qcom_socinfo->info.fmt) { in socinfo_debugfs_init()
459 qcom_socinfo->info.nmodem_supported = __le32_to_cpu(info->nmodem_supported); in socinfo_debugfs_init()
461 debugfs_create_u32("nmodem_supported", 0444, qcom_socinfo->dbg_root, in socinfo_debugfs_init()
462 &qcom_socinfo->info.nmodem_supported); in socinfo_debugfs_init()
465 qcom_socinfo->info.num_clusters = __le32_to_cpu(info->num_clusters); in socinfo_debugfs_init()
466 qcom_socinfo->info.ncluster_array_offset = __le32_to_cpu(info->ncluster_array_offset); in socinfo_debugfs_init()
467 qcom_socinfo->info.num_defective_parts = __le32_to_cpu(info->num_defective_parts); in socinfo_debugfs_init()
468 …qcom_socinfo->info.ndefective_parts_array_offset = __le32_to_cpu(info->ndefective_parts_array_offs… in socinfo_debugfs_init()
470 debugfs_create_u32("num_clusters", 0444, qcom_socinfo->dbg_root, in socinfo_debugfs_init()
471 &qcom_socinfo->info.num_clusters); in socinfo_debugfs_init()
472 debugfs_create_u32("ncluster_array_offset", 0444, qcom_socinfo->dbg_root, in socinfo_debugfs_init()
473 &qcom_socinfo->info.ncluster_array_offset); in socinfo_debugfs_init()
474 debugfs_create_u32("num_defective_parts", 0444, qcom_socinfo->dbg_root, in socinfo_debugfs_init()
475 &qcom_socinfo->info.num_defective_parts); in socinfo_debugfs_init()
476 debugfs_create_u32("ndefective_parts_array_offset", 0444, qcom_socinfo->dbg_root, in socinfo_debugfs_init()
477 &qcom_socinfo->info.ndefective_parts_array_offset); in socinfo_debugfs_init()
480 qcom_socinfo->info.nproduct_id = __le32_to_cpu(info->nproduct_id); in socinfo_debugfs_init()
482 debugfs_create_u32("nproduct_id", 0444, qcom_socinfo->dbg_root, in socinfo_debugfs_init()
483 &qcom_socinfo->info.nproduct_id); in socinfo_debugfs_init()
487 qcom_socinfo->info.chip_family = in socinfo_debugfs_init()
488 __le32_to_cpu(info->chip_family); in socinfo_debugfs_init()
489 qcom_socinfo->info.raw_device_family = in socinfo_debugfs_init()
490 __le32_to_cpu(info->raw_device_family); in socinfo_debugfs_init()
491 qcom_socinfo->info.raw_device_num = in socinfo_debugfs_init()
492 __le32_to_cpu(info->raw_device_num); in socinfo_debugfs_init()
494 debugfs_create_x32("chip_family", 0444, qcom_socinfo->dbg_root, in socinfo_debugfs_init()
495 &qcom_socinfo->info.chip_family); in socinfo_debugfs_init()
497 qcom_socinfo->dbg_root, in socinfo_debugfs_init()
498 &qcom_socinfo->info.raw_device_family); in socinfo_debugfs_init()
500 qcom_socinfo->dbg_root, in socinfo_debugfs_init()
501 &qcom_socinfo->info.raw_device_num); in socinfo_debugfs_init()
504 num_pmics = le32_to_cpu(info->num_pmics); in socinfo_debugfs_init()
505 pmic_array_offset = le32_to_cpu(info->pmic_array_offset); in socinfo_debugfs_init()
511 qcom_socinfo->info.foundry_id = __le32_to_cpu(info->foundry_id); in socinfo_debugfs_init()
513 debugfs_create_u32("foundry_id", 0444, qcom_socinfo->dbg_root, in socinfo_debugfs_init()
514 &qcom_socinfo->info.foundry_id); in socinfo_debugfs_init()
522 qcom_socinfo->info.hw_plat_subtype = in socinfo_debugfs_init()
523 __le32_to_cpu(info->hw_plat_subtype); in socinfo_debugfs_init()
526 qcom_socinfo->dbg_root, in socinfo_debugfs_init()
527 &qcom_socinfo->info.hw_plat_subtype); in socinfo_debugfs_init()
530 qcom_socinfo->info.accessory_chip = in socinfo_debugfs_init()
531 __le32_to_cpu(info->accessory_chip); in socinfo_debugfs_init()
534 qcom_socinfo->dbg_root, in socinfo_debugfs_init()
535 &qcom_socinfo->info.accessory_chip); in socinfo_debugfs_init()
538 qcom_socinfo->info.plat_ver = __le32_to_cpu(info->plat_ver); in socinfo_debugfs_init()
541 qcom_socinfo->dbg_root, in socinfo_debugfs_init()
542 &qcom_socinfo->info.plat_ver); in socinfo_debugfs_init()
545 qcom_socinfo->info.hw_plat = __le32_to_cpu(info->hw_plat); in socinfo_debugfs_init()
548 qcom_socinfo->dbg_root, in socinfo_debugfs_init()
549 &qcom_socinfo->info.hw_plat); in socinfo_debugfs_init()
552 qcom_socinfo->info.raw_ver = __le32_to_cpu(info->raw_ver); in socinfo_debugfs_init()
554 debugfs_create_u32("raw_version", 0444, qcom_socinfo->dbg_root, in socinfo_debugfs_init()
555 &qcom_socinfo->info.raw_ver); in socinfo_debugfs_init()
570 qcom_socinfo->dbg_root); in socinfo_debugfs_init()
582 debugfs_remove_recursive(qcom_socinfo->dbg_root); in socinfo_debugfs_exit()
601 dev_err(&pdev->dev, "Couldn't find socinfo\n"); in qcom_socinfo_probe()
605 qs = devm_kzalloc(&pdev->dev, sizeof(*qs), GFP_KERNEL); in qcom_socinfo_probe()
607 return -ENOMEM; in qcom_socinfo_probe()
609 qs->attr.family = "Snapdragon"; in qcom_socinfo_probe()
610 qs->attr.machine = socinfo_machine(&pdev->dev, in qcom_socinfo_probe()
611 le32_to_cpu(info->id)); in qcom_socinfo_probe()
612 qs->attr.soc_id = devm_kasprintf(&pdev->dev, GFP_KERNEL, "%u", in qcom_socinfo_probe()
613 le32_to_cpu(info->id)); in qcom_socinfo_probe()
614 qs->attr.revision = devm_kasprintf(&pdev->dev, GFP_KERNEL, "%u.%u", in qcom_socinfo_probe()
615 SOCINFO_MAJOR(le32_to_cpu(info->ver)), in qcom_socinfo_probe()
616 SOCINFO_MINOR(le32_to_cpu(info->ver))); in qcom_socinfo_probe()
618 qs->attr.serial_number = devm_kasprintf(&pdev->dev, GFP_KERNEL, in qcom_socinfo_probe()
620 le32_to_cpu(info->serial_num)); in qcom_socinfo_probe()
622 qs->soc_dev = soc_device_register(&qs->attr); in qcom_socinfo_probe()
623 if (IS_ERR(qs->soc_dev)) in qcom_socinfo_probe()
624 return PTR_ERR(qs->soc_dev); in qcom_socinfo_probe()
640 soc_device_unregister(qs->soc_dev); in qcom_socinfo_remove()
651 .name = "qcom-socinfo",
659 MODULE_ALIAS("platform:qcom-socinfo");