summaryrefslogtreecommitdiff
path: root/firmware/target/mips/ingenic_x1000/fiiom3k/installer-fiiom3k.c
diff options
context:
space:
mode:
authoramachronic <amachronic@protonmail.com>2021-04-06 01:10:01 +0100
committeramachronic <amachronic@protonmail.com>2021-04-06 17:27:12 +0100
commit28c89386af8ea9d002bcc25483233053fe0e7525 (patch)
treeac25a1cbf09d7bc2dadea89002943c722fbd8806 /firmware/target/mips/ingenic_x1000/fiiom3k/installer-fiiom3k.c
parentb5558c1cf968f0fcff072456408b14f130f29ce3 (diff)
downloadrockbox-28c89386af8ea9d002bcc25483233053fe0e7525.tar.gz
rockbox-28c89386af8ea9d002bcc25483233053fe0e7525.zip
x1000: Improve NAND driver API
- Proper error codes are now returned from all functions. These codes will be used by a host-side flash tool for error reporting. - nand_erase_block() was replaced by nand_erase_bytes(). The caller can't know how big an eraseblock is with the current API, so next best thing is to verify the correct alignment inside the call and reject the erase if it isn't properly aligned. - Fixed typo in nandcmd_block_erase() which would cause an SFC error to be interpreted as success. Yikes. Change-Id: Id4ac9b44fa7fc2fcb81ff19ba730df78457c0383
Diffstat (limited to 'firmware/target/mips/ingenic_x1000/fiiom3k/installer-fiiom3k.c')
-rw-r--r--firmware/target/mips/ingenic_x1000/fiiom3k/installer-fiiom3k.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/firmware/target/mips/ingenic_x1000/fiiom3k/installer-fiiom3k.c b/firmware/target/mips/ingenic_x1000/fiiom3k/installer-fiiom3k.c
index c794da4000..cdd7276bee 100644
--- a/firmware/target/mips/ingenic_x1000/fiiom3k/installer-fiiom3k.c
+++ b/firmware/target/mips/ingenic_x1000/fiiom3k/installer-fiiom3k.c
@@ -50,7 +50,7 @@ static int install_from_buffer(const void* buf)
50 goto _exit; 50 goto _exit;
51 } 51 }
52 52
53 if(nand_erase_block(0)) { 53 if(nand_erase_bytes(0, BOOT_IMAGE_SIZE)) {
54 status = ERR_FLASH_ERASE_FAILED; 54 status = ERR_FLASH_ERASE_FAILED;
55 goto _exit; 55 goto _exit;
56 } 56 }