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.
64 [SMEM_IMAGE_TABLE_RPM_INDEX] = "rpm",
185 { 126, "MSM8974" },
198 { 208, "APQ8074-AA" },
199 { 209, "APQ8074-AB" },
201 { 211, "MSM8274-AA" },
202 { 212, "MSM8274-AB" },
204 { 214, "MSM8674-AA" },
205 { 215, "MSM8674-AB" },
207 { 217, "MSM8974-AA" },
208 { 218, "MSM8974-AB" },
250 return single_open(file, _func, inode->i_private); \
262 qcom_socinfo->dbg_root, \
268 struct socinfo *socinfo = seq->private; in qcom_show_build_id()
270 seq_printf(seq, "%s\n", socinfo->build_id); in qcom_show_build_id()
277 struct socinfo *socinfo = seq->private; in qcom_show_pmic_model()
278 int model = SOCINFO_MINOR(le32_to_cpu(socinfo->pmic_model)); in qcom_show_pmic_model()
281 return -EINVAL; in qcom_show_pmic_model()
293 struct socinfo *socinfo = seq->private; in qcom_show_pmic_die_revision()
296 SOCINFO_MAJOR(le32_to_cpu(socinfo->pmic_die_rev)), in qcom_show_pmic_die_revision()
297 SOCINFO_MINOR(le32_to_cpu(socinfo->pmic_die_rev))); in qcom_show_pmic_die_revision()
304 struct socinfo *socinfo = seq->private; in qcom_show_chip_id()
306 seq_printf(seq, "%s\n", socinfo->chip_id); in qcom_show_chip_id()
319 struct smem_image_version *image_version = seq->private; \
320 seq_puts(seq, image_version->type); \
326 return single_open(file, show_image_##type, inode->i_private); \
348 qcom_socinfo->dbg_root = debugfs_create_dir("qcom_socinfo", NULL); in socinfo_debugfs_init()
350 qcom_socinfo->info.fmt = __le32_to_cpu(info->fmt); in socinfo_debugfs_init()
352 debugfs_create_x32("info_fmt", 0400, qcom_socinfo->dbg_root, in socinfo_debugfs_init()
353 &qcom_socinfo->info.fmt); in socinfo_debugfs_init()
355 switch (qcom_socinfo->info.fmt) { in socinfo_debugfs_init()
357 qcom_socinfo->info.nmodem_supported = __le32_to_cpu(info->nmodem_supported); in socinfo_debugfs_init()
359 debugfs_create_u32("nmodem_supported", 0400, qcom_socinfo->dbg_root, in socinfo_debugfs_init()
360 &qcom_socinfo->info.nmodem_supported); in socinfo_debugfs_init()
363 qcom_socinfo->info.num_clusters = __le32_to_cpu(info->num_clusters); in socinfo_debugfs_init()
364 qcom_socinfo->info.ncluster_array_offset = __le32_to_cpu(info->ncluster_array_offset); in socinfo_debugfs_init()
365 qcom_socinfo->info.num_defective_parts = __le32_to_cpu(info->num_defective_parts); in socinfo_debugfs_init()
366 …qcom_socinfo->info.ndefective_parts_array_offset = __le32_to_cpu(info->ndefective_parts_array_offs… in socinfo_debugfs_init()
368 debugfs_create_u32("num_clusters", 0400, qcom_socinfo->dbg_root, in socinfo_debugfs_init()
369 &qcom_socinfo->info.num_clusters); in socinfo_debugfs_init()
370 debugfs_create_u32("ncluster_array_offset", 0400, qcom_socinfo->dbg_root, in socinfo_debugfs_init()
371 &qcom_socinfo->info.ncluster_array_offset); in socinfo_debugfs_init()
372 debugfs_create_u32("num_defective_parts", 0400, qcom_socinfo->dbg_root, in socinfo_debugfs_init()
373 &qcom_socinfo->info.num_defective_parts); in socinfo_debugfs_init()
374 debugfs_create_u32("ndefective_parts_array_offset", 0400, qcom_socinfo->dbg_root, in socinfo_debugfs_init()
375 &qcom_socinfo->info.ndefective_parts_array_offset); in socinfo_debugfs_init()
378 qcom_socinfo->info.nproduct_id = __le32_to_cpu(info->nproduct_id); in socinfo_debugfs_init()
380 debugfs_create_u32("nproduct_id", 0400, qcom_socinfo->dbg_root, in socinfo_debugfs_init()
381 &qcom_socinfo->info.nproduct_id); in socinfo_debugfs_init()
385 qcom_socinfo->info.chip_family = in socinfo_debugfs_init()
386 __le32_to_cpu(info->chip_family); in socinfo_debugfs_init()
387 qcom_socinfo->info.raw_device_family = in socinfo_debugfs_init()
388 __le32_to_cpu(info->raw_device_family); in socinfo_debugfs_init()
389 qcom_socinfo->info.raw_device_num = in socinfo_debugfs_init()
390 __le32_to_cpu(info->raw_device_num); in socinfo_debugfs_init()
392 debugfs_create_x32("chip_family", 0400, qcom_socinfo->dbg_root, in socinfo_debugfs_init()
393 &qcom_socinfo->info.chip_family); in socinfo_debugfs_init()
395 qcom_socinfo->dbg_root, in socinfo_debugfs_init()
396 &qcom_socinfo->info.raw_device_family); in socinfo_debugfs_init()
398 qcom_socinfo->dbg_root, in socinfo_debugfs_init()
399 &qcom_socinfo->info.raw_device_num); in socinfo_debugfs_init()
404 qcom_socinfo->info.foundry_id = __le32_to_cpu(info->foundry_id); in socinfo_debugfs_init()
406 debugfs_create_u32("foundry_id", 0400, qcom_socinfo->dbg_root, in socinfo_debugfs_init()
407 &qcom_socinfo->info.foundry_id); in socinfo_debugfs_init()
415 qcom_socinfo->info.hw_plat_subtype = in socinfo_debugfs_init()
416 __le32_to_cpu(info->hw_plat_subtype); in socinfo_debugfs_init()
419 qcom_socinfo->dbg_root, in socinfo_debugfs_init()
420 &qcom_socinfo->info.hw_plat_subtype); in socinfo_debugfs_init()
423 qcom_socinfo->info.accessory_chip = in socinfo_debugfs_init()
424 __le32_to_cpu(info->accessory_chip); in socinfo_debugfs_init()
427 qcom_socinfo->dbg_root, in socinfo_debugfs_init()
428 &qcom_socinfo->info.accessory_chip); in socinfo_debugfs_init()
431 qcom_socinfo->info.plat_ver = __le32_to_cpu(info->plat_ver); in socinfo_debugfs_init()
434 qcom_socinfo->dbg_root, in socinfo_debugfs_init()
435 &qcom_socinfo->info.plat_ver); in socinfo_debugfs_init()
438 qcom_socinfo->info.hw_plat = __le32_to_cpu(info->hw_plat); in socinfo_debugfs_init()
441 qcom_socinfo->dbg_root, in socinfo_debugfs_init()
442 &qcom_socinfo->info.hw_plat); in socinfo_debugfs_init()
445 qcom_socinfo->info.raw_ver = __le32_to_cpu(info->raw_ver); in socinfo_debugfs_init()
447 debugfs_create_u32("raw_version", 0400, qcom_socinfo->dbg_root, in socinfo_debugfs_init()
448 &qcom_socinfo->info.raw_ver); in socinfo_debugfs_init()
463 qcom_socinfo->dbg_root); in socinfo_debugfs_init()
475 debugfs_remove_recursive(qcom_socinfo->dbg_root); in socinfo_debugfs_exit()
494 dev_err(&pdev->dev, "Couldn't find socinfo\n"); in qcom_socinfo_probe()
498 qs = devm_kzalloc(&pdev->dev, sizeof(*qs), GFP_KERNEL); in qcom_socinfo_probe()
500 return -ENOMEM; in qcom_socinfo_probe()
502 qs->attr.family = "Snapdragon"; in qcom_socinfo_probe()
503 qs->attr.machine = socinfo_machine(&pdev->dev, in qcom_socinfo_probe()
504 le32_to_cpu(info->id)); in qcom_socinfo_probe()
505 qs->attr.soc_id = devm_kasprintf(&pdev->dev, GFP_KERNEL, "%u", in qcom_socinfo_probe()
506 le32_to_cpu(info->id)); in qcom_socinfo_probe()
507 qs->attr.revision = devm_kasprintf(&pdev->dev, GFP_KERNEL, "%u.%u", in qcom_socinfo_probe()
508 SOCINFO_MAJOR(le32_to_cpu(info->ver)), in qcom_socinfo_probe()
509 SOCINFO_MINOR(le32_to_cpu(info->ver))); in qcom_socinfo_probe()
511 qs->attr.serial_number = devm_kasprintf(&pdev->dev, GFP_KERNEL, in qcom_socinfo_probe()
513 le32_to_cpu(info->serial_num)); in qcom_socinfo_probe()
515 qs->soc_dev = soc_device_register(&qs->attr); in qcom_socinfo_probe()
516 if (IS_ERR(qs->soc_dev)) in qcom_socinfo_probe()
517 return PTR_ERR(qs->soc_dev); in qcom_socinfo_probe()
524 platform_set_drvdata(pdev, qs->soc_dev); in qcom_socinfo_probe()
533 soc_device_unregister(qs->soc_dev); in qcom_socinfo_remove()
544 .name = "qcom-socinfo",
552 MODULE_ALIAS("platform:qcom-socinfo");