mtd: spi-nor: core: Restrict blind MRAM reset to mram nodes
The spi_nor_everspin_reboot_fix() was executing unconditionally for any SPI NOR device lacking a dedicated reset GPIO. This caused unintended 8-8-8 soft reset sequences and an unnecessary boot delay for unrelated flashes. While the new WOSM p0004263 hardware revision routes the MRAM nRST to a GPIO, older revisions (e.g. p0000042) still rely on nPORz and therefore need this fallback to escape Octal-STR mode during a warm reboot. Limit the blind reset strictly to nodes named "mram" to avoid breaking standard SPI NOR flash initializations. Signed-off-by: Heinrich Toews <ht@twx-software.de>
This commit is contained in:
@@ -3466,6 +3466,13 @@ static void spi_nor_everspin_reboot_fix(struct spi_nor *nor)
|
||||
if (!nor->spimem || !nor->dev)
|
||||
return;
|
||||
|
||||
/*
|
||||
* Limit this hack to nodes explicitly named "mram" to prevent
|
||||
* sending blind 8-8-8 resets to unrelated SPI NOR flashes.
|
||||
*/
|
||||
if (!nor->dev->of_node || !of_node_name_eq(nor->dev->of_node, "mram"))
|
||||
return;
|
||||
|
||||
/*
|
||||
* Logging as dev_info so it appears in dmesg during boot.
|
||||
* This helps verify if the fix is being executed.
|
||||
|
||||
Reference in New Issue
Block a user