diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2015-02-26 11:46:09 +0800 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2015-02-26 16:34:27 +1100 |
commit | 6c26bc72093a317a7018bafbece55393d9e222f5 (patch) | |
tree | 1264c7dd0f123d48e2387dffbb1f9d332f7d41eb /core | |
parent | 4ddba54145f2c6056cc0236774429825f5ba84d9 (diff) | |
download | skiboot-6c26bc72093a317a7018bafbece55393d9e222f5.zip skiboot-6c26bc72093a317a7018bafbece55393d9e222f5.tar.gz skiboot-6c26bc72093a317a7018bafbece55393d9e222f5.tar.bz2 |
libflash: move ffs_flash_read into libflash
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>
Diffstat (limited to 'core')
-rw-r--r-- | core/flash.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/flash.c b/core/flash.c index 6fe9250..bf6f587 100644 --- a/core/flash.c +++ b/core/flash.c @@ -375,8 +375,8 @@ static int flash_find_subpartition(struct flash_chip *chip, uint32_t subid, partsize = BUFFER_SIZE_MINUS_ECC(*total_size); /* Get the TOC */ - rc = ffs_flash_read(chip, *start, header, FLASH_SUBPART_HEADER_SIZE, - ecc); + rc = flash_read_corrected(chip, *start, header, + FLASH_SUBPART_HEADER_SIZE, ecc); if (rc) { prerror("FLASH: flash subpartition TOC read failed %i\n", rc); goto end; @@ -541,7 +541,7 @@ bool flash_load_resource(enum resource_id id, uint32_t subid, goto out_free_ffs; } - rc = ffs_flash_read(flash->chip, part_start, buf, size, ecc); + rc = flash_read_corrected(flash->chip, part_start, buf, size, ecc); if (rc) { prerror("FLASH: failed to read %s partition\n", name); goto out_free_ffs; |