Re: [PATCH 2/3] mtd: rawnand: cafe: Set the NAND_NO_BBM_QUIRK flag

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Boris,

Boris Brezillon <boris.brezillon@xxxxxxxxxxxxx> wrote on Mon, 27 Apr
2020 09:24:52 +0200:

> We have a dummy block_bad() implementation returning 0. Let's set the
> NAND_NO_BBM_QUIRK flag and let the core take care of that.
> 
> Signed-off-by: Boris Brezillon <boris.brezillon@xxxxxxxxxxxxx>
> ---
>  drivers/mtd/nand/raw/cafe_nand.c | 11 ++---------
>  1 file changed, 2 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/mtd/nand/raw/cafe_nand.c b/drivers/mtd/nand/raw/cafe_nand.c
> index 2d1c22dc88c1..2a0df13df5f3 100644
> --- a/drivers/mtd/nand/raw/cafe_nand.c
> +++ b/drivers/mtd/nand/raw/cafe_nand.c
> @@ -546,11 +546,6 @@ static int cafe_nand_write_page_lowlevel(struct nand_chip *chip,
>  	return nand_prog_page_end_op(chip);
>  }
>  
> -static int cafe_nand_block_bad(struct nand_chip *chip, loff_t ofs)
> -{
> -	return 0;
> -}
> -
>  /* F_2[X]/(X**6+X+1)  */
>  static unsigned short gf64_mul(u8 a, u8 b)
>  {
> @@ -718,10 +713,8 @@ static int cafe_nand_probe(struct pci_dev *pdev,
>  	/* Enable the following for a flash based bad block table */
>  	cafe->nand.bbt_options = NAND_BBT_USE_FLASH;
>  
> -	if (skipbbt) {
> -		cafe->nand.options |= NAND_SKIP_BBTSCAN;
> -		cafe->nand.legacy.block_bad = cafe_nand_block_bad;
> -	}
> +	if (skipbbt)
> +		cafe->nand.options |= NAND_SKIP_BBTSCAN | NAND_NO_BBM_QUIRK;
>  
>  	if (numtimings && numtimings != 3) {
>  		dev_warn(&cafe->pdev->dev, "%d timing register values ignored; precisely three are required\n", numtimings);

Reviewed-by: Miquel Raynal <miquel.raynal@xxxxxxxxxxx>

Thanks,
Miquèl

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux