summaryrefslogtreecommitdiff
path: root/util/flashrom/flash.h
diff options
context:
space:
mode:
authorStefan Reinauer <stepan@coresystems.de>2009-01-26 01:10:48 +0000
committerPeter Stuge <peter@stuge.se>2009-01-26 01:10:48 +0000
commit53ac3947db69be8c526958b07f59a24dbc3678be (patch)
treeafcde113a21fbc434c6751fcd1b39a9e85137073 /util/flashrom/flash.h
parentac29d61a454f0562c5c63ea1f5e14f9068904bf0 (diff)
downloadcoreboot-53ac3947db69be8c526958b07f59a24dbc3678be.tar.xz
flashrom: Abstract mmap() in physmap.c and only open /dev/mem on the first physmap() call.
Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Signed-off-by: Peter Stuge <peter@stuge.se> Acked-by: Peter Stuge <peter@stuge.se> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3903 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/flashrom/flash.h')
-rw-r--r--util/flashrom/flash.h14
1 files changed, 4 insertions, 10 deletions
diff --git a/util/flashrom/flash.h b/util/flashrom/flash.h
index a2ff9129da..bad3110e3e 100644
--- a/util/flashrom/flash.h
+++ b/util/flashrom/flash.h
@@ -466,21 +466,15 @@ typedef enum {
extern flashbus_t flashbus;
extern void *spibar;
-/* Physical memory mapping device */
-#if defined (__sun) && (defined(__i386) || defined(__amd64))
-# define MEM_DEV "/dev/xsvc"
-#else
-# define MEM_DEV "/dev/mem"
-#endif
-
-extern int fd_mem;
-
/* debug.c */
extern int verbose;
#define printf_debug(x...) { if (verbose) printf(x); }
+/* physmap.c */
+void *physmap(const char *descr, unsigned long phys_addr, size_t len);
+void physunmap(void *virt_addr, size_t len);
+
/* flashrom.c */
-void mmap_errmsg();
void map_flash_registers(struct flashchip *flash);
/* layout.c */