mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
drivers: rkflash: Treat ECC fail block as good one
Change-Id: I8c29638230c24fe0f0308bec9318482ad2371124 Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
This commit is contained in:
@@ -600,8 +600,12 @@ u32 sfc_nand_check_bad_block(u8 cs, u32 addr)
|
||||
u32 data_size = p_nand_info->sec_per_page * SFC_NAND_SECTOR_SIZE;
|
||||
|
||||
ret = sfc_nand_read_page_raw(cs, addr, gp_page_buf);
|
||||
/* unify with mtd framework */
|
||||
if (ret == SFC_NAND_ECC_ERROR)
|
||||
return true;
|
||||
rkflash_print_error("%s page= %x ret= %x data0= %x, spare0= %x\n",
|
||||
__func__, addr, ret, gp_page_buf[0],
|
||||
(gp_page_buf[data_size / 4] & 0xFF));
|
||||
|
||||
/* Original bad block */
|
||||
if ((gp_page_buf[data_size / 4] & 0xFF) != 0xFF)
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user