]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
soc: samsung: exynos-chipid: Pass revision reg offsets
authorSam Protsenko <semen.protsenko@linaro.org>
Thu, 14 Oct 2021 13:35:06 +0000 (16:35 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 May 2025 05:44:26 +0000 (07:44 +0200)
commitc6f24e85919ee9b04018fc380ba59d83ff55213d
tree6f8e92b448e033cde965599b9a2d0b7a9136f229
parent75dd8356b6816ec1e6ce76f36d18eeb664be50a1
soc: samsung: exynos-chipid: Pass revision reg offsets

[ Upstream commit c072c4ef7ef09e1d6470c48cf52570487589b76a ]

Old Exynos SoCs have both Product ID and Revision ID in one single
register, while new SoCs tend to have two separate registers for those
IDs. Implement handling of both cases by passing Revision ID register
offsets in driver data.

Previously existing macros for Exynos4210 (removed in this patch) were
incorrect:

    #define EXYNOS_SUBREV_MASK         (0xf << 4)
    #define EXYNOS_MAINREV_MASK        (0xf << 0)

Actual format of PRO_ID register in Exynos4210 (offset 0x0):

    [31:12] Product ID
      [9:8] Package information
      [7:4] Main Revision Number
      [3:0] Sub Revision Number

This patch doesn't change the behavior on existing platforms, so
'/sys/devices/soc0/revision' will show the same string as before.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Tested-by: Henrik Grimler <henrik@grimler.se>
Link: https://lore.kernel.org/r/20211014133508.1210-1-semen.protsenko@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Stable-dep-of: c8222ef6cf29 ("soc: samsung: exynos-chipid: Add NULL pointer check in exynos_chipid_probe()")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/soc/samsung/exynos-chipid.c
include/linux/soc/samsung/exynos-chipid.h