-
Notifications
You must be signed in to change notification settings - Fork 55k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
nvmem: brcm_nvram: store a copy of NVRAM content
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 NVRAM content during init and use that copy to provide NVMEM data when requested. On NAND flashes due to their alignment NVRAM partitions can be quite big (1 MiB and more) while actual NVRAM content stays quite small (usually 16 to 32 KiB). To avoid allocating so much memory check for actual data length. Link: https://lore.kernel.org/linux-mtd/CACna6rwf3_9QVjYcM+847biTX=K0EoWXuXcSMkJO1Vy_5vmVqA@mail.gmail.com/ Fixes: 3fef9ed ("nvmem: brcm_nvram: new driver exposing Broadcom's NVRAM") Cc: <[email protected]> Cc: Arınç ÜNAL <[email protected]> Cc: Florian Fainelli <[email protected]> Cc: Scott Branden <[email protected]> Signed-off-by: Rafał Miłecki <[email protected]> Acked-by: Arınç ÜNAL <[email protected]> Signed-off-by: Srinivas Kandagatla <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
- Loading branch information
Showing
1 changed file
with
94 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters