another patch:
- dont trash hsfc in ich_hwseq_block_erase and ich_hwseq_write_256

this and the previous one belong to the 4.2 series... i will send a
completely updated patch set when dhendrix gets erase+write to work.

-- 
Kind regards/Mit freundlichen Grüßen, Stefan Tauner
>From c164f48fc236d422edabb57875ca4adb3fb65b80 Mon Sep 17 00:00:00 2001
From: Stefan Tauner <[email protected]>
Date: Tue, 21 Jun 2011 00:05:19 +0200
Subject: [PATCH] fixup! add support for Intel Hardware Sequencing

- dont trash hsfc in ich_hwseq_block_erase and ich_hwseq_write_256

Signed-off-by: Stefan Tauner <[email protected]>
---
 ichspi.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/ichspi.c b/ichspi.c
index 4988c9b..47c6e50 100644
--- a/ichspi.c
+++ b/ichspi.c
@@ -1304,7 +1304,7 @@ int ich_hwseq_block_erase(struct flashchip *flash,
 
 	hsfc = REGREAD16(ICH9_REG_HSFC);
 	hsfc &= ~HSFC_FCYCLE; /* clear operation */
-	hsfc = (0x11 << HSFC_FCYCLE_OFF); /* set erase operation */
+	hsfc |= (0x11 << HSFC_FCYCLE_OFF); /* set erase operation */
 	hsfc |= HSFC_FGO; /* start */
 	REGWRITE16(ICH9_REG_HSFC, hsfc);
 
@@ -1396,7 +1396,7 @@ int ich_hwseq_write_256(struct flashchip *flash, uint8_t *buf, int addr, int len
 		REGWRITE32(ICH9_REG_FDATA0, *buf32++);
 		hsfc = REGREAD16(ICH9_REG_HSFC);
 		hsfc &= ~HSFC_FCYCLE; /* clear operation */
-		hsfc = (0x10 << HSFC_FCYCLE_OFF); /* set write operation */
+		hsfc |= (0x10 << HSFC_FCYCLE_OFF); /* set write operation */
 		hsfc &= ~HSFC_FDBC; /* clear byte count */
 		hsfc |= (3 << HSFC_FDBC_OFF); /* set byte count to 3+1 */
 		hsfc |= HSFC_FGO; /* start */
-- 
1.7.1

_______________________________________________
flashrom mailing list
[email protected]
http://www.flashrom.org/mailman/listinfo/flashrom

Reply via email to