]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
spi: intel: Allow writeable MTD partition with module param
authorJakub Czapiga <czapiga@google.com>
Fri, 25 Jul 2025 12:25:42 +0000 (12:25 +0000)
committerMark Brown <broonie@kernel.org>
Fri, 25 Jul 2025 12:44:36 +0000 (13:44 +0100)
commit87aa3c8d8c4aa2e2567fe04126d14eb9fde815e5
tree0d74573b14f2822b57a54623acf3a05b3683b8e6
parentf54b69a57a77c301a1013a22257357d9294a1fdc
spi: intel: Allow writeable MTD partition with module param

The MTD device is blocked from writing to the SPI-NOR chip if any region
of it is write-protected, even if "writeable=1" module parameter is set.

Add ability to bypass this behaviour by introducing new module parameter
"ignore_protestion_status" which allows to rely on the write protection
mechanism of SPI-NOR chip itself, which most modern chips (since
the 1990'+) have already implemented.

Any erase/write operations performed on the write-protected section will
be rejected by the chip.

Signed-off-by: Jakub Czapiga <czapiga@google.com>
Link: https://patch.msgid.link/20250725122542.2633334-1-czapiga@google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-intel.c