summaryrefslogtreecommitdiff
path: root/include/linux/platform_data/x86
diff options
context:
space:
mode:
authorMika Westerberg <mika.westerberg@linux.intel.com>2022-02-09 15:27:04 +0300
committerMark Brown <broonie@kernel.org>2022-02-14 15:53:08 +0300
commitcd149eff8d2201a63c074a6d9d03e52926aa535d (patch)
tree43b13c86a761ded91c8bc8b34c93dff9aec420ca /include/linux/platform_data/x86
parente783362eb54cd99b2cac8b3a9aeac942e6f6ac07 (diff)
downloadlinux-cd149eff8d2201a63c074a6d9d03e52926aa535d.tar.xz
mtd: spi-nor: intel-spi: Disable write protection only if asked
Currently the driver tries to disable the BIOS write protection automatically even if this is not what the user wants. For this reason modify the driver so that by default it does not touch the write protection. Only if specifically asked by the user (setting writeable=1 command line parameter) the driver tries to disable the BIOS write protection. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Mauro Lima <mauro.lima@eclypsium.com> Reviewed-by: Tudor Ambarus <tudor.ambarus@microchip.com> Acked-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20220209122706.42439-2-mika.westerberg@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux/platform_data/x86')
-rw-r--r--include/linux/platform_data/x86/intel-spi.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/linux/platform_data/x86/intel-spi.h b/include/linux/platform_data/x86/intel-spi.h
index 7f53a5c6f35e..7dda3f690465 100644
--- a/include/linux/platform_data/x86/intel-spi.h
+++ b/include/linux/platform_data/x86/intel-spi.h
@@ -19,11 +19,13 @@ enum intel_spi_type {
/**
* struct intel_spi_boardinfo - Board specific data for Intel SPI driver
* @type: Type which this controller is compatible with
- * @writeable: The chip is writeable
+ * @set_writeable: Try to make the chip writeable (optional)
+ * @data: Data to be passed to @set_writeable can be %NULL
*/
struct intel_spi_boardinfo {
enum intel_spi_type type;
- bool writeable;
+ bool (*set_writeable)(void __iomem *base, void *data);
+ void *data;
};
#endif /* INTEL_SPI_PDATA_H */