summaryrefslogtreecommitdiffstats
path: root/flash.h
diff options
context:
space:
mode:
authorCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2009-05-08 12:49:03 +0000
committerCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2009-05-08 12:49:03 +0000
commit03b4e71cb90aaba1b1adba5e534768f981ffcf6f (patch)
treee4f1f23e4861e7d2bc3a1e776b2b1ce8206f4cd1 /flash.h
parentb0039911731ea60ee82fa54bc2a0548cbf9efa5c (diff)
downloadast2050-flashrom-03b4e71cb90aaba1b1adba5e534768f981ffcf6f.zip
ast2050-flashrom-03b4e71cb90aaba1b1adba5e534768f981ffcf6f.tar.gz
Don't assume flash is accessible via MMIO for chips with no read function
Flashrom assumes that the flash chip contents are available via mmap if no read function is defined. This special case is handled in lots of places all over the code. Remove the special case and use the read_memmapped function. Not only does this allow us to fix a read bug in flashrom I recently uncovered on ICH SPI, it also allows us to add support for Paraflasher to flashrom. Corresponding to flashrom svn r473. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
Diffstat (limited to 'flash.h')
-rw-r--r--flash.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/flash.h b/flash.h
index b8f4ca7..f5dea55 100644
--- a/flash.h
+++ b/flash.h
@@ -539,6 +539,7 @@ void physunmap(void *virt_addr, size_t len);
extern int verbose;
#define printf_debug(x...) { if (verbose) printf(x); }
void map_flash_registers(struct flashchip *flash);
+int read_memmapped(struct flashchip *flash, uint8_t *buf);
/* layout.c */
int show_id(uint8_t *bios, int size, int force);
OpenPOWER on IntegriCloud