Linux Tegra architecture development
 help / color / mirror / Atom feed
From: Jon Hunter <jonathanh@nvidia.com>
To: Kartik <kkartik@nvidia.com>,
	thierry.reding@gmail.com, digetx@gmail.com,
	ndesaulniers@google.com, ulf.hansson@linaro.org, arnd@arndb.de,
	skamble@nvidia.com, windhl@126.com, sumitg@nvidia.com,
	linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] soc/tegra: fuse: use platform info with soc revision
Date: Wed, 9 Nov 2022 10:53:45 +0000	[thread overview]
Message-ID: <44a040d5-529e-e4d6-4745-15a6d59a04f2@nvidia.com> (raw)
In-Reply-To: <62cc53ae-a615-e138-e22c-fe3a4018efde@nvidia.com>


On 09/11/2022 10:51, Jon Hunter wrote:
> 
> 
> On 09/11/2022 06:26, Kartik wrote:
>> Tegra pre-silicon platforms do not have chip revisions. This makes the
>> revision soc attribute meaningless on these platforms.
>>
>> Instead, populate the revision soc attribute with
>> "platform name + chip revision" for Silicon. For pre-silicon platforms
>> populate it with "platform name" instead.
>>
>> Signed-off-by: Kartik <kkartik@nvidia.com>
>> ---
>> v1->v2:
>>   * Updated commit message.
>>
>>   drivers/soc/tegra/fuse/fuse-tegra.c    | 23 +++++++++++++++++++++--
>>   drivers/soc/tegra/fuse/tegra-apbmisc.c |  1 +
>>   include/soc/tegra/fuse.h               | 15 +++++++++++++++
>>   3 files changed, 37 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/soc/tegra/fuse/fuse-tegra.c 
>> b/drivers/soc/tegra/fuse/fuse-tegra.c
>> index ea25a1dcafc2..a20c9e0105dc 100644
>> --- a/drivers/soc/tegra/fuse/fuse-tegra.c
>> +++ b/drivers/soc/tegra/fuse/fuse-tegra.c
>> @@ -35,6 +35,19 @@ static const char 
>> *tegra_revision_name[TEGRA_REVISION_MAX] = {
>>       [TEGRA_REVISION_A04]     = "A04",
>>   };
>> +static const char *tegra_platform_name[TEGRA_PLATFORM_MAX] = {
>> +    [TEGRA_PLATFORM_SILICON]            = "Silicon",
>> +    [TEGRA_PLATFORM_QT]                = "QT",
>> +    [TEGRA_PLATFORM_SYSTEM_FPGA]            = "System FPGA",
>> +    [TEGRA_PLATFORM_UNIT_FPGA]            = "Unit FPGA",
>> +    [TEGRA_PLATFORM_ASIM_QT]            = "Asim QT",
>> +    [TEGRA_PLATFORM_ASIM_LINSIM]            = "Asim Linsim",
>> +    [TEGRA_PLATFORM_DSIM_ASIM_LINSIM]        = "Dsim Asim Linsim",
>> +    [TEGRA_PLATFORM_VERIFICATION_SIMULATION]    = "Verification 
>> Simulation",
>> +    [TEGRA_PLATFORM_VDK]                = "VDK",
>> +    [TEGRA_PLATFORM_VSP]                = "VSP",
>> +};
>> +
>>   static const struct of_device_id car_match[] __initconst = {
>>       { .compatible = "nvidia,tegra20-car", },
>>       { .compatible = "nvidia,tegra30-car", },
>> @@ -370,8 +383,14 @@ struct device * __init 
>> tegra_soc_device_register(void)
>>           return NULL;
>>       attr->family = kasprintf(GFP_KERNEL, "Tegra");
>> -    attr->revision = kasprintf(GFP_KERNEL, "%s",
>> -        tegra_revision_name[tegra_sku_info.revision]);
>> +    if (tegra_is_silicon()) {
> 
> curly braces are not needed.
> 
>> +        attr->revision = kasprintf(GFP_KERNEL, "%s %s",
>> +                       tegra_platform_name[tegra_sku_info.platform],
> 
> Do we need to include platform here? Can't we just print the revision?

Actually, printing something like "Silicon A02" here is fine. No need to 
change.

Jon

-- 
nvpublic

      reply	other threads:[~2022-11-09 10:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-09  6:26 [PATCH v2] soc/tegra: fuse: use platform info with soc revision Kartik
2022-11-09 10:51 ` Jon Hunter
2022-11-09 10:53   ` Jon Hunter [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44a040d5-529e-e4d6-4745-15a6d59a04f2@nvidia.com \
    --to=jonathanh@nvidia.com \
    --cc=arnd@arndb.de \
    --cc=digetx@gmail.com \
    --cc=kkartik@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=skamble@nvidia.com \
    --cc=sumitg@nvidia.com \
    --cc=thierry.reding@gmail.com \
    --cc=ulf.hansson@linaro.org \
    --cc=windhl@126.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox