UPSTREAM: satamv: Refactor singleton states into reentrant pattern

Move global singleton states into a struct and store within
the par_master data field for the life-time of the driver.

This is one of the steps on the way to move par_master data
memory management behind the initialisation API, for more
context see other patches under the same topic specified below.

TOPIC=register_master_api
TEST=builds

(cherry picked from commit 65372382c3933fca0c31cdf32e17f9d171af8840)

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