UPSTREAM: tree/: Convert unlock func ptr into enumerate values

Converting the blockprotect unlock function pointer
within the flashchip struct into enum values allows for
the flashchips db to be turn into pure, declarative data.
A nice side-effect of this is to reduce link-time symbol
space of chipdrivers and increase modularity of the
spi25_statusreg.c and related implementations.

BUG=none
TEST=ninja test.

(cherry picked from commit 0c774d6b6a075f37f21ca9c3506141cb0d4ae34b)

Original-Change-Id: Ie5c5db1b09d07e1a549990d6f5a622fae4c83233
Original-Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Original-Reviewed-on: https://review.coreboot.org/c/flashrom/+/69933
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Sam McNally <sammc@google.com>
Original-Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
GitOrigin-RevId: 0c774d6b6a075f37f21ca9c3506141cb0d4ae34b
Change-Id: Ic43770d7e27a17d4b89a46ff507283d1a1bf11ad
Signed-off-by: CopyBot <copybot.service@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/flashrom/+/4355154
Commit-Queue: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Sean Paul <sean@poorly.run>
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
8 files changed
tree: 6c2e4abae9e75e5b4f3d4af8600686f3ff480f66
  1. .github/
  2. bindings/
  3. doc/
  4. Documentation/
  5. include/
  6. Makefile.d/
  7. platform/
  8. scripts/
  9. subprojects/
  10. tests/
  11. util/
  12. .gitattributes
  13. .gitignore
  14. 82802ab.c
  15. action_descriptor.c
  16. action_descriptor.h
  17. amd_imc.c
  18. asm106x.c
  19. at45db.c
  20. atahpt.c
  21. atapromise.c
  22. atavia.c
  23. big_lock.c
  24. big_lock.h
  25. bitbang_spi.c
  26. board_enable.c
  27. buspirate_spi.c
  28. cbtable.c
  29. ch341a_spi.c
  30. ch347_spi.c
  31. chipset_enable.c
  32. cli_classic.c
  33. cli_common.c
  34. cli_output.c
  35. COPYING
  36. cros_alias.c
  37. cros_ec.c
  38. cros_ec.h
  39. cros_ec_commands.h
  40. cros_ec_dev.c
  41. cros_ec_wp.c
  42. custom_baud.c
  43. custom_baud_darwin.c
  44. custom_baud_linux.c
  45. dediprog.c
  46. developerbox_spi.c
  47. digilent_spi.c
  48. DIR_METADATA
  49. dirtyjtag_spi.c
  50. dmi.c
  51. Doxyfile
  52. drkaiser.c
  53. dummyflasher.c
  54. edi.c
  55. en29lv640b.c
  56. erasure_layout.c
  57. file_lock.c
  58. flashchips.c
  59. flashchips_crosbl.c
  60. flashrom.c
  61. fmap.c
  62. ft2232_spi.c
  63. gfxnvidia.c
  64. helpers.c
  65. helpers_fileio.c
  66. hwaccess_physmap.c
  67. hwaccess_x86_io.c
  68. hwaccess_x86_msr.c
  69. i2c_helper_linux.c
  70. ich_descriptors.c
  71. ichspi.c
  72. internal.c
  73. internal_par.c
  74. ipc_lock.h
  75. it8212.c
  76. it87spi.c
  77. jedec.c
  78. jlink_spi.c
  79. known_boards.c
  80. layout.c
  81. libflashrom.c
  82. libflashrom.map
  83. linux_mtd.c
  84. linux_spi.c
  85. MAINTAINERS
  86. Makefile
  87. Makefile.include
  88. mcp6x_spi.c
  89. mediatek_i2c_spi.c
  90. meson.build
  91. meson_options.txt
  92. mstarddc_spi.c
  93. ni845x_spi.c
  94. nic3com.c
  95. nicintel.c
  96. nicintel_eeprom.c
  97. nicintel_spi.c
  98. nicnatsemi.c
  99. nicrealtek.c
  100. ogp_spi.c
  101. opaque.c
  102. OWNERS
  103. parade_lspcon.c
  104. parallel.c
  105. pcidev.c
  106. pickit2_spi.c
  107. pony_spi.c
  108. power.c
  109. power.h
  110. PRESUBMIT.cfg
  111. print.c
  112. print_wiki.c
  113. printlock.c
  114. processor_enable.c
  115. programmer.c
  116. programmer_table.c
  117. raiden_debug_spi.c
  118. rayer_spi.c
  119. README
  120. README.chromiumos
  121. realtek_mst_i2c_spi.c
  122. s25f.c
  123. satamv.c
  124. satasii.c
  125. sb600spi.c
  126. serial.c
  127. serprog.c
  128. sfdp.c
  129. spi.c
  130. spi25.c
  131. spi25_statusreg.c
  132. spi95.c
  133. sst28sf040.c
  134. sst49lfxxxc.c
  135. sst_fwhub.c
  136. stlinkv3_spi.c
  137. stm50.c
  138. superio.c
  139. test_build.sh
  140. udelay.c
  141. unblocked_terms.txt
  142. usb_device.c
  143. usbblaster_spi.c
  144. usbdev.c
  145. w29ee011.c
  146. w39.c
  147. wbsio_spi.c
  148. writeprotect.c
  149. writeprotect_ranges.c