diff options
author | Sudheer Kumar Amrabadi <samrabad@codeaurora.org> | 2022-10-13 08:51:22 +0530 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2022-12-13 14:35:21 +0000 |
commit | 8139fc4be5c52ab10af784733f000650dd848d74 (patch) | |
tree | 0e9def77b5c19e33ca731678426ce458e04752ac /src/soc/qualcomm/sc7280/include | |
parent | 0110e1abe0ba8e723aa21e8e8fdbc4a27294a6b7 (diff) |
soc/qualcomm/sc7280: Add API to differentiate PRO and NON_PRO SKUs
The API socinfo_pro_part() returns 1 for Pro and 0 for NON_PRO SKUs. To
reduce the binary footprint for chipinfo structure, change its members
range from uint32_t to uint16_t. Add helper functions for reading and
matching jtagid. Modified socinfo_modem_supported() API to utilize
helper functions.
BUG=b:248187555
TEST=Validate boards are detected correctly on PRO and NON_PRO SKUs
Signed-off-by: Taniya Das <quic_tdas@quicinc.com>
Change-Id: Id9f23696384a6c1a89000292eafebd8a16c273ca
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68384
Reviewed-by: Shelley Chen <shchen@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/qualcomm/sc7280/include')
-rw-r--r-- | src/soc/qualcomm/sc7280/include/soc/socinfo.h | 37 |
1 files changed, 5 insertions, 32 deletions
diff --git a/src/soc/qualcomm/sc7280/include/soc/socinfo.h b/src/soc/qualcomm/sc7280/include/soc/socinfo.h index 1034bf95f0..e51d7938bd 100644 --- a/src/soc/qualcomm/sc7280/include/soc/socinfo.h +++ b/src/soc/qualcomm/sc7280/include/soc/socinfo.h @@ -1,31 +1,5 @@ /* SPDX-License-Identifier: GPL-2.0-only */ -/** - Chip identification type. Any new ids must be added to the end. - */ - -typedef enum{ - CHIPINFO_ID_UNKNOWN = 0, - CHIPINFO_ID_SM_KODIAK = 475, - CHIPINFO_ID_SC_KODIAK_CHROME = 487, - CHIPINFO_ID_SC_7CPLUSGEN3 = CHIPINFO_ID_SC_KODIAK_CHROME, - CHIPINFO_ID_SC_KODIAK_WINDOWS = 488, - CHIPINFO_ID_QCM_KODIAK = 497, - CHIPINFO_ID_QCS_KODIAK = 498, - CHIPINFO_ID_SMP_KODIAK = 499, - CHIPINFO_ID_SM_KODIAK_LTE_ONLY = 515, - CHIPINFO_ID_SCP_KODIAK = 546, - CHIPINFO_ID_SCP_7CPLUSGEN3 = CHIPINFO_ID_SCP_KODIAK, - CHIPINFO_ID_SC_8CGEN3 = 553, - CHIPINFO_ID_SCP_8CGEN3 = 563, - CHIPINFO_ID_KODIAK_SCP_7CGEN3 = 567, - CHIPINFO_ID_QCS_KODIAK_LITE = 575, - CHIPINFO_ID_QCM_KODIAK_LITE = 576, - - CHIPINFO_NUM_IDS, - CHIPINFO_ID_32BITS = 0x7FFFFFF - } ChipInfoIdType; - /* * CHIPINFO_PARTNUM_* * @@ -46,14 +20,13 @@ typedef enum{ #define CHIPINFO_PARTNUM_QCM_KODIAK_LITE 0x20E -#define CHIPINFO_MODEM_SUPPORTED 0x1 -#define CHIPINFO_MODEM_UNKNOWN 0x0 #define DEVICE_ID 0xFFFF struct chipinfo { - uint32_t chipid; - uint32_t jtagid; - bool modem; + uint16_t jtagid : 14; + uint16_t modem : 1; + uint16_t pro : 1; }; -bool socinfo_modem_supported(void); +uint16_t socinfo_modem_supported(void); +uint16_t socinfo_pro_part(void); |