Skip to content

Commit

Permalink
soc: qcom: Move some socinfo defines to the header
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
konradybcio authored and andersson committed Jun 21, 2024
1 parent 158ed77 commit 9267997
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 0 additions & 8 deletions drivers/soc/qcom/socinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,6 @@

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

/*
* 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))

/* Helper macros to create soc_id table */
#define qcom_board_id(id) QCOM_ID_ ## id, __stringify(id)
#define qcom_board_id_named(id, name) QCOM_ID_ ## id, (name)
Expand Down
8 changes: 8 additions & 0 deletions include/linux/soc/qcom/socinfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9267997

Please sign in to comment.