Skip to content
Snippets Groups Projects
Commit a1b1d7ec authored by Thomas Chou's avatar Thomas Chou
Browse files

altera_qspi: set fail_addr for erase ops


If the erase fails, fail_addr might indicate exactly which block
failed. If fail_addr = MTD_FAIL_ADDR_UNKNOWN, the failure was not
at the device level or was not specific to any particular block.

Signed-off-by: Thomas Chou's avatarThomas Chou <thomas@wytron.com.tw>
parent 9e957aa4
No related branches found
No related tags found
No related merge requests found
......@@ -145,6 +145,7 @@ static int altera_qspi_erase(struct mtd_info *mtd, struct erase_info *instr)
/* erase failed, sector might be protected */
debug("erase %08x fail %x\n", sect, stat);
writel(stat, &regs->isr); /* clear isr */
instr->fail_addr = addr;
instr->state = MTD_ERASE_FAILED;
mtd_erase_callback(instr);
return -EIO;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment