Skip to content

Commit 9267997

Browse files
konradybcioandersson
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
1 parent 158ed77 commit 9267997

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

drivers/soc/qcom/socinfo.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,6 @@
2121

2222
#include <dt-bindings/arm/qcom,ids.h>
2323

24-
/*
25-
* SoC version type with major number in the upper 16 bits and minor
26-
* number in the lower 16 bits.
27-
*/
28-
#define SOCINFO_MAJOR(ver) (((ver) >> 16) & 0xffff)
29-
#define SOCINFO_MINOR(ver) ((ver) & 0xffff)
30-
#define SOCINFO_VERSION(maj, min) ((((maj) & 0xffff) << 16)|((min) & 0xffff))
31-
3224
/* Helper macros to create soc_id table */
3325
#define qcom_board_id(id) QCOM_ID_ ## id, __stringify(id)
3426
#define qcom_board_id_named(id, name) QCOM_ID_ ## id, (name)

include/linux/soc/qcom/socinfo.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@
1212
#define SMEM_SOCINFO_BUILD_ID_LENGTH 32
1313
#define SMEM_SOCINFO_CHIP_ID_LENGTH 32
1414

15+
/*
16+
* SoC version type with major number in the upper 16 bits and minor
17+
* number in the lower 16 bits.
18+
*/
19+
#define SOCINFO_MAJOR(ver) (((ver) >> 16) & 0xffff)
20+
#define SOCINFO_MINOR(ver) ((ver) & 0xffff)
21+
#define SOCINFO_VERSION(maj, min) ((((maj) & 0xffff) << 16)|((min) & 0xffff))
22+
1523
/* Socinfo SMEM item structure */
1624
struct socinfo {
1725
__le32 fmt;

0 commit comments

Comments
 (0)