aboutsummaryrefslogtreecommitdiff
path: root/libflash/libffs.h
diff options
context:
space:
mode:
authorMichael Neuling <mikey@neuling.org>2015-02-20 11:37:53 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-02-23 13:35:48 +1100
commit3e13d4c9dbf4f45f70348509d666f5db19546787 (patch)
treefa60aada576a10b4e734351d894e11b46b61d933 /libflash/libffs.h
parent8f22127ec50e6fa946f09af1e610b38555f11edd (diff)
downloadskiboot-3e13d4c9dbf4f45f70348509d666f5db19546787.zip
skiboot-3e13d4c9dbf4f45f70348509d666f5db19546787.tar.gz
skiboot-3e13d4c9dbf4f45f70348509d666f5db19546787.tar.bz2
libffs: Add ffs_flash_read()
Add ffs_flash_read() which mimics flash_read() but handles ECC checking, correction and uncorrectable errors. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'libflash/libffs.h')
-rw-r--r--libflash/libffs.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/libflash/libffs.h b/libflash/libffs.h
index 69e44bb..15ed3c5 100644
--- a/libflash/libffs.h
+++ b/libflash/libffs.h
@@ -32,6 +32,7 @@ struct ffs_handle;
#define FFS_ERR_BAD_VERSION 101
#define FFS_ERR_BAD_CKSUM 102
#define FFS_ERR_PART_NOT_FOUND 103
+#define FFS_ERR_BAD_ECC 104
int ffs_open_flash(struct flash_chip *chip, uint32_t offset,
uint32_t max_size, struct ffs_handle **ffs);
@@ -52,5 +53,8 @@ int ffs_part_info(struct ffs_handle *ffs, uint32_t part_idx,
int ffs_update_act_size(struct ffs_handle *ffs, uint32_t part_idx,
uint32_t act_size);
+int ffs_flash_read(struct flash_chip *c, uint32_t pos, void *buf, uint32_t len,
+ bool ecc);
+
#endif /* __LIBFFS_H */