Re: [PATCH] nvmem: brcm_nvram: store a copy of NVRAM content

From: Arınç ÜNAL
Date: Thu Sep 14 2023 - 03:56:43 EST


On 14.09.2023 09:49, Rafał Miłecki wrote:
From: Rafał Miłecki <rafal@xxxxxxxxxx>

This driver uses MMIO access for reading NVRAM from a flash device.
Underneath there is a flash controller that reads data and provides
mapping window.

Using MMIO interface affects controller configuration and may break real
controller driver. It was reported by multiple users of devices with
NVRAM stored on NAND.

Modify driver to read & cache all NVRAM content during init and use that
copy to provide NVMEM data when requested.

Link: https://lore.kernel.org/linux-mtd/CACna6rwf3_9QVjYcM+847biTX=K0EoWXuXcSMkJO1Vy_5vmVqA@xxxxxxxxxxxxxx/
Cc: Arınç ÜNAL <arinc.unal@xxxxxxxxxx>
Cc: Florian Fainelli <florian.fainelli@xxxxxxxxxxxx>
Cc: Scott Branden <scott.branden@xxxxxxxxxxxx>
Signed-off-by: Rafał Miłecki <rafal@xxxxxxxxxx>

This is a bug fix, could you add a "Fixes" tag so it will be backported to
stable releases?

Arınç