UPSTREAM: ichspi: Extract initialisation of swseq and hwseq into a function

Initialisation of swseq_data and hwseq_data gets its own function,
which is called from init_ich_default. This makes init_ich_default
more readable.

This patch also gives a name to (previously anonymous) struct
swseq_data. Its sibling struct hwseq_data already has a name. Structs
need names to be able to declare function parameters.

BUG=b:204488958
BRANCH=none
TEST=Check that the following scenarios still behave properly:
1) probe-read-verify-erase section-write-reboot
on Intel octopus board with GD25LQ128C/GD25LQ128D/GD25LQ128E
2) probe and read on Panther Point (7 series PCH)

Original-Change-Id: I7d62b1b380e497b82dcae1284d752204cc541bd3
Original-Tested-by: Anastasia Klimchuk <aklm@chromium.org>
Original-Tested-by: Nico Huber <nico.h@gmx.de>
Original-Signed-off-by: Anastasia Klimchuk <aklm@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/c/flashrom/+/58737
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Nico Huber <nico.h@gmx.de>
(cherry picked from commit 97a1683c85b1f24ff0605e7571d2f6094e32a547)
Signed-off-by: Anastasia Klimchuk <aklm@chromium.org>
Change-Id: I84709b6332c0e8988490fda6d7b93c10c1e32a67
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/flashrom/+/3439451
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Nikolai Artemiev <nartemiev@google.com>
Commit-Queue: Edward O'Callaghan <quasisec@chromium.org>
Tested-by: Edward O'Callaghan <quasisec@chromium.org>
1 file changed
tree: 1b334e4dd54ff3b4047b8fe40e04c29268fdeac9
  1. Documentation/
  2. Makefile.d/
  3. platform/
  4. subprojects/
  5. tests/
  6. util/
  7. .gitattributes
  8. .gitignore
  9. 82802ab.c
  10. action_descriptor.c
  11. action_descriptor.h
  12. amd_imc.c
  13. at45db.c
  14. atahpt.c
  15. atapromise.c
  16. atavia.c
  17. big_lock.c
  18. big_lock.h
  19. bitbang_spi.c
  20. board_enable.c
  21. buspirate_spi.c
  22. cbtable.c
  23. ch341a_spi.c
  24. chipdrivers.h
  25. chipset_enable.c
  26. cli_classic.c
  27. cli_common.c
  28. cli_output.c
  29. COPYING
  30. coreboot_tables.h
  31. cros_alias.c
  32. cros_ec.c
  33. cros_ec.h
  34. cros_ec_commands.h
  35. cros_ec_dev.c
  36. custom_baud.c
  37. custom_baud.h
  38. custom_baud_linux.c
  39. dediprog.c
  40. developerbox_spi.c
  41. digilent_spi.c
  42. dmi.c
  43. drkaiser.c
  44. dummyflasher.c
  45. edi.c
  46. edi.h
  47. en29lv640b.c
  48. ene.h
  49. file_lock.c
  50. flash.h
  51. flashchips.c
  52. flashchips.h
  53. flashchips_crosbl.c
  54. flashrom.8.tmpl
  55. flashrom.c
  56. fmap.c
  57. fmap.h
  58. ft2232_spi.c
  59. gfxnvidia.c
  60. helpers.c
  61. hwaccess.h
  62. hwaccess_physmap.c
  63. hwaccess_physmap.h
  64. hwaccess_x86_io.c
  65. hwaccess_x86_io.h
  66. hwaccess_x86_msr.c
  67. hwaccess_x86_msr.h
  68. i2c_helper.h
  69. i2c_helper_linux.c
  70. ich_descriptors.c
  71. ich_descriptors.h
  72. ichspi.c
  73. internal.c
  74. ipc_lock.h
  75. it8212.c
  76. it85spi.c
  77. it87spi.c
  78. jedec.c
  79. jlink_spi.c
  80. layout.c
  81. layout.h
  82. libflashrom.c
  83. libflashrom.h
  84. libflashrom.map
  85. linux_mtd.c
  86. linux_spi.c
  87. lspcon_i2c_spi.c
  88. Makefile
  89. Makefile.include
  90. mcp6x_spi.c
  91. mediatek_i2c_spi.c
  92. meson.build
  93. meson_options.txt
  94. mstarddc_spi.c
  95. ni845x_spi.c
  96. nic3com.c
  97. nicintel.c
  98. nicintel_eeprom.c
  99. nicintel_spi.c
  100. nicnatsemi.c
  101. nicrealtek.c
  102. ogp_spi.c
  103. opaque.c
  104. OWNERS
  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. processor_enable.c
  114. programmer.c
  115. programmer.h
  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. spi.h
  131. spi25.c
  132. spi25_statusreg.c
  133. spi95.c
  134. sst28sf040.c
  135. sst49lfxxxc.c
  136. sst_fwhub.c
  137. stlinkv3_spi.c
  138. stm50.c
  139. udelay.c
  140. usb_device.c
  141. usb_device.h
  142. usbblaster_spi.c
  143. usbdev.c
  144. w29ee011.c
  145. w39.c
  146. wbsio_spi.c
  147. wp_statusreg.c
  148. writeprotect.c
  149. writeprotect.h