Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp7134241yba; Thu, 2 May 2019 05:01:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqzixfql/nx1WVHs91gZuCkqHnculEYRi/MK0JkYYeCkY405zzHCjZRuwDRp+tSNGcfJWx5U X-Received: by 2002:a63:1b04:: with SMTP id b4mr3520657pgb.305.1556798460227; Thu, 02 May 2019 05:01:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556798460; cv=none; d=google.com; s=arc-20160816; b=LpKRJ0env2Ddd3t1D8uPGbKlXJ5zL0m5mteTEaxC4/n6ueI05EZ5i5KQn59olt6SA1 Dc3BuQ4StNYUG0gLbe4RDEQMjURfkmGu23L3gb/y3bUFNnDKI7X20+cPsXh7edj6ZCmM ChP/fu3Ay8TPhVf6PdWvfC69PGkAfOBRqaxKV8E7RK7z9h3mKOGniowEIZtwFyDf78QK FBwk7DEwVYAUtFmTMLlcvDdLiu20Ii8L2JzJEQdz33seY9fdCLKSOuOtJPyqfADYggbJ ym2QLiTDg3ZyJVV/ZmaN1fIYeIA0wQz4p2OctjUhOZCsyhV+iqZfNblLZ8/dwz3bvIUi em9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=Uxk7nyisenRwGusPt/MHkODFgA88MrAnzGHZIIF7hDU=; b=YhhhM0cA5mJwkxM+zObanuB/1CYZaY3R92NCh9J56w5cWwKphs8nLoZSITZPtOhi+P DDr8k3aPHQuy1Z78SnQu4VAc5jXrV8WKk1CHc8GJFBG1tZi9suxbSpqzXbSwD+U6GznV IBU/3+S7GScpjIYZ7g5IZPmEKALVzwXkNGoIkeiH8UTm4/Ttam9uba7ifZw42kXB+Gau OI9pYqMlnvFOPtfOo+wI2sc07xx8ybOjeXyExhQJ7liTdAbZarWP0Fsy3DwPWJ+SHbIV bwO5ibUgSx2SYkeU92kLyu0ShRndlK15MdLpV2uWKpLzuD+hkuwFK0wJbgTuq7eiMzTX 9WDg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w126si47566832pfw.53.2019.05.02.05.00.43; Thu, 02 May 2019 05:01:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726380AbfEBL7v convert rfc822-to-8bit (ORCPT + 99 others); Thu, 2 May 2019 07:59:51 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:34237 "EHLO relay3-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726197AbfEBL7t (ORCPT ); Thu, 2 May 2019 07:59:49 -0400 X-Originating-IP: 90.88.149.145 Received: from xps13 (aaubervilliers-681-1-29-145.w90-88.abo.wanadoo.fr [90.88.149.145]) (Authenticated sender: miquel.raynal@bootlin.com) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id AA0E860003; Thu, 2 May 2019 11:59:46 +0000 (UTC) Date: Thu, 2 May 2019 13:59:45 +0200 From: Miquel Raynal To: "Shivamurthy Shastri (sshivamurthy)" Cc: Boris Brezillon , "linux-mtd@lists.infradead.org" , "linux-kernel@vger.kernel.org" , Richard Weinberger , David Woodhouse , Brian Norris , Marek Vasut , Frieder Schrempf Subject: Re: [EXT] Re: [PATCH 3/4] mtd: spinand: Enabled support to detect parameter page Message-ID: <20190502135945.61bd6ceb@xps13> In-Reply-To: References: <20190430095508.706fa125@xps13> Organization: Bootlin X-Mailer: Claws Mail 3.17.1 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Shiva, "Shivamurthy Shastri (sshivamurthy)" wrote on Thu, 2 May 2019 11:37:10 +0000: > Hi Miquel, > > > > > Hi Shivamurthy, > > > > "Shivamurthy Shastri (sshivamurthy)" wrote > > on > > Tue, 26 Mar 2019 10:52:00 +0000: > > > > > Some of the SPI NAND devices has parameter page which is similar to ONFI > > > table. > > > > > > But, it may not be self sufficient to propagate all the required > > > parameters. Fixup function has been added in struct manufacturer to > > > accommodate this. > > > > > > Signed-off-by: Shivamurthy Shastri > > > --- > > > drivers/mtd/nand/spi/core.c | 113 > > +++++++++++++++++++++++++++++++++++- > > > include/linux/mtd/spinand.h | 5 ++ > > > 2 files changed, 117 insertions(+), 1 deletion(-) > > > > > > diff --git a/drivers/mtd/nand/spi/core.c b/drivers/mtd/nand/spi/core.c > > > index 985ad52cdaa7..40882a1d2bc1 100644 > > > --- a/drivers/mtd/nand/spi/core.c > > > +++ b/drivers/mtd/nand/spi/core.c > > > @@ -574,6 +574,108 @@ static int spinand_lock_block(struct > > spinand_device *spinand, u8 lock) > > > return spinand_write_reg_op(spinand, REG_BLOCK_LOCK, lock); > > > } > > > > > > +/** > > > + * spinand_read_param_page_op - Read parameter page operation > > > + * @spinand: the spinand device > > > + * @page: page number where parameter page tables can be found > > > + * @parameters: buffer used to store the parameter page > > > > Does not match the prototype > > I will fix this in next version. > > > > > > + * @len: length of the buffer > > > + * > > > + * Read parameter page > > > + * > > > + * Returns 0 on success, a negative error code otherwise. > > > + */ > > > +static int spinand_parameter_page_read(struct nand_device *base, > > > > Please use a spinand structure as parameter, you don't need a > > nand_device here (same for other spinand functions). > > This function is helper function for generic ONFI layer. > From generic ONFI layer, I can get only nand_device. How do you handle if the SPI NAND core is not compiled-in? Thanks, Miquèl