linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Kartik <kkartik@nvidia.com>
To: <thierry.reding@gmail.com>, <jonathanh@nvidia.com>,
	<keescook@chromium.org>, <andy@kernel.org>,
	<akpm@linux-foundation.org>, <arnd@arndb.de>,
	<ulf.hansson@linaro.org>, <linus.walleij@linaro.org>,
	<kkartik@nvidia.com>, <pshete@nvidia.com>, <petlozup@nvidia.com>,
	<frank.li@vivo.com>, <robh@kernel.org>, <stefank@nvidia.com>,
	<pdeschrijver@nvidia.com>, <christophe.jaillet@wanadoo.fr>,
	<linux-tegra@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-hardening@vger.kernel.org>, <linux-mm@kvack.org>
Subject: [PATCH v7 6/8] soc/tegra: fuse: Add function to print SKU info
Date: Tue, 17 Oct 2023 10:53:20 +0530	[thread overview]
Message-ID: <20231017052322.2636-7-kkartik@nvidia.com> (raw)
In-Reply-To: <20231017052322.2636-1-kkartik@nvidia.com>

Add helper function tegra_fuse_print_sku_info() to print Tegra SKU
information. So, it can be shared between tegra_fuse_init() and
ACPI probe which is to be introduced later.

Signed-off-by: Kartik <kkartik@nvidia.com>
---
v1 -> v2:
	* Renamed tegra_fuse_pr_sku_info() as
	  tegra_fuse_print_sku_info().
---
 drivers/soc/tegra/fuse/fuse-tegra.c | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/drivers/soc/tegra/fuse/fuse-tegra.c b/drivers/soc/tegra/fuse/fuse-tegra.c
index 4ebb5597a77b..7a93c6512f7b 100644
--- a/drivers/soc/tegra/fuse/fuse-tegra.c
+++ b/drivers/soc/tegra/fuse/fuse-tegra.c
@@ -113,6 +113,16 @@ static void tegra_fuse_restore(void *base)
 	fuse->clk = NULL;
 }
 
+static void tegra_fuse_print_sku_info(struct tegra_sku_info *tegra_sku_info)
+{
+	pr_info("Tegra Revision: %s SKU: %d CPU Process: %d SoC Process: %d\n",
+		tegra_revision_name[tegra_sku_info->revision],
+		tegra_sku_info->sku_id, tegra_sku_info->cpu_process_id,
+		tegra_sku_info->soc_process_id);
+	pr_debug("Tegra CPU Speedo ID %d, SoC Speedo ID %d\n",
+		tegra_sku_info->cpu_speedo_id, tegra_sku_info->soc_speedo_id);
+}
+
 static int tegra_fuse_add_lookups(struct tegra_fuse *fuse)
 {
 	fuse->lookups = kmemdup_array(fuse->soc->lookups, sizeof(*fuse->lookups),
@@ -501,12 +511,7 @@ static int __init tegra_init_fuse(void)
 
 	fuse->soc->init(fuse);
 
-	pr_info("Tegra Revision: %s SKU: %d CPU Process: %d SoC Process: %d\n",
-		tegra_revision_name[tegra_sku_info.revision],
-		tegra_sku_info.sku_id, tegra_sku_info.cpu_process_id,
-		tegra_sku_info.soc_process_id);
-	pr_debug("Tegra CPU Speedo ID %d, SoC Speedo ID %d\n",
-		 tegra_sku_info.cpu_speedo_id, tegra_sku_info.soc_speedo_id);
+	tegra_fuse_print_sku_info(&tegra_sku_info);
 
 	err = tegra_fuse_add_lookups(fuse);
 	if (err)
-- 
2.34.1



  parent reply	other threads:[~2023-10-17  5:24 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-17  5:23 [PATCH v7 0/8] soc/tegra: fuse: Add ACPI support Kartik
2023-10-17  5:23 ` [PATCH v7 1/8] mm/util: Introduce kmemdup_array() Kartik
2023-10-17  5:23 ` [PATCH v7 2/8] soc/tegra: fuse: Use dev_err_probe for probe failures Kartik
2023-10-17  5:23 ` [PATCH v7 3/8] soc/tegra: fuse: Refactor resource mapping Kartik
2023-10-17  5:23 ` [PATCH v7 4/8] soc/tegra: fuse: Add tegra_acpi_init_apbmisc() Kartik
2023-10-17  5:23 ` [PATCH v7 5/8] soc/tegra: fuse: Add function to add lookups Kartik
2023-10-17  5:23 ` Kartik [this message]
2023-10-17  5:23 ` [PATCH v7 7/8] soc/tegra: fuse: Add ACPI support for Tegra194 and Tegra234 Kartik
2023-10-17  5:23 ` [PATCH v7 8/8] soc/tegra: fuse: Add support for Tegra241 Kartik
2023-12-14 17:08 ` [PATCH v7 0/8] soc/tegra: fuse: Add ACPI support Thierry Reding
2023-12-14 18:43   ` Arnd Bergmann
2023-12-15 16:43     ` Thierry Reding
2023-12-18 10:45       ` Kartik

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=20231017052322.2636-7-kkartik@nvidia.com \
    --to=kkartik@nvidia.com \
    --cc=akpm@linux-foundation.org \
    --cc=andy@kernel.org \
    --cc=arnd@arndb.de \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=frank.li@vivo.com \
    --cc=jonathanh@nvidia.com \
    --cc=keescook@chromium.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=pdeschrijver@nvidia.com \
    --cc=petlozup@nvidia.com \
    --cc=pshete@nvidia.com \
    --cc=robh@kernel.org \
    --cc=stefank@nvidia.com \
    --cc=thierry.reding@gmail.com \
    --cc=ulf.hansson@linaro.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