Add a dummy SPI controller driver, similar to the dummy LPC/FWH/Parallel
flasher driver.
Does not support reading or writing the fake chip yet.
flashrom --programmer dummy
also enables the dummy SPI controller driver.
Testing the dummy SPI driver revealed a RDID debug printing bug in the
SPI core. Fix that as well.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
git-svn-id: svn://coreboot.org/flashrom/trunk@507 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
diff --git a/flash.h b/flash.h
index bf52a56..0514739 100644
--- a/flash.h
+++ b/flash.h
@@ -571,7 +571,8 @@
BUS_TYPE_IT87XX_SPI,
BUS_TYPE_SB600_SPI,
BUS_TYPE_VIA_SPI,
- BUS_TYPE_WBSIO_SPI
+ BUS_TYPE_WBSIO_SPI,
+ BUS_TYPE_DUMMY_SPI
} flashbus_t;
extern flashbus_t flashbus;
@@ -602,6 +603,8 @@
uint8_t dummy_chip_readb(const volatile void *addr);
uint16_t dummy_chip_readw(const volatile void *addr);
uint32_t dummy_chip_readl(const volatile void *addr);
+int dummy_spi_command(unsigned int writecnt, unsigned int readcnt,
+ const unsigned char *writearr, unsigned char *readarr);
/* nic3com.c */
int nic3com_init(void);