Revert "cros_ec: Skip jumping to RO when preparing for partial write"

This reverts commit b9bd88d6a76fff556c15ceadb068f2a9b3fc5034.

This breaks eve TP firmware updating where it is unable to verify.

 Verifying flash... VERIFY FAILED at 0x00040014! Expected=0x4d,
    Read=0x1d, failed byte count from 0x00000000-0x0007ffff: 0x

The implementation inside cros_ec.c is bizarre and frankly needs
to be rewritten before we touch this again or upstream it.

For example `try_latest_firmware` is a global tht ctrl if we should
jump to the new fw after an update and defaults to zero. However, if
SOFTWARE_SYNC is enabled we don't try the latest fw copy after update.
and so `try_latest_firmware` is set to one when `SOFTWARE_SYNC_ENABLE`
is *not* #define'ed. Inspecting `cros_ec_finish()` we see the comment
regarding changes to `cros_ec_prepare()` behavior however the branch
on `try_latest_firmware` is never taken.

TL;DR the logic is convoluted and confused, containing too much global
state and non-linear control-flow, therefore revert for now instead of
hacking on more glue and paper over the top.

BUG=chromium:1049309
BRANCH=none
TEST=eve tp flashes and verifies as expected.

Change-Id: I790bfd7d816531b98e0d79ac21f1b5b73a8c951e
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/flashrom/+/2056197
Tested-by: Edward O'Callaghan <quasisec@chromium.org>
Auto-Submit: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Sam McNally <sammc@chromium.org>
Commit-Queue: Sam McNally <sammc@chromium.org>
1 file changed