Kconfig 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. # SPDX-License-Identifier: GPL-2.0-only
  2. menuconfig MTD_SPI_NOR
  3. tristate "SPI NOR device support"
  4. depends on MTD
  5. depends on MTD && SPI_MASTER
  6. select SPI_MEM
  7. help
  8. This is the framework for the SPI NOR which can be used by the SPI
  9. device drivers and the SPI NOR device driver.
  10. if MTD_SPI_NOR
  11. config MTD_SPI_NOR_USE_4K_SECTORS
  12. bool "Use small 4096 B erase sectors"
  13. default y
  14. help
  15. Many flash memories support erasing small (4096 B) sectors. Depending
  16. on the usage this feature may provide performance gain in comparison
  17. to erasing whole blocks (32/64 KiB).
  18. Changing a small part of the flash's contents is usually faster with
  19. small sectors. On the other hand erasing should be faster when using
  20. 64 KiB block instead of 16 × 4 KiB sectors.
  21. Please note that some tools/drivers/filesystems may not work with
  22. 4096 B erase size (e.g. UBIFS requires 15 KiB as a minimum).
  23. choice
  24. prompt "Software write protection at boot"
  25. default MTD_SPI_NOR_SWP_DISABLE_ON_VOLATILE
  26. config MTD_SPI_NOR_SWP_DISABLE
  27. bool "Disable SWP on any flashes (legacy behavior)"
  28. help
  29. This option disables the software write protection on any SPI
  30. flashes at boot-up.
  31. Depending on the flash chip this either clears the block protection
  32. bits or does a "Global Unprotect" command.
  33. Don't use this if you intent to use the software write protection
  34. of your SPI flash. This is only to keep backwards compatibility.
  35. config MTD_SPI_NOR_SWP_DISABLE_ON_VOLATILE
  36. bool "Disable SWP on flashes w/ volatile protection bits"
  37. help
  38. Some SPI flashes have volatile block protection bits, ie. after a
  39. power-up or a reset the flash is software write protected by
  40. default.
  41. This option disables the software write protection for these kind
  42. of flashes while keeping it enabled for any other SPI flashes
  43. which have non-volatile write protection bits.
  44. If the software write protection will be disabled depending on
  45. the flash either the block protection bits are cleared or a
  46. "Global Unprotect" command is issued.
  47. If you are unsure, select this option.
  48. config MTD_SPI_NOR_SWP_KEEP
  49. bool "Keep software write protection as is"
  50. help
  51. If you select this option the software write protection of any
  52. SPI flashes will not be changed. If your flash is software write
  53. protected or will be automatically software write protected after
  54. power-up you have to manually unlock it before you are able to
  55. write to it.
  56. endchoice
  57. source "drivers/mtd/spi-nor/controllers/Kconfig"
  58. endif # MTD_SPI_NOR