mirror of
https://review.coreboot.org/flashrom.git
synced 2025-06-30 21:52:36 +02:00
Initial commit of an external serial flasher protocol
Supports RS-232, USB serial converters (untested) and TCP streams. All functionality is stubbed out to allow multiplatform compile testing of the headers we use. The real serial flasher protocol driver will be committed next. Corresponding to flashrom svn r625. Signed-off-by: Urja Rannikko <urjaman@gmail.com> Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
This commit is contained in:

committed by
Carl-Daniel Hailfinger

parent
6d08a3ea04
commit
2291535b7b
21
flashrom.c
21
flashrom.c
@ -130,6 +130,21 @@ const struct programmer_entry programmer_table[] = {
|
||||
.chip_writen = fallback_chip_writen,
|
||||
.delay = internal_delay,
|
||||
},
|
||||
{
|
||||
.init = serprog_init,
|
||||
.shutdown = serprog_shutdown,
|
||||
.map_flash_region = fallback_map,
|
||||
.unmap_flash_region = fallback_unmap,
|
||||
.chip_readb = serprog_chip_readb,
|
||||
.chip_readw = fallback_chip_readw,
|
||||
.chip_readl = fallback_chip_readl,
|
||||
.chip_readn = serprog_chip_readn,
|
||||
.chip_writeb = serprog_chip_writeb,
|
||||
.chip_writew = fallback_chip_writew,
|
||||
.chip_writel = fallback_chip_writel,
|
||||
.chip_writen = fallback_chip_writen,
|
||||
.delay = serprog_delay,
|
||||
},
|
||||
|
||||
{},
|
||||
};
|
||||
@ -500,7 +515,7 @@ void usage(const char *name)
|
||||
" -z | --list-supported-wiki: print supported devices in wiki syntax\n"
|
||||
" -p | --programmer <name>: specify the programmer device\n"
|
||||
" (internal, dummy, nic3com, satasii,\n"
|
||||
" it87spi, ft2232spi)\n"
|
||||
" it87spi, ft2232spi, serprog)\n"
|
||||
" -h | --help: print this help text\n"
|
||||
" -R | --version: print the version (release)\n"
|
||||
"\nYou can specify one of -E, -r, -w, -v or no operation. "
|
||||
@ -653,6 +668,10 @@ int main(int argc, char *argv[])
|
||||
programmer = PROGRAMMER_IT87SPI;
|
||||
} else if (strncmp(optarg, "ft2232spi", 9) == 0) {
|
||||
programmer = PROGRAMMER_FT2232SPI;
|
||||
} else if (strncmp(optarg, "serprog", 7) == 0) {
|
||||
programmer = PROGRAMMER_SERPROG;
|
||||
if (optarg[7] == '=')
|
||||
serprog_param = strdup(optarg + 8);
|
||||
} else {
|
||||
printf("Error: Unknown programmer.\n");
|
||||
exit(1);
|
||||
|
Reference in New Issue
Block a user