linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@gmail.com>
To: Jon Hunter <jonathanh@nvidia.com>
Cc: linux-tegra@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 6/9] soc/tegra: fuse: Implement tegra_is_silicon()
Date: Tue, 15 Sep 2020 14:38:47 +0200	[thread overview]
Message-ID: <20200915123847.GB3496938@ulmo> (raw)
In-Reply-To: <c3bff9d8-7b74-3614-177a-09efcc05982f@nvidia.com>


[-- Attachment #1.1: Type: text/plain, Size: 1349 bytes --]

On Mon, Sep 07, 2020 at 08:32:08PM +0100, Jon Hunter wrote:
> 
> On 16/07/2020 15:18, Thierry Reding wrote:
> > From: Thierry Reding <treding@nvidia.com>
> > 
> > This function can be used by drivers to determine whether code is
> > running on silicon or on a simulation platform.
> > 
> > Signed-off-by: Thierry Reding <treding@nvidia.com>
> > ---
> >  drivers/soc/tegra/fuse/tegra-apbmisc.c | 13 +++++++++++++
> >  include/soc/tegra/fuse.h               |  1 +
> >  2 files changed, 14 insertions(+)
> > 
> > diff --git a/drivers/soc/tegra/fuse/tegra-apbmisc.c b/drivers/soc/tegra/fuse/tegra-apbmisc.c
> > index 89f1479b4d0e..be6b7fc169ca 100644
> > --- a/drivers/soc/tegra/fuse/tegra-apbmisc.c
> > +++ b/drivers/soc/tegra/fuse/tegra-apbmisc.c
> > @@ -52,6 +52,19 @@ u8 tegra_get_platform(void)
> >  	return (tegra_read_chipid() >> 20) & 0xf;
> >  }
> >  
> > +bool tegra_is_silicon(void)
> > +{
> > +	switch (tegra_get_chip_id()) {
> > +	case TEGRA194:
> > +		if (tegra_get_platform() == 0)
> > +			return true;
> > +
> > +		return false;
> > +	}
> > +
> > +	return false;
> > +}
> > +
> 
> Should we do this the other way around and default to is-silicon?
> 
> For devices prior to Tegra194, this will always return false.

Yes, that's definitely a bug. I'll address that in the next version.

Thierry

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-09-15 12:40 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-16 14:18 [PATCH 0/9] arm64: tegra: Initial Tegra234 VDK support Thierry Reding
2020-07-16 14:18 ` [PATCH 1/9] dt-bindings: tegra: Add Tegra234 VDK compatible Thierry Reding
2020-09-07 19:29   ` Jon Hunter
2020-07-16 14:18 ` [PATCH 2/9] dt-bindings: fuse: tegra: Add missing compatible strings Thierry Reding
2020-09-07 19:29   ` Jon Hunter
2020-07-16 14:18 ` [PATCH 3/9] dt-bindings: fuse: tegra: Document Tegra234 compatible string Thierry Reding
2020-09-07 19:30   ` Jon Hunter
2020-07-16 14:18 ` [PATCH 4/9] soc/tegra: fuse: Add Tegra186 and Tegra194 SoC IDs Thierry Reding
2020-07-16 14:18 ` [PATCH 5/9] soc/tegra: fuse: Extract tegra_get_platform() Thierry Reding
2020-09-07 19:30   ` Jon Hunter
2020-07-16 14:18 ` [PATCH 6/9] soc/tegra: fuse: Implement tegra_is_silicon() Thierry Reding
2020-09-07 19:32   ` Jon Hunter
2020-09-15 12:38     ` Thierry Reding [this message]
2020-07-16 14:18 ` [PATCH 7/9] soc/tegra: fuse: Add Tegra234 support Thierry Reding
2020-09-07 19:39   ` Jon Hunter
2020-07-16 14:18 ` [PATCH 8/9] firmware: tegra: Enable BPMP support on Tegra234 Thierry Reding
2020-09-07 19:43   ` Jon Hunter
2020-07-16 14:18 ` [PATCH 9/9] arm64: tegra: Initial Tegra234 VDK support Thierry Reding
2020-09-07 19:46   ` Jon Hunter
2020-09-15 12:44     ` Thierry Reding
2020-09-15 13:17       ` Jon Hunter
2020-09-15 13:49         ` Thierry Reding

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=20200915123847.GB3496938@ulmo \
    --to=thierry.reding@gmail.com \
    --cc=jonathanh@nvidia.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-tegra@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).