mirror of
https://review.coreboot.org/flashrom.git
synced 2025-07-01 22:21:16 +02:00
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 <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
This commit is contained in:
13
flash.h
13
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); }
|
||||
|
Reference in New Issue
Block a user