aboutsummaryrefslogtreecommitdiff
path: root/libflash/libffs.c
AgeCommit message (Collapse)AuthorFilesLines
2015-03-04libflash: Implement ffs_open_imageJoel Stanley1-4/+81
ffs_open_image is like ffs_open_flash, but it can operate on a file descriptor to a pnor image instead of a flash device. It is currently disabled in skiboot as it does not provide the read and lseek used by libffs. Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-02-26libflash: move ffs_flash_read into libflashJeremy Kerr1-55/+0
We have ffs_flash_read to do optionally-ecc-ed reads of flash data. However, this isn't really related to the ffs partitioning. This change moves ffs_flash_read into libflash.c, named flash_read_corrected. The function itself isn't changed. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-02-26libflash: Remove dependencies on skiboot.h headerJeremy Kerr1-0/+4
libflash should be compilable without the skiboot definitions. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Reviewed-By: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-02-26libflash: move ecc.h into libflash/Jeremy Kerr1-1/+1
The ecc.h header is used by libflash, so should sit in libflash, to allow non-skiboot tools to access it. This change is a simple move of the header file - no changes are made to the header itself. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Reviewed-By: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-02-23libffs: Add ffs_flash_read()Michael Neuling1-0/+52
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>
2015-02-23libffs: Add ecc parameter on ffs_part_info()Michael Neuling1-1/+4
Add ecc parmenter to ffs_part_info() to indicate if the partition is ECC protected or not. Fix all call sites. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-02-23libffs: Add ffs_entry_user fieldMichael Neuling1-0/+1
This adds the correct user structure to ffs_entry as defined from hostboot. No functional changes. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-02-23libffs: Add comment for to clarify endian requirmentsMichael Neuling1-0/+4
In some parts of libffs we access struct ffs_entry with endian access and in other parts we don't. This adds a comment to clarify why we do this. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-07-02Initial commit of Open Source releaseBenjamin Herrenschmidt1-0/+280
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>