path: root/internal.c
diff options
authorCarl-Daniel Hailfinger <>2009-08-12 11:39:29 +0000
committerCarl-Daniel Hailfinger <>2009-08-12 11:39:29 +0000
commit415e513d90042b91c1a50a9afe1282e393e574b8 (patch)
tree601ab4f703afa1c577cd532b3d195543a5a7fdb2 /internal.c
parent8fa64816ae22ff9e5fdcc00b153010459edb45f4 (diff)
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 <> Acked-by: Stefan Reinauer <>
Diffstat (limited to 'internal.c')
1 files changed, 11 insertions, 0 deletions
diff --git a/internal.c b/internal.c
index 888c502..3e3808e 100644
--- a/internal.c
+++ b/internal.c
@@ -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)
OpenPOWER on IntegriCloud