[PATCH 1/2] soc: samsung: exynos-chipid: print entire PRO_ID reg when probing
Henrik Grimler
henrik at grimler.se
Sun Oct 31 09:56:44 PDT 2021
Older Exynos socs has one reg PRO_ID containing both product id and
revision information. Newer Exynos socs has one Product_ID reg with
product id, and one CHIPID_REV reg with revision information.
In commit c072c4ef7ef0 ("soc: samsung: exynos-chipid: Pass revision
reg offsets") the driver was changed so that the revision part of
PRO_ID is masked to 0 when printed during probing. This can give a
false impression that the revision is 0, so lets change so entire
PRO_ID reg is printed again.
Signed-off-by: Henrik Grimler <henrik at grimler.se>
---
Has been tested on exynos4412-i9300, which is compatible with
exynos4210-chipid, and on an exynos8895 device compatible with
exynos850-chipid.
---
drivers/soc/samsung/exynos-chipid.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/soc/samsung/exynos-chipid.c b/drivers/soc/samsung/exynos-chipid.c
index a28053ec7e6a..7fe44f71920d 100644
--- a/drivers/soc/samsung/exynos-chipid.c
+++ b/drivers/soc/samsung/exynos-chipid.c
@@ -33,6 +33,7 @@ struct exynos_chipid_variant {
};
struct exynos_chipid_info {
+ u32 pro_id;
u32 product_id;
u32 revision;
};
@@ -79,6 +80,7 @@ static int exynos_chipid_get_chipid_info(struct regmap *regmap,
ret = regmap_read(regmap, EXYNOS_CHIPID_REG_PRO_ID, &val);
if (ret < 0)
return ret;
+ soc_info->pro_id = val;
soc_info->product_id = val & EXYNOS_MASK;
if (data->rev_reg != EXYNOS_CHIPID_REG_PRO_ID) {
@@ -146,7 +148,7 @@ static int exynos_chipid_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, soc_dev);
dev_info(&pdev->dev, "Exynos: CPU[%s] PRO_ID[0x%x] REV[0x%x] Detected\n",
- soc_dev_attr->soc_id, soc_info.product_id, soc_info.revision);
+ soc_dev_attr->soc_id, soc_info.pro_id, soc_info.revision);
return 0;
base-commit: b417d1e88f32645ed62a00d43c347b4386a0a021
--
2.33.1
More information about the linux-arm-kernel
mailing list