platform-driver-x86.vger.kernel.org archive mirror
 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 4/6] platform/x86/amd/pmc: Add idlemask support for 20h family
Date: Tue, 26 Dec 2023 13:50:00 +0530	[thread overview]
Message-ID: <20231226082002.1778545-5-Shyam-sundar.S-k@amd.com> (raw)
In-Reply-To: <20231226082002.1778545-1-Shyam-sundar.S-k@amd.com>

Idlemask is an indication of each IP block current state (i.e. whether it
is running or idle) during s2idle transistion. The newer 20h family
supports this feature, add it to the support list.

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 | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/platform/x86/amd/pmc/pmc.c b/drivers/platform/x86/amd/pmc/pmc.c
index 6d6e5b9e56d8..60c95ba5a831 100644
--- a/drivers/platform/x86/amd/pmc/pmc.c
+++ b/drivers/platform/x86/amd/pmc/pmc.c
@@ -38,6 +38,7 @@
 /* PMC Scratch Registers */
 #define AMD_PMC_SCRATCH_REG_CZN		0x94
 #define AMD_PMC_SCRATCH_REG_YC		0xD14
+#define AMD_PMC_SCRATCH_REG_1AH		0xF14
 
 /* STB Registers */
 #define AMD_PMC_STB_PMI_0		0x03E30600
@@ -603,6 +604,9 @@ static int amd_pmc_idlemask_read(struct amd_pmc_dev *pdev, struct device *dev,
 	case AMD_CPU_ID_PS:
 		val = amd_pmc_reg_read(pdev, AMD_PMC_SCRATCH_REG_YC);
 		break;
+	case PCI_DEVICE_ID_AMD_1AH_M20H_ROOT:
+		val = amd_pmc_reg_read(pdev, AMD_PMC_SCRATCH_REG_1AH);
+		break;
 	default:
 		return -EINVAL;
 	}
-- 
2.25.1


  parent reply	other threads:[~2023-12-26  8:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-26  8:19 [PATCH 0/6] platform/x86/amd/pmc: Updates to amd-pmc driver Shyam Sundar S K
2023-12-26  8:19 ` [PATCH 1/6] platform/x86/amd/pmc: Send OS_HINT command for AMDI000A platform Shyam Sundar S K
2023-12-26  8:19 ` [PATCH 2/6] platform/x86/amd/pmc: Add VPE information " Shyam Sundar S K
2023-12-26  8:19 ` [PATCH 3/6] platform/x86/amd/pmc: call amd_pmc_get_ip_info() during driver probe Shyam Sundar S K
2023-12-26  8:20 ` Shyam Sundar S K [this message]
2023-12-26  8:20 ` [PATCH 5/6] platform/x86/amd/pmc: Add 20h family series to STB support list Shyam Sundar S K
2023-12-26  8:20 ` [PATCH 6/6] platform/x86/amd/pmc: Modify SMU message port for latest AMD platform Shyam Sundar S K
2023-12-27  6:34 ` [PATCH 0/6] platform/x86/amd/pmc: Updates to amd-pmc driver Shyam Sundar S K

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=20231226082002.1778545-5-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 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).