History

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.

Mika Westerberg committed 4 years ago

Commit cd149ef1 parent e7833624 files · +96 −39Browse files

Showing the changes to include (1 of 4 files). Show all

Unified · Split

include/linux/platform_data/x86/intel-spi.h+4−2
@@ -19,11 +19,13 @@ enum intel_spi_type { · 18 unmodified lines
1919 /**
2020 * struct intel_spi_boardinfo - Board specific data for Intel SPI driver
2121 * @type: Type which this controller is compatible with
22− * @writeable: The chip is writeable
22+ * @set_writeable: Try to make the chip writeable (optional)
23+ * @data: Data to be passed to @set_writeable can be %NULL
2324 */
2425 struct intel_spi_boardinfo {
2526 enum intel_spi_type type;
26− bool writeable;
27+ bool (*set_writeable)(void __iomem *base, void *data);
28+ void *data;
2729 };
2830
2931 #endif /* INTEL_SPI_PDATA_H */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t