Edward O'Callaghan has uploaded this change for review.

View Change

spi25.c: Use JEDEC_CE consts in spi_simple_write_cmd() calls

Make use of the JEDEC_CE_{60,62,C7} defined constants of
the op-codes in each of the spi_simple_write_cmd() calls
to assist in readability.

BUG=none
BRANCH=none
TEST=builds same object.

Change-Id: I1876781672fe03302af4a6ff8d365f2e6c3b6f13
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
---
M spi25.c
1 file changed, 3 insertions(+), 3 deletions(-)

git pull ssh://review.coreboot.org:29418/flashrom refs/changes/05/47005/1
diff --git a/spi25.c b/spi25.c
index 1e797c8..15cca39 100644
--- a/spi25.c
+++ b/spi25.c
@@ -463,19 +463,19 @@
static int spi_chip_erase_60(struct flashctx *flash)
{
/* This usually takes 1-85s, so wait in 1s steps. */
- return spi_simple_write_cmd(flash, 0x60, 1000 * 1000);
+ return spi_simple_write_cmd(flash, JEDEC_CE_60, 1000 * 1000);
}

static int spi_chip_erase_62(struct flashctx *flash)
{
/* This usually takes 2-5s, so wait in 100ms steps. */
- return spi_simple_write_cmd(flash, 0x62, 100 * 1000);
+ return spi_simple_write_cmd(flash, JEDEC_CE_62, 100 * 1000);
}

static int spi_chip_erase_c7(struct flashctx *flash)
{
/* This usually takes 1-85s, so wait in 1s steps. */
- return spi_simple_write_cmd(flash, 0xc7, 1000 * 1000);
+ return spi_simple_write_cmd(flash, JEDEC_CE_C7, 1000 * 1000);
}

int spi_block_erase_52(struct flashctx *flash, unsigned int addr,

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

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I1876781672fe03302af4a6ff8d365f2e6c3b6f13
Gerrit-Change-Number: 47005
Gerrit-PatchSet: 1
Gerrit-Owner: Edward O'Callaghan <quasisec@chromium.org>
Gerrit-MessageType: newchange