UPSTREAM: realtek_mst_i2c_spi.c: Add ISP mode check

Check ISP mode before doing reset and add waiting
after the enter ISP mode command.

BUG=None
BRANCH=none
TEST=build and run mst commands

Original-Signed-off-by: Shiyu Sun <sshiyu@chromium.org>
Original-Change-Id: Ib1ab8370eb6335a77bb293fc98a8ab7be465db4f
Original-Reviewed-on: https://review.coreboot.org/c/flashrom/+/48662
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
(cherry picked from commit 10d71d9393d7293ee42ee7e95786ac7f09f183bd)

Change-Id: I82fadc4193d0d8fe55e4fa18c5e821f08b7e6b6e
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/flashrom/+/2601011
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Andrew McRae <amcrae@chromium.org>
Commit-Queue: Edward O'Callaghan <quasisec@chromium.org>
Commit-Queue: Andrew McRae <amcrae@chromium.org>
Tested-by: Edward O'Callaghan <quasisec@chromium.org>
Auto-Submit: Edward O'Callaghan <quasisec@chromium.org>
1 file changed
tree: d5d5a9f67c690e8e05144847c0f9c7fc5db1a6c2
  1. Documentation/
  2. util/
  3. .gitattributes
  4. .gitignore
  5. 82802ab.c
  6. action_descriptor.c
  7. action_descriptor.h
  8. amd_imc.c
  9. archtest.c
  10. at45db.c
  11. atahpt.c
  12. atapromise.c
  13. atavia.c
  14. big_lock.c
  15. big_lock.h
  16. bitbang_spi.c
  17. board_enable.c
  18. buspirate_spi.c
  19. cbtable.c
  20. ch341a_spi.c
  21. chipdrivers.h
  22. chipset_enable.c
  23. cli_classic.c
  24. cli_common.c
  25. cli_output.c
  26. COPYING
  27. coreboot_tables.h
  28. cros_alias.c
  29. cros_ec.c
  30. cros_ec.h
  31. cros_ec_commands.h
  32. cros_ec_dev.c
  33. custom_baud.c
  34. custom_baud.h
  35. dediprog.c
  36. developerbox_spi.c
  37. digilent_spi.c
  38. dmi.c
  39. drkaiser.c
  40. dummyflasher.c
  41. edi.c
  42. edi.h
  43. en29lv640b.c
  44. endiantest.c
  45. ene.h
  46. ene_lpc.c
  47. file.c
  48. file.h
  49. file_lock.c
  50. flash.h
  51. flashchips.c
  52. flashchips.h
  53. flashrom.8.tmpl
  54. flashrom.c
  55. fmap.c
  56. fmap.h
  57. ft2232_spi.c
  58. gfxnvidia.c
  59. helpers.c
  60. hwaccess.c
  61. hwaccess.h
  62. i2c_helper.h
  63. i2c_helper_linux.c
  64. ich_descriptors.c
  65. ich_descriptors.h
  66. ichspi.c
  67. internal.c
  68. ipc_lock.h
  69. it8212.c
  70. it85spi.c
  71. it87spi.c
  72. jedec.c
  73. jlink_spi.c
  74. layout.c
  75. layout.h
  76. libflashrom.h
  77. linux_mtd.c
  78. linux_spi.c
  79. lspcon_i2c_spi.c
  80. m29f400bt.c
  81. Makefile
  82. mcp6x_spi.c
  83. mec1308.c
  84. meson.build
  85. meson_options.txt
  86. mstarddc_spi.c
  87. ni845x_spi.c
  88. nic3com.c
  89. nicintel.c
  90. nicintel_eeprom.c
  91. nicintel_spi.c
  92. nicnatsemi.c
  93. nicrealtek.c
  94. ogp_spi.c
  95. opaque.c
  96. os.h
  97. OWNERS
  98. pcidev.c
  99. physmap.c
  100. pickit2_spi.c
  101. platform.h
  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.h
  111. raiden_debug_spi.c
  112. rayer_spi.c
  113. README.chromiumos
  114. realtek_mst_i2c_spi.c
  115. s25f.c
  116. satamv.c
  117. satasii.c
  118. sb600spi.c
  119. search.c
  120. search.h
  121. serial.c
  122. serprog.c
  123. serprog.h
  124. sfdp.c
  125. spi.c
  126. spi.h
  127. spi25.c
  128. spi25_statusreg.c
  129. spi95.c
  130. sst28sf040.c
  131. sst49lfxxxc.c
  132. sst_fwhub.c
  133. stlinkv3_spi.c
  134. stm50.c
  135. stm50flw0x0x.c
  136. udelay.c
  137. usb_device.c
  138. usb_device.h
  139. usbblaster_spi.c
  140. usbdev.c
  141. w29ee011.c
  142. w39.c
  143. wbsio_spi.c
  144. writeprotect.c
  145. writeprotect.h