summaryrefslogtreecommitdiff
path: root/include/linux/soc
diff options
context:
space:
mode:
authorKonrad Dybcio <konrad.dybcio@linaro.org>2024-06-05 22:10:14 +0200
committerBjorn Andersson <andersson@kernel.org>2024-06-21 00:15:34 -0500
commit9267997fa7aa0b597e8b32cb3fdfe91be1d35a83 (patch)
tree2933e19633f91529afee8620e1404e2e24f51c00 /include/linux/soc
parent158ed777e330e9bf6bd592daaf1e860d965ec8b5 (diff)
soc: qcom: Move some socinfo defines to the header
In preparation for parsing the chip "feature code" (FC) and "product code" (PC) (essentially the parameters that let us conclusively characterize the sillicon we're running on, including various speed bins), move the socinfo version defines to the public header. Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org> Link: https://lore.kernel.org/r/20240605-topic-smem_speedbin-v2-1-8989d7e3d176@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Diffstat (limited to 'include/linux/soc')
-rw-r--r--include/linux/soc/qcom/socinfo.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/soc/qcom/socinfo.h b/include/linux/soc/qcom/socinfo.h
index e78777bb0f4a..10e0a4c287f4 100644
--- a/include/linux/soc/qcom/socinfo.h
+++ b/include/linux/soc/qcom/socinfo.h
@@ -12,6 +12,14 @@
#define SMEM_SOCINFO_BUILD_ID_LENGTH 32
#define SMEM_SOCINFO_CHIP_ID_LENGTH 32
+/*
+ * SoC version type with major number in the upper 16 bits and minor
+ * number in the lower 16 bits.
+ */
+#define SOCINFO_MAJOR(ver) (((ver) >> 16) & 0xffff)
+#define SOCINFO_MINOR(ver) ((ver) & 0xffff)
+#define SOCINFO_VERSION(maj, min) ((((maj) & 0xffff) << 16)|((min) & 0xffff))
+
/* Socinfo SMEM item structure */
struct socinfo {
__le32 fmt;