All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
To: <hdegoede@redhat.com>, <ilpo.jarvinen@linux.intel.com>,
	<markgross@kernel.org>
Cc: <Sanket.Goswami@amd.com>, <mario.limonciello@amd.com>,
	<platform-driver-x86@vger.kernel.org>,
	Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Subject: [PATCH v2 3/6] platform/x86/amd/pmc: call amd_pmc_get_ip_info() during driver probe
Date: Thu, 28 Dec 2023 15:51:01 +0530	[thread overview]
Message-ID: <20231228102104.1785383-4-Shyam-sundar.S-k@amd.com> (raw)
In-Reply-To: <20231228102104.1785383-1-Shyam-sundar.S-k@amd.com>

In the current code, amd_pmc_get_ip_info() is being called from
amd_pmc_s2d_init() and that code block gets enabled only when the STB is
being enabled.

But the information from amd_pmc_get_ip_info() will be required outside of
STB usecase. Hence move this call into driver probe sequence.

Signed-off-by: Sanket Goswami <Sanket.Goswami@amd.com>
Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
---
 drivers/platform/x86/amd/pmc/pmc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/platform/x86/amd/pmc/pmc.c b/drivers/platform/x86/amd/pmc/pmc.c
index 0511b7f3c2b7..6d6e5b9e56d8 100644
--- a/drivers/platform/x86/amd/pmc/pmc.c
+++ b/drivers/platform/x86/amd/pmc/pmc.c
@@ -980,9 +980,6 @@ static int amd_pmc_s2d_init(struct amd_pmc_dev *dev)
 	/* Spill to DRAM feature uses separate SMU message port */
 	dev->msg_port = 1;
 
-	/* Get num of IP blocks within the SoC */
-	amd_pmc_get_ip_info(dev);
-
 	amd_pmc_send_cmd(dev, S2D_TELEMETRY_SIZE, &size, dev->s2d_msg_id, true);
 	if (size != S2D_TELEMETRY_BYTES_MAX)
 		return -EIO;
@@ -1090,6 +1087,9 @@ static int amd_pmc_probe(struct platform_device *pdev)
 
 	mutex_init(&dev->lock);
 
+	/* Get num of IP blocks within the SoC */
+	amd_pmc_get_ip_info(dev);
+
 	if (enable_stb && amd_pmc_is_stb_supported(dev)) {
 		err = amd_pmc_s2d_init(dev);
 		if (err)
-- 
2.25.1


  parent reply	other threads:[~2023-12-28 10:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-28 10:20 [PATCH v2 0/6] platform/x86/amd/pmc: Updates to amd-pmc driver Shyam Sundar S K
2023-12-28 10:20 ` [PATCH v2 1/6] platform/x86/amd/pmc: Send OS_HINT command for AMDI000A platform Shyam Sundar S K
2023-12-28 10:21 ` [PATCH v2 2/6] platform/x86/amd/pmc: Add VPE information " Shyam Sundar S K
2023-12-28 10:21 ` Shyam Sundar S K [this message]
2023-12-28 10:21 ` [PATCH v2 4/6] platform/x86/amd/pmc: Add idlemask support for 1Ah family Shyam Sundar S K
2023-12-28 10:21 ` [PATCH v2 5/6] platform/x86/amd/pmc: Add 1Ah family series to STB support list Shyam Sundar S K
2023-12-28 10:21 ` [PATCH v2 6/6] platform/x86/amd/pmc: Modify SMU message port for latest AMD platform Shyam Sundar S K
2023-12-29 13:47 ` [PATCH v2 0/6] platform/x86/amd/pmc: Updates to amd-pmc driver Ilpo Järvinen
2024-01-02 12:42   ` Hans de Goede

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=20231228102104.1785383-4-Shyam-sundar.S-k@amd.com \
    --to=shyam-sundar.s-k@amd.com \
    --cc=Sanket.Goswami@amd.com \
    --cc=hdegoede@redhat.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=mario.limonciello@amd.com \
    --cc=markgross@kernel.org \
    --cc=platform-driver-x86@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.