summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ichspi.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/ichspi.c b/ichspi.c
index cd6e802a6..29dcd2550 100644
--- a/ichspi.c
+++ b/ichspi.c
@@ -1349,8 +1349,8 @@ static void ich_start_hwseq_xfer(const struct flashctx *flash,
uint32_t hsfc_cycle, uint32_t flash_addr, size_t len,
uint32_t addr_mask)
{
- uint16_t hsfc;
- struct hwseq_data *hwseq_data = get_hwseq_data_from_context(flash);
+ /* make sure HSFC register is cleared before initiate any operation */
+ uint16_t hsfc = 0;
/* Sets flash_addr in FADDR */
ich_hwseq_set_addr(flash_addr, addr_mask);
@@ -1359,8 +1359,6 @@ static void ich_start_hwseq_xfer(const struct flashctx *flash,
REGWRITE16(ICH9_REG_HSFS, REGREAD16(ICH9_REG_HSFS));
/* Set up transaction parameters. */
- hsfc = REGREAD16(ICH9_REG_HSFC);
- hsfc &= ~hwseq_data->hsfc_fcycle; /* clear operation */
hsfc |= hsfc_cycle;
hsfc |= HSFC_FDBC_VAL(len - 1);
hsfc |= HSFC_FGO; /* start */