mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Zhengping Zhang <zhengping.zhang@airoha.com>
To: <srini@kernel.org>
Cc: <gregkh@linuxfoundation.org>, <ansuelsmth@gmail.com>,
	<linux-kernel@vger.kernel.org>, <lei.dong@airoha.com>,
	Zhengping Zhang <zhengping.zhang@airoha.com>
Subject: [PATCH] nvmem: airoha-smc-efuses: Fix the SMC function ID for eFuse read
Date: Fri, 30 Oct 2026 10:46:00 +0800	[thread overview]
Message-ID: <20261030024601.678699-1-zhengping.zhang@airoha.com> (raw)

The Airoha firmware uses SMC function ID 0x82000005 for the eFuse
word-read service. The driver currently uses 0x82000001, which does
not select this service and prevents eFuse read from working
correctly.

Use the correct function ID and rename the constant to
AIROHA_SMC_EFUSE_READ_WORD_FID to make the selected operation explicit.

Fixes: b7846af2e6ca ("nvmem: airoha: Add support for SMC eFUSE")

Signed-off-by: Zhengping Zhang <zhengping.zhang@airoha.com>
---
 drivers/nvmem/airoha-smc-efuses.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/nvmem/airoha-smc-efuses.c b/drivers/nvmem/airoha-smc-efuses.c
index e56a99f4aa1f9..7988b2520ffd0 100644
--- a/drivers/nvmem/airoha-smc-efuses.c
+++ b/drivers/nvmem/airoha-smc-efuses.c
@@ -11,7 +11,7 @@
 #include <linux/of.h>
 #include <linux/regmap.h>
 
-#define AIROHA_SMC_EFUSE_FID		0x82000001
+#define AIROHA_SMC_EFUSE_READ_WORD_FID	0x82000005
 #define AIROHA_SMC_EFUSE_SUB_ID_READ	0x44414552
 
 #define AIROHA_EFUSE_CELLS		64
@@ -35,7 +35,7 @@ static int airoha_efuse_reg_read(void *context, unsigned int offset,
 	struct airoha_efuse_bank_priv *priv = context;
 	struct arm_smccc_res res;
 
-	arm_smccc_1_1_invoke(AIROHA_SMC_EFUSE_FID,
+	arm_smccc_1_1_invoke(AIROHA_SMC_EFUSE_READ_WORD_FID,
 			     AIROHA_SMC_EFUSE_SUB_ID_READ,
 			     priv->bank_index, offset, 0, 0, 0, 0, &res);
 
-- 
2.43.0


             reply	other threads:[~2026-10-30  2:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-30  2:46 Zhengping Zhang [this message]
2026-11-27 11:29 ` Srinivas Kandagatla

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=20261030024601.678699-1-zhengping.zhang@airoha.com \
    --to=zhengping.zhang@airoha.com \
    --cc=ansuelsmth@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=lei.dong@airoha.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=srini@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

all inboxes | Powered by JetHome®