From: Rosen Penev <rosenp@gmail.com>
To: linux-mips@vger.kernel.org
Cc: "Rafał Miłecki" <zajec5@gmail.com>,
linux-kernel@vger.kernel.org (open list)
Subject: [PATCH] firmware: bcm47xx_nvram: don't warn when NVRAM is already copied
Date: Fri, 9 Oct 2026 18:12:58 -0700 [thread overview]
Message-ID: <20261010011258.1059235-1-rosenp@gmail.com> (raw)
On MIPS BCM47xx the arch code copies NVRAM very early, because the
board detection and several drivers need it before platform drivers
probe. With a device tree, the brcm_nvram nvmem driver then passes the
same NVRAM to bcm47xx_nvram_init_from_iomem(), which warns on every
boot:
nvram already initialized
The same can happen on ARM when the MTD fallback reads NVRAM before
brcm_nvram probes. In both cases the existing copy is the right one,
so log this at debug level. bcm47xx_nvram_find_and_copy(), used by the
early init, keeps its warning.
Assisted-by: LLM
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
drivers/firmware/broadcom/bcm47xx_nvram.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/firmware/broadcom/bcm47xx_nvram.c b/drivers/firmware/broadcom/bcm47xx_nvram.c
index 0ea5206be4c9..3609e1356065 100644
--- a/drivers/firmware/broadcom/bcm47xx_nvram.c
+++ b/drivers/firmware/broadcom/bcm47xx_nvram.c
@@ -112,8 +112,12 @@ static int bcm47xx_nvram_find_and_copy(void __iomem *flash_start, size_t res_siz
int bcm47xx_nvram_init_from_iomem(void __iomem *nvram_start, size_t res_size)
{
+ /*
+ * The arch code on MIPS (and the MTD fallback) may have copied the
+ * NVRAM before the nvmem driver probes. That copy is used.
+ */
if (nvram_len) {
- pr_warn("nvram already initialized\n");
+ pr_debug("nvram already initialized\n");
return -EEXIST;
}
--
2.56.0
reply other threads:[~2026-10-10 1:13 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20261010011258.1059235-1-rosenp@gmail.com \
--to=rosenp@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=zajec5@gmail.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®