Re: [U-Boot] [PATCH 2/5] altera_qspi: set fail_addr for erase ops

2015-12-27 Thread Thomas Chou



On 2015年12月24日 08:51, Thomas Chou wrote:

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 
---
  drivers/mtd/altera_qspi.c | 1 +
  1 file changed, 1 insertion(+)



Applied to u-boot-nios.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 2/5] altera_qspi: set fail_addr for erase ops

2015-12-23 Thread Thomas Chou
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 
---
 drivers/mtd/altera_qspi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mtd/altera_qspi.c b/drivers/mtd/altera_qspi.c
index 627a8cc..b0d4f2c 100644
--- a/drivers/mtd/altera_qspi.c
+++ b/drivers/mtd/altera_qspi.c
@@ -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, >isr); /* clear isr */
+   instr->fail_addr = addr;
instr->state = MTD_ERASE_FAILED;
mtd_erase_callback(instr);
return -EIO;
-- 
2.5.0

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot