lkml.org 
[lkml]   [2016]   [Jun]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 05/15] mtd: nand: add manufacturer specific initialization/detection steps
On Sat, 18 Jun 2016 11:23:01 +0200
Richard Weinberger <richard@nod.at> wrote:

> diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
> index 55f3ab8..aadebe7 100644
> --- a/drivers/mtd/nand/nand_base.c
> +++ b/drivers/mtd/nand/nand_base.c
> @@ -3703,6 +3703,10 @@ static int nand_detect(struct nand_chip *chip, struct nand_flash_dev *type)
>
> chip->manufacturer.ops = nand_manuf_ids[maf_idx].ops;
>
> + if (!chip->manufacturer.ops)
> + /* assign no operations */
> + chip->manufacturer.ops = nand_manuf_ids[0].ops;
> +

BTW, this is wrong, the manufacturer id code is not the index of the
nand_manuf_ids[] table ;). If we go for this option, we should probably
declare no_ops in nand_base.c and assign it here:

chip->manufacturer.ops = nand_manuf_no_ops;

> if (!type)
> type = nand_flash_ids;
>

\
 
 \ /
  Last update: 2016-06-18 14:21    [W:0.064 / U:0.404 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site