From c3129208648f241c0b6538235cd4e9854ae6539d Mon Sep 17 00:00:00 2001 From: Carl-Daniel Hailfinger Date: Sat, 9 May 2009 00:54:55 +0000 Subject: Add a dummy external flasher which just prints each operation Usage: flashrom --programmer dummy This is a great way to test flashrom without root access. Corresponding to flashrom svn r483. Signed-off-by: Carl-Daniel Hailfinger Acked-by: Uwe Hermann --- flash.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'flash.h') diff --git a/flash.h b/flash.h index ef9ae6e..6b4dcb8 100644 --- a/flash.h +++ b/flash.h @@ -77,7 +77,8 @@ #endif extern int programmer; -#define PROGRAMMER_INTERNAL 0x00 +#define PROGRAMMER_INTERNAL 0x00 +#define PROGRAMMER_DUMMY 0x01 struct programmer_entry { const char *vendor; @@ -575,6 +576,16 @@ uint8_t internal_chip_readb(const volatile void *addr); uint16_t internal_chip_readw(const volatile void *addr); uint32_t internal_chip_readl(const volatile void *addr); +/* dummyflasher.c */ +int dummy_init(void); +int dummy_shutdown(void); +void dummy_chip_writeb(uint8_t val, volatile void *addr); +void dummy_chip_writew(uint16_t val, volatile void *addr); +void dummy_chip_writel(uint32_t val, volatile void *addr); +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); + /* flashrom.c */ extern int verbose; #define printf_debug(x...) { if (verbose) printf(x); } -- cgit v1.1