1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-07-02 14:33:18 +02:00

Add fallback functions for programmer shutdown and memory mapping and fix FT2232 and IT87

FT2232 and IT87 programmers used functions of the dummy programmer
instead of fallback functions.

The dummy programmer is a "real" programmer with possible side effects
and its functions should not be abused by other programmers. Make
FT2232 and IT87 use official fallback functions instead. Create
fallback_shutdown(). Create fallback_chip_writeb(). Convert the
programmer #defines to an enum.

Corresponding to flashrom svn r678.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
This commit is contained in:
Carl-Daniel Hailfinger
2009-08-12 11:39:29 +00:00
parent 8fa64816ae
commit 415e513d90
3 changed files with 34 additions and 18 deletions

View File

@ -218,6 +218,12 @@ void internal_delay(int usecs)
}
}
/* Fallback shutdown() for programmers which don't need special handling */
int fallback_shutdown(void)
{
return 0;
}
/* Fallback map() for programmers which don't need special handling */
void *fallback_map(const char *descr, unsigned long phys_addr, size_t len)
{
@ -229,6 +235,11 @@ void fallback_unmap(void *virt_addr, size_t len)
{
}
/* No-op fallback for drivers not supporting addr/data pair accesses */
void fallback_chip_writeb(uint8_t val, chipaddr addr)
{
}
/* Little-endian fallback for drivers not supporting 16 bit accesses */
void fallback_chip_writew(uint16_t val, chipaddr addr)
{