* [PATCH] soc: qcom: socinfo: Add support for new field in revision 17
@ 2023-01-25 8:14 Naman Jain
2023-01-25 18:28 ` Trilok Soni
0 siblings, 1 reply; 3+ messages in thread
From: Naman Jain @ 2023-01-25 8:14 UTC (permalink / raw)
To: Bjorn Andersson, Andy Gross, Konrad Dybcio
Cc: linux-arm-msm, linux-kernel, Dmitry Baryshkov, Naman Jain
Add support for new field coming with socinfo structure under v17 to get
hardware platform's oem variant id. This is to enable OEMs to have minor
changes in the board, but to use the same platform subtype as the one
supported by Qualcomm. The new field is to be used in platform overlay
file. Default value is 0, reserved for Qualcomm platforms. Also, add
debugfs support to read this field for a device.
Change-Id: I18f80084bc75466f3fcccd55fd21b37d69245aa6
---
drivers/soc/qcom/socinfo.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/soc/qcom/socinfo.c b/drivers/soc/qcom/socinfo.c
index 10efdbcfdf05..10cdd32ce74d 100644
--- a/drivers/soc/qcom/socinfo.c
+++ b/drivers/soc/qcom/socinfo.c
@@ -174,6 +174,8 @@ struct socinfo {
__le32 pcode;
__le32 npartnamemap_offset;
__le32 nnum_partname_mapping;
+ /* Version 17 */
+ __le32 oem_variant;
};
#ifdef CONFIG_DEBUG_FS
@@ -196,6 +198,7 @@ struct socinfo_params {
u32 nmodem_supported;
u32 feature_code;
u32 pcode;
+ u32 oem_variant;
};
struct smem_image_version {
@@ -519,6 +522,11 @@ static void socinfo_debugfs_init(struct qcom_socinfo *qcom_socinfo,
&qcom_socinfo->info.fmt);
switch (qcom_socinfo->info.fmt) {
+ case SOCINFO_VERSION(0, 17):
+ qcom_socinfo->info.oem_variant = __le32_to_cpu(info->oem_variant);
+ debugfs_create_u32("oem_variant", 0444, qcom_socinfo->dbg_root,
+ &qcom_socinfo->info.oem_variant);
+ fallthrough;
case SOCINFO_VERSION(0, 16):
qcom_socinfo->info.feature_code = __le32_to_cpu(info->feature_code);
qcom_socinfo->info.pcode = __le32_to_cpu(info->pcode);
--
2.17.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] soc: qcom: socinfo: Add support for new field in revision 17
2023-01-25 8:14 [PATCH] soc: qcom: socinfo: Add support for new field in revision 17 Naman Jain
@ 2023-01-25 18:28 ` Trilok Soni
2023-01-27 4:15 ` Naman Jain
0 siblings, 1 reply; 3+ messages in thread
From: Trilok Soni @ 2023-01-25 18:28 UTC (permalink / raw)
To: Naman Jain, Bjorn Andersson, Andy Gross, Konrad Dybcio
Cc: linux-arm-msm, linux-kernel, Dmitry Baryshkov
On 1/25/2023 12:14 AM, Naman Jain wrote:
> Add support for new field coming with socinfo structure under v17 to get
> hardware platform's oem variant id. This is to enable OEMs to have minor
> changes in the board, but to use the same platform subtype as the one
> supported by Qualcomm. The new field is to be used in platform overlay
> file. Default value is 0, reserved for Qualcomm platforms. Also, add
> debugfs support to read this field for a device.
>
> Change-Id: I18f80084bc75466f3fcccd55fd21b37d69245aa6
I don't see SOB line. Please remove Change-ID. Run checkpatch?
> ---
> drivers/soc/qcom/socinfo.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/drivers/soc/qcom/socinfo.c b/drivers/soc/qcom/socinfo.c
> index 10efdbcfdf05..10cdd32ce74d 100644
> --- a/drivers/soc/qcom/socinfo.c
> +++ b/drivers/soc/qcom/socinfo.c
> @@ -174,6 +174,8 @@ struct socinfo {
> __le32 pcode;
> __le32 npartnamemap_offset;
> __le32 nnum_partname_mapping;
> + /* Version 17 */
> + __le32 oem_variant;
> };
>
> #ifdef CONFIG_DEBUG_FS
> @@ -196,6 +198,7 @@ struct socinfo_params {
> u32 nmodem_supported;
> u32 feature_code;
> u32 pcode;
> + u32 oem_variant;
> };
>
> struct smem_image_version {
> @@ -519,6 +522,11 @@ static void socinfo_debugfs_init(struct qcom_socinfo *qcom_socinfo,
> &qcom_socinfo->info.fmt);
>
> switch (qcom_socinfo->info.fmt) {
> + case SOCINFO_VERSION(0, 17):
> + qcom_socinfo->info.oem_variant = __le32_to_cpu(info->oem_variant);
> + debugfs_create_u32("oem_variant", 0444, qcom_socinfo->dbg_root,
> + &qcom_socinfo->info.oem_variant);
> + fallthrough;
> case SOCINFO_VERSION(0, 16):
> qcom_socinfo->info.feature_code = __le32_to_cpu(info->feature_code);
> qcom_socinfo->info.pcode = __le32_to_cpu(info->pcode);
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] soc: qcom: socinfo: Add support for new field in revision 17
2023-01-25 18:28 ` Trilok Soni
@ 2023-01-27 4:15 ` Naman Jain
0 siblings, 0 replies; 3+ messages in thread
From: Naman Jain @ 2023-01-27 4:15 UTC (permalink / raw)
To: Trilok Soni, Bjorn Andersson, Andy Gross, Konrad Dybcio
Cc: linux-arm-msm, linux-kernel, Dmitry Baryshkov
On 1/25/2023 11:58 PM, Trilok Soni wrote:
> On 1/25/2023 12:14 AM, Naman Jain wrote:
>> Add support for new field coming with socinfo structure under v17 to get
>> hardware platform's oem variant id. This is to enable OEMs to have minor
>> changes in the board, but to use the same platform subtype as the one
>> supported by Qualcomm. The new field is to be used in platform overlay
>> file. Default value is 0, reserved for Qualcomm platforms. Also, add
>> debugfs support to read this field for a device.
>>
>> Change-Id: I18f80084bc75466f3fcccd55fd21b37d69245aa6
>
> I don't see SOB line. Please remove Change-ID. Run checkpatch?
SOB line must have been deleted, in place of Change-id, by mistake. I
run checkscript everytime, but somehow it got missed the last time, and
I did not catch this. Sorry for the trouble and thanks for reviewing,
addressed in v2.
>
>> ---
>> drivers/soc/qcom/socinfo.c | 8 ++++++++
>> 1 file changed, 8 insertions(+)
>>
>> diff --git a/drivers/soc/qcom/socinfo.c b/drivers/soc/qcom/socinfo.c
>> index 10efdbcfdf05..10cdd32ce74d 100644
>> --- a/drivers/soc/qcom/socinfo.c
>> +++ b/drivers/soc/qcom/socinfo.c
>> @@ -174,6 +174,8 @@ struct socinfo {
>> __le32 pcode;
>> __le32 npartnamemap_offset;
>> __le32 nnum_partname_mapping;
>> + /* Version 17 */
>> + __le32 oem_variant;
>> };
>> #ifdef CONFIG_DEBUG_FS
>> @@ -196,6 +198,7 @@ struct socinfo_params {
>> u32 nmodem_supported;
>> u32 feature_code;
>> u32 pcode;
>> + u32 oem_variant;
>> };
>> struct smem_image_version {
>> @@ -519,6 +522,11 @@ static void socinfo_debugfs_init(struct
>> qcom_socinfo *qcom_socinfo,
>> &qcom_socinfo->info.fmt);
>> switch (qcom_socinfo->info.fmt) {
>> + case SOCINFO_VERSION(0, 17):
>> + qcom_socinfo->info.oem_variant =
>> __le32_to_cpu(info->oem_variant);
>> + debugfs_create_u32("oem_variant", 0444, qcom_socinfo->dbg_root,
>> + &qcom_socinfo->info.oem_variant);
>> + fallthrough;
>> case SOCINFO_VERSION(0, 16):
>> qcom_socinfo->info.feature_code =
>> __le32_to_cpu(info->feature_code);
>> qcom_socinfo->info.pcode = __le32_to_cpu(info->pcode);
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-01-27 4:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-25 8:14 [PATCH] soc: qcom: socinfo: Add support for new field in revision 17 Naman Jain
2023-01-25 18:28 ` Trilok Soni
2023-01-27 4:15 ` Naman Jain
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®