Attention is currently required from: Subrata Banik, Caveh Jalali, Rizwan Qureshi, Tim Wawrzynczak, Sridhar Siricilla, Angel Pons, Nick Vaccaro, Alex Levin, YH Lin, Boris Mittelberg.

Subrata Banik uploaded patch set #4 to this change.

View Change

ichspi.c: Check SPI Cycle In-Progress prior start HW Seq

As per EDS, SPI controller sets the HSFSTS.bit5 (SCIP) when software
sets the Flash Cycle Go (FGO) bit in the Hardware Sequencing Flash
Control register.

This bit remains set until the cycle completes on the SPI interface.
Hardware automatically sets and clears this bit so that software can
determine when read data is valid and/or when it is safe to begin
programming the next command.

Software must initiate the next SPI transaction when this bit is 0.

Without this synchronisation being implemented, flashrom is running
into below error:

Erasing and writing flash chip... Timeout error between offset
0x0061c000 and 0x0061c03f (= 0x0061c000 + 63)! FAILED!
Uh oh. Erase/write failed. Checking if anything has changed.

Added blocking mechanism without timeout to ensure previous SPI
transaction is complete before initiating newer command.
Current debug data suggests that concurrent access to flashrom by user
space utility might run into issues where some operations are getting
timed out without synchronisation.

BUG=b:215255210
TEST=Concurrent flashrom access is not throwing timeout.

Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: Ib9265cc20513fd00f32f8fa22e28c312903ca484
---
M ichspi.c
1 file changed, 38 insertions(+), 0 deletions(-)

git pull ssh://review.coreboot.org:29418/flashrom refs/changes/54/61854/4

To view, visit change 61854. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ib9265cc20513fd00f32f8fa22e28c312903ca484
Gerrit-Change-Number: 61854
Gerrit-PatchSet: 4
Gerrit-Owner: Subrata Banik <subratabanik@google.com>
Gerrit-Reviewer: Alex Levin <levinale@chromium.org>
Gerrit-Reviewer: Boris Mittelberg <bmbm@google.com>
Gerrit-Reviewer: Caveh Jalali <caveh@chromium.org>
Gerrit-Reviewer: Edward O'Callaghan <quasisec@chromium.org>
Gerrit-Reviewer: Nick Vaccaro <nvaccaro@google.com>
Gerrit-Reviewer: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: Rizwan Qureshi <rizwan.qureshi@intel.com>
Gerrit-Reviewer: Sridhar Siricilla <sridhar.siricilla@intel.com>
Gerrit-Reviewer: Tim Wawrzynczak <twawrzynczak@chromium.org>
Gerrit-Reviewer: YH Lin <yueherngl@chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-CC: Angel Pons <th3fanbus@gmail.com>
Gerrit-CC: Paul Menzel <paulepanter@mailbox.org>
Gerrit-Attention: Subrata Banik <subratabanik@google.com>
Gerrit-Attention: Caveh Jalali <caveh@chromium.org>
Gerrit-Attention: Rizwan Qureshi <rizwan.qureshi@intel.com>
Gerrit-Attention: Tim Wawrzynczak <twawrzynczak@chromium.org>
Gerrit-Attention: Sridhar Siricilla <sridhar.siricilla@intel.com>
Gerrit-Attention: Angel Pons <th3fanbus@gmail.com>
Gerrit-Attention: Nick Vaccaro <nvaccaro@google.com>
Gerrit-Attention: Alex Levin <levinale@chromium.org>
Gerrit-Attention: YH Lin <yueherngl@chromium.org>
Gerrit-Attention: Boris Mittelberg <bmbm@google.com>
Gerrit-MessageType: newpatchset