path: root/programmer.h
diff options
authorCarl-Daniel Hailfinger <>2012-03-01 22:38:27 +0000
committerCarl-Daniel Hailfinger <>2012-03-01 22:38:27 +0000
commitccd71c21222cd73c55284265d306d52e88d8c6c8 (patch)
treed2ddcfc5b5c2f1e4f212280c7aa81f9ac2d42d96 /programmer.h
parent8ee180d9114925c9337ed061502f4a02910e3ff7 (diff)
Fix parallel-style programmer access from ITE IT87/Winbond W83627 SPI
The ITE IT87 SPI driver uses a trick to speed up reading and writing: If a flash chip is 512 kByte or less, the flash chip can be completely mapped in memory and both read and write accesses are faster that way. The current IT87 SPI code did use the parallel programmer interface for memory mapped reads and writes, but that's the wrong abstraction. It has been fixed to use mmio_read*/mmio_write* for that purpose. The Winbond W83627 SPI driver uses the same trick in its read path for all supported chip sizes. Fix it the same way. Switch internal_chip_readn to use mmio_readn as proper abstraction. Kudos to Michael Karcher for spotting the bugs. Tested-by: Johan Svensson <> Corresponding to flashrom svn r1511. Reported-by: Johan Svensson <> Signed-off-by: Carl-Daniel Hailfinger <> Acked-by: Michael Karcher <>
Diffstat (limited to 'programmer.h')
1 files changed, 1 insertions, 0 deletions
diff --git a/programmer.h b/programmer.h
index 240e1af..c99e37f 100644
--- a/programmer.h
+++ b/programmer.h
@@ -312,6 +312,7 @@ void mmio_writel(uint32_t val, void *addr);
uint8_t mmio_readb(void *addr);
uint16_t mmio_readw(void *addr);
uint32_t mmio_readl(void *addr);
+void mmio_readn(void *addr, uint8_t *buf, size_t len);
void mmio_le_writeb(uint8_t val, void *addr);
void mmio_le_writew(uint16_t val, void *addr);
void mmio_le_writel(uint32_t val, void *addr);
OpenPOWER on IntegriCloud