Don't exit update mode after writing status bits.

(cherry-pick for 0.12.433.B)

If the write protected is enabled (which means range bits are not zero),
flashrom would try to clean range bits to zero before reading/writing.
In the flashrom write status function, it exits EC update mode which makes
the EC starts running on the SPI (contract to running on the internal RAM
in update mode). This slows down the flashrom reading because EC is reading
SPI too.

BUS=chrome-os-partner:3668
TEST=Run on Z* machine.
% flashrom --wp-range 0 0x40000; flashrom --wp-enable --wp-status
% time flashrom -r /tmp/ec  # around 6 secs

(cherry picked from commit bb92ff017fdfe4c9553c60807aaab7f04666fd7d)

Change-Id: I5abadcee6d50891fee8c2596437f04dbfa71d240
Reviewed-on: http://gerrit.chromium.org/gerrit/1007
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Yung-Chieh Lo <yjlou@chromium.org>
Tested-by: Yung-Chieh Lo <yjlou@chromium.org>
1 file changed