Files
openwrt-R7800-nss/target/linux/ipq806x/patches-6.6/990-0037-fix-socinfo.patch
SqTER-PL 5536c2039e Updated and refreshed patches.
Renamed patches to keep their original numbering from codelinaro.org
Fixed minor bugs and added support for the qca-nss-drv-l2tpv2 module
2025-08-04 18:52:30 +02:00

39 lines
1.5 KiB
Diff

--- a/drivers/soc/qcom/socinfo.c
+++ b/drivers/soc/qcom/socinfo.c
@@ -529,11 +529,13 @@ QCOM_OPEN(pmic_die_rev, qcom_show_pmic_d
QCOM_OPEN(chip_id, qcom_show_chip_id);
#define DEFINE_IMAGE_OPS(type) \
-static int show_image_##type(struct seq_file *seq, void *p) \
+static int show_image_##type(struct seq_file *seq, void *p) \
{ \
struct smem_image_version *image_version = seq->private; \
- if (image_version->type[0] != '\0') \
- seq_printf(seq, "%s\n", image_version->type); \
+ if(!image_version && !image_version->type[0]) { \
+ seq_puts(seq, image_version->type); \
+ seq_puts(seq, "\n"); \
+ } \
return 0; \
} \
static int open_image_##type(struct inode *inode, struct file *file) \
@@ -749,7 +751,7 @@ static int qcom_socinfo_probe(struct pla
if (!qs)
return -ENOMEM;
- qs->attr.family = "Snapdragon";
+ qs->attr.family = "IPQ";
qs->attr.machine = socinfo_machine(&pdev->dev,
le32_to_cpu(info->id));
qs->attr.soc_id = devm_kasprintf(&pdev->dev, GFP_KERNEL, "%u",
@@ -772,6 +774,9 @@ static int qcom_socinfo_probe(struct pla
if (IS_ERR(qs->soc_dev))
return PTR_ERR(qs->soc_dev);
+ pr_info("CPU: %s, SoC Version: %s id: %d fmt: %x\n", qs->attr.machine,
+ qs->attr.revision, info->id, qs->info.fmt);
+
socinfo_debugfs_init(qs, info, item_size);
/* Feed the soc specific unique data into entropy pool */