Hi,
Add MTD_SPI_NOR_PARANOID config option for verifying all written data to
prevent silent bit errors to be undetected, at the cost of halving SPI
bandwidth.
What is the use case for this? Why is it specific to SPI-NOR
flashes? Or should it rather be an MTD "feature". I'm not sure
whether this is the right way to do it, thus I'd love to hear more
about the background story to this.
Co-developed-by: Szentendrei, Tamás <szentendrei.tamas@xxxxxxxxx>
Signed-off-by: Szentendrei, Tamás <szentendrei.tamas@xxxxxxxxx>
Signed-off-by: Csókás, Bence <csokas.bence@xxxxxxxxx>
---
drivers/mtd/spi-nor/Kconfig | 10 ++++++++++
drivers/mtd/spi-nor/core.c | 33 +++++++++++++++++++++++++++++++++
2 files changed, 43 insertions(+)
diff --git a/drivers/mtd/spi-nor/Kconfig b/drivers/mtd/spi-nor/Kconfig
index 24cd25de2b8b..425ea9a22424 100644
--- a/drivers/mtd/spi-nor/Kconfig
+++ b/drivers/mtd/spi-nor/Kconfig
@@ -68,6 +68,16 @@ config MTD_SPI_NOR_SWP_KEEP
endchoice
+config MTD_SPI_NOR_PARANOID
+ bool "Read back written data (paranoid mode)"
No kernel configs please. This doesn't scale. What if you have two
flashes and one should have this and one does not?
-michael