mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Akshay Gupta <akshay.gupta@amd.com>
To: <linux-kernel@vger.kernel.org>, <linux-hwmon@vger.kernel.org>
Cc: <gregkh@linuxfoundation.org>, <arnd@arndb.de>,
	<linux@roeck-us.net>, <Anand.Umarji@amd.com>,
	Akshay Gupta <akshay.gupta@amd.com>,
	"Naveen Krishna Chatradhi" <naveenkrishna.chatradhi@amd.com>
Subject: [PATCH v2 4/6] misc: amd-sbi: CPUID/MCAMSR protocol for Revision 0x21
Date: Mon, 15 Sep 2025 10:36:47 +0000	[thread overview]
Message-ID: <20250915103649.1705078-4-akshay.gupta@amd.com> (raw)
In-Reply-To: <20250915103649.1705078-1-akshay.gupta@amd.com>

- CPUID and MCAMSR protocol for newer platform with revision
  0x21 and later is modified as per two byte register address size.
- Modify the CPUID and MCAMSR protocol to return error, "-EOPNOTSUPP",
  for revision 0x21.
- Next set of patches will add support for CPUID and MCAMSR for Turin and
  later platforms.

Reviewed-by: Naveen Krishna Chatradhi <naveenkrishna.chatradhi@amd.com>
Signed-off-by: Akshay Gupta <akshay.gupta@amd.com>
---
Changes since v1:
 - New patch
 drivers/misc/amd-sbi/rmi-core.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/misc/amd-sbi/rmi-core.c b/drivers/misc/amd-sbi/rmi-core.c
index 3dec2fc00124..bf534ba757db 100644
--- a/drivers/misc/amd-sbi/rmi-core.c
+++ b/drivers/misc/amd-sbi/rmi-core.c
@@ -122,8 +122,8 @@ static int rmi_cpuid_read(struct sbrmi_data *data,
 		if (ret < 0)
 			goto exit_unlock;
 	}
-	/* CPUID protocol for REV 0x10 is not supported*/
-	if (data->rev == 0x10) {
+	/* CPUID protocol for REV 0x20 is only supported*/
+	if (data->rev != 0x20) {
 		ret = -EOPNOTSUPP;
 		goto exit_unlock;
 	}
@@ -203,8 +203,8 @@ static int rmi_mca_msr_read(struct sbrmi_data *data,
 		if (ret < 0)
 			goto exit_unlock;
 	}
-	/* MCA MSR protocol for REV 0x10 is not supported*/
-	if (data->rev == 0x10) {
+	/* MCA MSR protocol for REV 0x20 is supported*/
+	if (data->rev != 0x20) {
 		ret = -EOPNOTSUPP;
 		goto exit_unlock;
 	}
-- 
2.25.1


  parent reply	other threads:[~2025-09-15 10:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-15 10:36 [PATCH v2 1/6] misc: amd-sbi: Add helper function to prepare I3C support Akshay Gupta
2025-09-15 10:36 ` [PATCH v2 2/6] misc: amd-sbi: Add support for SB-RMI over I3C Akshay Gupta
2025-09-15 10:36 ` [PATCH v2 3/6] misc: amd-sbi: Add support for Turin platform Akshay Gupta
2025-09-15 10:36 ` Akshay Gupta [this message]
2025-09-15 10:36 ` [PATCH v2 5/6] misc: amd-sbi: Extend support for CPUID protocol for rev 0x21 Akshay Gupta
2025-09-15 10:36 ` [PATCH v2 6/6] misc: amd-sbi: Extend support for MCAMSR " Akshay Gupta

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=20250915103649.1705078-4-akshay.gupta@amd.com \
    --to=akshay.gupta@amd.com \
    --cc=Anand.Umarji@amd.com \
    --cc=arnd@arndb.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=naveenkrishna.chatradhi@amd.com \
    /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

all inboxes | Powered by JetHome®