From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.0 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E2530C433E2 for ; Tue, 15 Sep 2020 12:40:35 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7CAD62068D for ; Tue, 15 Sep 2020 12:40:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="r6xjUqC6"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="qUQOtu4B" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7CAD62068D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Type:Cc: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=l0olDqOghwUBdIti9skweOv6EKHUO6zB+G1F/kbFZkM=; b=r6xjUqC60tuxxYTMN3GCbTsur vMMknAbPeQVeAakAjuDBKabG9UDj1gEska/tKavDhb/cf2jLVUTCHjVxKyCJm28LgGrE3x+FWMIxI OErbhnfDE2qnXVMBpfHqeH79TYODCwhjkvetJ4uwDP3CJS0aYPTmtDQVWV91+jydhFvPkKu2Awmmx qsm+1nU+UxFu5D596lUnmEPzkZawhqYf0Ax1dYe+adnnbK29sPWZmisYBfQ/pHVJCJe+iGO2yqxoa +qeWG2i+xG4z61MUNbkbEG96cGVZeUvIYPAE3s8kMXnkHtmXfNPB1hFcT5ZiZXJfUPhxY+ctyamcT hqYRaW/VQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kIAEg-0001XF-JN; Tue, 15 Sep 2020 12:39:02 +0000 Received: from mail-ej1-x642.google.com ([2a00:1450:4864:20::642]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kIAEZ-0001VW-62 for linux-arm-kernel@lists.infradead.org; Tue, 15 Sep 2020 12:38:56 +0000 Received: by mail-ej1-x642.google.com with SMTP id q13so4777634ejo.9 for ; Tue, 15 Sep 2020 05:38:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=6+eIisxgi/7DBd67MZsvWapYN3hNHSpdCq4Nuq8Zaw4=; b=qUQOtu4BEYo53sNLoAc7L0JBG5WnrTDBsFfcD71gMXqja9EOliFXddaW0sv1SBFmPY rtsp6xgyZQf+WkXAdirmvAwlrE0wt+Vw7pWsji5m4qIeS056mtqqAC/l+XuZDFW1LVUq Fm0qVHMqvZUWe/8q7ZYmP7KwpWLneG8JBXy426AcKhuAMCn3lAGrh01YjOLCI5b3m/dm Wg4O37K7A/SMjIQ0invcjZb9m7aA3Dc5ebGyEB4FX3/OUDNWWbZxcDlzn5+B48fgPUYg 9LnDjNUOLPX4OYDpvF7Y3ADEw9/I35+iudQ2hoJ5zMtpeXeQsEVbn/yiE7xc9JkQODgy ZSEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=6+eIisxgi/7DBd67MZsvWapYN3hNHSpdCq4Nuq8Zaw4=; b=P6l0f30Op6twVoS2RBIEHE16GSuom1t8lXk2ZMbZUeS8fucQUl2gExjQoVdCSHNXeD /Eo/Lha1ODmtBoyKbaeZ0XB11tJEmHwcaob5oJj6q37PiYmY9kawskDGpFOAwKJGPJcp x42SuN9gdwUx8G3thSHsZ56Ro+4pGoG/uHzu7fF60hCcQZfB2qLFENcpF5rdk7xLJ1X8 Q38zPcLXgQoshxQvVsfQLYO/JwpR5pDWCaMeJm3OtRRYjYqp+X/9eLc4R6avsv/DlwqH 0i90y2X4A2acx80mKzCJkGMxw2Lvsbibee+xbz9Q3pTyD/C7Vityr3Hqs+x8QgPli6Ew osNw== X-Gm-Message-State: AOAM530AkUBgMaseNcjwVFPPzWLWCMnJ8aKGs3sZxKs07a9G/6aGbQnW U0adJBFqqrRTa1WFYcpM8ww= X-Google-Smtp-Source: ABdhPJz+iUVGNrROwyyTpilZTJ+fbR5p4UvHc/91zVSLl18UTG9E3EySpa91bwVGTxGl0L9MoPeYBg== X-Received: by 2002:a17:906:4101:: with SMTP id j1mr19152895ejk.473.1600173530064; Tue, 15 Sep 2020 05:38:50 -0700 (PDT) Received: from localhost ([62.96.65.119]) by smtp.gmail.com with ESMTPSA id y9sm10049215ejw.96.2020.09.15.05.38.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 05:38:48 -0700 (PDT) Date: Tue, 15 Sep 2020 14:38:47 +0200 From: Thierry Reding To: Jon Hunter Subject: Re: [PATCH 6/9] soc/tegra: fuse: Implement tegra_is_silicon() Message-ID: <20200915123847.GB3496938@ulmo> References: <20200716141856.544718-1-thierry.reding@gmail.com> <20200716141856.544718-7-thierry.reding@gmail.com> MIME-Version: 1.0 In-Reply-To: User-Agent: Mutt/1.14.6 (2020-07-11) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200915_083855_246671_A930070B X-CRM114-Status: GOOD ( 24.04 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-tegra@vger.kernel.org, linux-arm-kernel@lists.infradead.org Content-Type: multipart/mixed; boundary="===============8400181179900588754==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============8400181179900588754== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ftEhullJWpWg/VHq" Content-Disposition: inline --ftEhullJWpWg/VHq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Sep 07, 2020 at 08:32:08PM +0100, Jon Hunter wrote: >=20 > On 16/07/2020 15:18, Thierry Reding wrote: > > From: Thierry Reding > >=20 > > This function can be used by drivers to determine whether code is > > running on silicon or on a simulation platform. > >=20 > > Signed-off-by: Thierry Reding > > --- > > drivers/soc/tegra/fuse/tegra-apbmisc.c | 13 +++++++++++++ > > include/soc/tegra/fuse.h | 1 + > > 2 files changed, 14 insertions(+) > >=20 > > 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; > > } > > =20 > > +bool tegra_is_silicon(void) > > +{ > > + switch (tegra_get_chip_id()) { > > + case TEGRA194: > > + if (tegra_get_platform() =3D=3D 0) > > + return true; > > + > > + return false; > > + } > > + > > + return false; > > +} > > + >=20 > Should we do this the other way around and default to is-silicon? >=20 > 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 --ftEhullJWpWg/VHq Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAl9gtdYACgkQ3SOs138+ s6Gxbw/+KNqcheX92OY1gA8LeRlSS8dj1ibpigZe+PkxY2mkyymukGtkGsOf6oUt 1AG7tAha6R0kAhoIMy4i4E9Vi5pFxPTN1Jii0BCkGbWpi6QrqwfPWLFDq8v7cUdX Iv00w9zMcO4wPNvsao5tvs3x/71Wbt7H9aLJl7WomVrfFYKLYPgeP7eA3Fmu2VHz dBxckr4sA2xqonEK4Di6PnIEI9AlvKYZHgd7FWYI1HWzpnMYaiMWyvPoJLvip/D1 /pwr2/GTvTYQz3G4YJPVrtDa6Ufcha4TKWGaKJRu/IilCjDzs9qt8XS5EUPmcRn/ Y/BVxv5V3XkxJQfxCUtZ2nLnMJk9cUcsckcG5IvYPBKn83f3IUh7fz/pNv6Ec68u ih2ygolVsa6LoiWOW1UFPow2Lh7yB2fZo6F6f68upMPgOBHSjt6xKKkFQSkkEuZi H9UHVwlpBaSQeI/bLR+VhAiE3dUMlK+0Im1bC/6ToX9OOTZZXLoCCARzOHFGB8Dz UhTPXHEq/FLYjL13m7De4zn6CUV0EJYb3o6WaDUsnJEcHOrMwwUUs0DbohEyzBAC n2aOY+vSdSvX5xyQj33Ug6LIKHGr/wuJG77NV50xiq8dBI9ckkA1OvIUm+Alj4r5 GwspJgJyVIJBHvookw2/wvorsNPsSQEEngL91sV5BRkUx0HuGS0= =oREA -----END PGP SIGNATURE----- --ftEhullJWpWg/VHq-- --===============8400181179900588754== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============8400181179900588754==--