From 395dd1d1e2d37d90416e6d296a5f1f79bb320842 Mon Sep 17 00:00:00 2001 From: hailfinger Date: Wed, 14 Jul 2010 16:19:05 +0000 Subject: Convert SPI chips to partial write, but wrap the write functions in a compat layer to allow converting the rest of flashrom later. I actually have patches for most of the remaining conversion, but I wanted to get this out and reviewed first. Tested on Intel NM10 by David Hendricks. Signed-off-by: Carl-Daniel Hailfinger Acked-by: Michael Karcher git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1080 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- dummyflasher.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'dummyflasher.c') diff --git a/dummyflasher.c b/dummyflasher.c index 5f88fc4..479a938 100644 --- a/dummyflasher.c +++ b/dummyflasher.c @@ -167,3 +167,12 @@ int dummy_spi_read(struct flashchip *flash, uint8_t *buf, int start, int len) return spi_read_chunked(flash, buf, start, len, 64 * 1024); } +/* Is is impossible to trigger this code path because dummyflasher probing will + * never be successful, and the current frontend refuses to write in that case. + * Other frontends may allow writing even for non-detected chips, though. + */ +int dummy_spi_write_256(struct flashchip *flash, uint8_t *buf, int start, int len) +{ + spi_disable_blockprotect(); + return spi_write_chunked(flash, buf, start, len, 256); +} -- cgit v1.2.1