mboxd: Add support for file-backed flash devices.
This commit adds a new file based backing source. The file based
backing source takes a raw pnor image that is usually flashed to a mtd
device.
This backing source enabled rapid testing of pnor images.
Tested on Witherspoon with the VPNOR and file backends, and Romulus for
the MTD and file backends.
Change-Id: I253ecfa6b58d071c7982f153ad50da8e4ad39fa2
Signed-off-by: Evan Lojewski <github@meklort.com>
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
diff --git a/backend.h b/backend.h
index 05c5498..5b043ec 100644
--- a/backend.h
+++ b/backend.h
@@ -17,6 +17,7 @@
#define FLASH_ACCESS_MS_PER_MB 8000
struct backend backend_get_mtd(void);
+struct backend backend_get_file(void);
struct backend backend_get_vpnor(void);
enum backend_reset_mode { reset_lpc_flash, reset_lpc_memory };
@@ -224,6 +225,7 @@
}
int backend_probe_mtd(struct backend *master, const char *path);
+int backend_probe_file(struct backend *master, const char *path);
/* Avoid dependency on vpnor/mboxd_pnor_partition_table.h */
struct vpnor_partition_paths;
int backend_probe_vpnor(struct backend *master,