spi25: Introduce spi_simple_write_cmd()

This is a backport of `commit a3140d0b` upstream.
 * NOTE: Upstream 'JEDEC_RDSR_BIT_WIP' is called 'SPI_SR_WIP'

spi_simple_write_cmd() executes WREN plus a single byte write and polls
WIP afterwards. It's used to replace current spi_erase_chip_*() imple-
mentations.

Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/22382
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: David Hendricks <david.hendricks@gmail.com>

V.2: Rebased on master.

BUG=chromium:478356
BRANCH=none
TEST=still builds

Change-Id: Ife204f2ee5d4d221f4fd997606ab1c8d86b02095
Signed-off-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1484919
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
3 files changed