brintos

brintos / linux-shallow public Read only

0
0
Text · 2.5 KiB · 24cd25d Raw
74 lines · plain
1# SPDX-License-Identifier: GPL-2.0-only2menuconfig MTD_SPI_NOR3	tristate "SPI NOR device support"4	depends on MTD5	depends on MTD && SPI_MASTER6	select SPI_MEM7	help8	  This is the framework for the SPI NOR which can be used by the SPI9	  device drivers and the SPI NOR device driver.10 11if MTD_SPI_NOR12 13config MTD_SPI_NOR_USE_4K_SECTORS14	bool "Use small 4096 B erase sectors"15	default y16	help17	  Many flash memories support erasing small (4096 B) sectors. Depending18	  on the usage this feature may provide performance gain in comparison19	  to erasing whole blocks (32/64 KiB).20	  Changing a small part of the flash's contents is usually faster with21	  small sectors. On the other hand erasing should be faster when using22	  64 KiB block instead of 16 × 4 KiB sectors.23 24	  Please note that some tools/drivers/filesystems may not work with25	  4096 B erase size (e.g. UBIFS requires 15 KiB as a minimum).26 27choice28	prompt "Software write protection at boot"29	default MTD_SPI_NOR_SWP_DISABLE_ON_VOLATILE30 31config MTD_SPI_NOR_SWP_DISABLE32	bool "Disable SWP on any flashes (legacy behavior)"33	help34	  This option disables the software write protection on any SPI35	  flashes at boot-up.36 37	  Depending on the flash chip this either clears the block protection38	  bits or does a "Global Unprotect" command.39 40	  Don't use this if you intent to use the software write protection41	  of your SPI flash. This is only to keep backwards compatibility.42 43config MTD_SPI_NOR_SWP_DISABLE_ON_VOLATILE44	bool "Disable SWP on flashes w/ volatile protection bits"45	help46	  Some SPI flashes have volatile block protection bits, ie. after a47	  power-up or a reset the flash is software write protected by48	  default.49 50	  This option disables the software write protection for these kind51	  of flashes while keeping it enabled for any other SPI flashes52	  which have non-volatile write protection bits.53 54	  If the software write protection will be disabled depending on55	  the flash either the block protection bits are cleared or a56	  "Global Unprotect" command is issued.57 58	  If you are unsure, select this option.59 60config MTD_SPI_NOR_SWP_KEEP61	bool "Keep software write protection as is"62	help63	  If you select this option the software write protection of any64	  SPI flashes will not be changed. If your flash is software write65	  protected or will be automatically software write protected after66	  power-up you have to manually unlock it before you are able to67	  write to it.68 69endchoice70 71source "drivers/mtd/spi-nor/controllers/Kconfig"72 73endif # MTD_SPI_NOR74